001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for Repository. This utility wraps
024     * {@link com.liferay.portal.service.impl.RepositoryLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see RepositoryLocalService
032     * @see com.liferay.portal.service.base.RepositoryLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.RepositoryLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class RepositoryLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RepositoryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the repository to the database. Also notifies the appropriate model listeners.
046            *
047            * @param repository the repository
048            * @return the repository that was added
049            */
050            public static com.liferay.portal.model.Repository addRepository(
051                    com.liferay.portal.model.Repository repository) {
052                    return getService().addRepository(repository);
053            }
054    
055            public static com.liferay.portal.model.Repository addRepository(
056                    long userId, long groupId, long classNameId, long parentFolderId,
057                    java.lang.String name, java.lang.String description,
058                    java.lang.String portletId,
059                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
060                    boolean hidden, com.liferay.portal.service.ServiceContext serviceContext)
061                    throws com.liferay.portal.kernel.exception.PortalException {
062                    return getService()
063                                       .addRepository(userId, groupId, classNameId, parentFolderId,
064                            name, description, portletId, typeSettingsProperties, hidden,
065                            serviceContext);
066            }
067    
068            /**
069            * @deprecated As of 6.2.0, replaced by {@link #addRepository(long, long,
070            long, long, String, String, String, UnicodeProperties,
071            boolean, ServiceContext)}
072            */
073            @Deprecated
074            public static com.liferay.portal.model.Repository addRepository(
075                    long userId, long groupId, long classNameId, long parentFolderId,
076                    java.lang.String name, java.lang.String description,
077                    java.lang.String portletId,
078                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
079                    com.liferay.portal.service.ServiceContext serviceContext)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    return getService()
082                                       .addRepository(userId, groupId, classNameId, parentFolderId,
083                            name, description, portletId, typeSettingsProperties, serviceContext);
084            }
085    
086            public static void checkRepository(long repositoryId) {
087                    getService().checkRepository(repositoryId);
088            }
089    
090            /**
091            * Creates a new repository with the primary key. Does not add the repository to the database.
092            *
093            * @param repositoryId the primary key for the new repository
094            * @return the new repository
095            */
096            public static com.liferay.portal.model.Repository createRepository(
097                    long repositoryId) {
098                    return getService().createRepository(repositoryId);
099            }
100    
101            /**
102            * @throws PortalException
103            */
104            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
105                    com.liferay.portal.model.PersistedModel persistedModel)
106                    throws com.liferay.portal.kernel.exception.PortalException {
107                    return getService().deletePersistedModel(persistedModel);
108            }
109    
110            public static void deleteRepositories(long groupId) {
111                    getService().deleteRepositories(groupId);
112            }
113    
114            /**
115            * Deletes the repository from the database. Also notifies the appropriate model listeners.
116            *
117            * @param repository the repository
118            * @return the repository that was removed
119            */
120            public static com.liferay.portal.model.Repository deleteRepository(
121                    com.liferay.portal.model.Repository repository) {
122                    return getService().deleteRepository(repository);
123            }
124    
125            /**
126            * Deletes the repository with the primary key from the database. Also notifies the appropriate model listeners.
127            *
128            * @param repositoryId the primary key of the repository
129            * @return the repository that was removed
130            * @throws PortalException if a repository with the primary key could not be found
131            */
132            public static com.liferay.portal.model.Repository deleteRepository(
133                    long repositoryId)
134                    throws com.liferay.portal.kernel.exception.PortalException {
135                    return getService().deleteRepository(repositoryId);
136            }
137    
138            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
139                    return getService().dynamicQuery();
140            }
141    
142            /**
143            * Performs a dynamic query on the database and returns the matching rows.
144            *
145            * @param dynamicQuery the dynamic query
146            * @return the matching rows
147            */
148            public static <T> java.util.List<T> dynamicQuery(
149                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
150                    return getService().dynamicQuery(dynamicQuery);
151            }
152    
153            /**
154            * Performs a dynamic query on the database and returns a range of the matching rows.
155            *
156            * <p>
157            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
158            * </p>
159            *
160            * @param dynamicQuery the dynamic query
161            * @param start the lower bound of the range of model instances
162            * @param end the upper bound of the range of model instances (not inclusive)
163            * @return the range of matching rows
164            */
165            public static <T> java.util.List<T> dynamicQuery(
166                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
167                    int end) {
168                    return getService().dynamicQuery(dynamicQuery, start, end);
169            }
170    
171            /**
172            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
173            *
174            * <p>
175            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
176            * </p>
177            *
178            * @param dynamicQuery the dynamic query
179            * @param start the lower bound of the range of model instances
180            * @param end the upper bound of the range of model instances (not inclusive)
181            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
182            * @return the ordered range of matching rows
183            */
184            public static <T> java.util.List<T> dynamicQuery(
185                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
186                    int end,
187                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
188                    return getService()
189                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
190            }
191    
192            /**
193            * Returns the number of rows matching the dynamic query.
194            *
195            * @param dynamicQuery the dynamic query
196            * @return the number of rows matching the dynamic query
197            */
198            public static long dynamicQueryCount(
199                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
200                    return getService().dynamicQueryCount(dynamicQuery);
201            }
202    
203            /**
204            * Returns the number of rows matching the dynamic query.
205            *
206            * @param dynamicQuery the dynamic query
207            * @param projection the projection to apply to the query
208            * @return the number of rows matching the dynamic query
209            */
210            public static long dynamicQueryCount(
211                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
212                    com.liferay.portal.kernel.dao.orm.Projection projection) {
213                    return getService().dynamicQueryCount(dynamicQuery, projection);
214            }
215    
216            public static com.liferay.portal.model.Repository fetchRepository(
217                    long groupId, java.lang.String name, java.lang.String portletId) {
218                    return getService().fetchRepository(groupId, name, portletId);
219            }
220    
221            public static com.liferay.portal.model.Repository fetchRepository(
222                    long groupId, java.lang.String portletId) {
223                    return getService().fetchRepository(groupId, portletId);
224            }
225    
226            public static com.liferay.portal.model.Repository fetchRepository(
227                    long repositoryId) {
228                    return getService().fetchRepository(repositoryId);
229            }
230    
231            /**
232            * Returns the repository matching the UUID and group.
233            *
234            * @param uuid the repository's UUID
235            * @param groupId the primary key of the group
236            * @return the matching repository, or <code>null</code> if a matching repository could not be found
237            */
238            public static com.liferay.portal.model.Repository fetchRepositoryByUuidAndGroupId(
239                    java.lang.String uuid, long groupId) {
240                    return getService().fetchRepositoryByUuidAndGroupId(uuid, groupId);
241            }
242    
243            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
244                    return getService().getActionableDynamicQuery();
245            }
246    
247            /**
248            * Returns the Spring bean ID for this bean.
249            *
250            * @return the Spring bean ID for this bean
251            */
252            public static java.lang.String getBeanIdentifier() {
253                    return getService().getBeanIdentifier();
254            }
255    
256            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
257                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
258                    return getService().getExportActionableDynamicQuery(portletDataContext);
259            }
260    
261            public static java.util.List<com.liferay.portal.kernel.repository.LocalRepository> getGroupLocalRepositoryImpl(
262                    long groupId)
263                    throws com.liferay.portal.kernel.exception.PortalException {
264                    return getService().getGroupLocalRepositoryImpl(groupId);
265            }
266    
267            public static com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
268                    long folderId, long fileEntryId, long fileVersionId)
269                    throws com.liferay.portal.kernel.exception.PortalException {
270                    return getService()
271                                       .getLocalRepositoryImpl(folderId, fileEntryId, fileVersionId);
272            }
273    
274            public static com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
275                    long repositoryId)
276                    throws com.liferay.portal.kernel.exception.PortalException {
277                    return getService().getLocalRepositoryImpl(repositoryId);
278            }
279    
280            public static com.liferay.portal.model.PersistedModel getPersistedModel(
281                    java.io.Serializable primaryKeyObj)
282                    throws com.liferay.portal.kernel.exception.PortalException {
283                    return getService().getPersistedModel(primaryKeyObj);
284            }
285    
286            public static java.lang.String getRegistryName() {
287                    return getService().getRegistryName();
288            }
289    
290            /**
291            * Returns a range of all the repositories.
292            *
293            * <p>
294            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.RepositoryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
295            * </p>
296            *
297            * @param start the lower bound of the range of repositories
298            * @param end the upper bound of the range of repositories (not inclusive)
299            * @return the range of repositories
300            */
301            public static java.util.List<com.liferay.portal.model.Repository> getRepositories(
302                    int start, int end) {
303                    return getService().getRepositories(start, end);
304            }
305    
306            /**
307            * Returns all the repositories matching the UUID and company.
308            *
309            * @param uuid the UUID of the repositories
310            * @param companyId the primary key of the company
311            * @return the matching repositories, or an empty list if no matches were found
312            */
313            public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
314                    java.lang.String uuid, long companyId) {
315                    return getService().getRepositoriesByUuidAndCompanyId(uuid, companyId);
316            }
317    
318            /**
319            * Returns a range of repositories matching the UUID and company.
320            *
321            * @param uuid the UUID of the repositories
322            * @param companyId the primary key of the company
323            * @param start the lower bound of the range of repositories
324            * @param end the upper bound of the range of repositories (not inclusive)
325            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
326            * @return the range of matching repositories, or an empty list if no matches were found
327            */
328            public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
329                    java.lang.String uuid, long companyId, int start, int end,
330                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Repository> orderByComparator) {
331                    return getService()
332                                       .getRepositoriesByUuidAndCompanyId(uuid, companyId, start,
333                            end, orderByComparator);
334            }
335    
336            /**
337            * Returns the number of repositories.
338            *
339            * @return the number of repositories
340            */
341            public static int getRepositoriesCount() {
342                    return getService().getRepositoriesCount();
343            }
344    
345            public static com.liferay.portal.model.Repository getRepository(
346                    long groupId, java.lang.String name, java.lang.String portletId)
347                    throws com.liferay.portal.kernel.exception.PortalException {
348                    return getService().getRepository(groupId, name, portletId);
349            }
350    
351            public static com.liferay.portal.model.Repository getRepository(
352                    long groupId, java.lang.String portletId)
353                    throws com.liferay.portal.kernel.exception.PortalException {
354                    return getService().getRepository(groupId, portletId);
355            }
356    
357            /**
358            * Returns the repository with the primary key.
359            *
360            * @param repositoryId the primary key of the repository
361            * @return the repository
362            * @throws PortalException if a repository with the primary key could not be found
363            */
364            public static com.liferay.portal.model.Repository getRepository(
365                    long repositoryId)
366                    throws com.liferay.portal.kernel.exception.PortalException {
367                    return getService().getRepository(repositoryId);
368            }
369    
370            /**
371            * Returns the repository matching the UUID and group.
372            *
373            * @param uuid the repository's UUID
374            * @param groupId the primary key of the group
375            * @return the matching repository
376            * @throws PortalException if a matching repository could not be found
377            */
378            public static com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId(
379                    java.lang.String uuid, long groupId)
380                    throws com.liferay.portal.kernel.exception.PortalException {
381                    return getService().getRepositoryByUuidAndGroupId(uuid, groupId);
382            }
383    
384            public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
385                    long folderId, long fileEntryId, long fileVersionId)
386                    throws com.liferay.portal.kernel.exception.PortalException {
387                    return getService()
388                                       .getRepositoryImpl(folderId, fileEntryId, fileVersionId);
389            }
390    
391            public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
392                    long repositoryId)
393                    throws com.liferay.portal.kernel.exception.PortalException {
394                    return getService().getRepositoryImpl(repositoryId);
395            }
396    
397            public static com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
398                    long repositoryId)
399                    throws com.liferay.portal.kernel.exception.PortalException {
400                    return getService().getTypeSettingsProperties(repositoryId);
401            }
402    
403            public static void invalidate() {
404                    getService().invalidate();
405            }
406    
407            /**
408            * Sets the Spring bean ID for this bean.
409            *
410            * @param beanIdentifier the Spring bean ID for this bean
411            */
412            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
413                    getService().setBeanIdentifier(beanIdentifier);
414            }
415    
416            /**
417            * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
418            *
419            * @param repository the repository
420            * @return the repository that was updated
421            */
422            public static com.liferay.portal.model.Repository updateRepository(
423                    com.liferay.portal.model.Repository repository) {
424                    return getService().updateRepository(repository);
425            }
426    
427            public static void updateRepository(long repositoryId,
428                    java.lang.String name, java.lang.String description)
429                    throws com.liferay.portal.kernel.exception.PortalException {
430                    getService().updateRepository(repositoryId, name, description);
431            }
432    
433            public static RepositoryLocalService getService() {
434                    if (_service == null) {
435                            _service = (RepositoryLocalService)PortalBeanLocatorUtil.locate(RepositoryLocalService.class.getName());
436    
437                            ReferenceRegistry.registerReference(RepositoryLocalServiceUtil.class,
438                                    "_service");
439                    }
440    
441                    return _service;
442            }
443    
444            /**
445             * @deprecated As of 6.2.0
446             */
447            @Deprecated
448            public void setService(RepositoryLocalService service) {
449            }
450    
451            private static RepositoryLocalService _service;
452    }