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 that match the dynamic query.
194            *
195            * @param dynamicQuery the dynamic query
196            * @return the number of rows that match 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 that match 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 that match 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            public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
307                    java.lang.String uuid, long companyId) {
308                    return getService().getRepositoriesByUuidAndCompanyId(uuid, companyId);
309            }
310    
311            public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
312                    java.lang.String uuid, long companyId, int start, int end,
313                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Repository> orderByComparator) {
314                    return getService()
315                                       .getRepositoriesByUuidAndCompanyId(uuid, companyId, start,
316                            end, orderByComparator);
317            }
318    
319            /**
320            * Returns the number of repositories.
321            *
322            * @return the number of repositories
323            */
324            public static int getRepositoriesCount() {
325                    return getService().getRepositoriesCount();
326            }
327    
328            public static com.liferay.portal.model.Repository getRepository(
329                    long groupId, java.lang.String name, java.lang.String portletId)
330                    throws com.liferay.portal.kernel.exception.PortalException {
331                    return getService().getRepository(groupId, name, portletId);
332            }
333    
334            public static com.liferay.portal.model.Repository getRepository(
335                    long groupId, java.lang.String portletId)
336                    throws com.liferay.portal.kernel.exception.PortalException {
337                    return getService().getRepository(groupId, portletId);
338            }
339    
340            /**
341            * Returns the repository with the primary key.
342            *
343            * @param repositoryId the primary key of the repository
344            * @return the repository
345            * @throws PortalException if a repository with the primary key could not be found
346            */
347            public static com.liferay.portal.model.Repository getRepository(
348                    long repositoryId)
349                    throws com.liferay.portal.kernel.exception.PortalException {
350                    return getService().getRepository(repositoryId);
351            }
352    
353            /**
354            * Returns the repository matching the UUID and group.
355            *
356            * @param uuid the repository's UUID
357            * @param groupId the primary key of the group
358            * @return the matching repository
359            * @throws PortalException if a matching repository could not be found
360            */
361            public static com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId(
362                    java.lang.String uuid, long groupId)
363                    throws com.liferay.portal.kernel.exception.PortalException {
364                    return getService().getRepositoryByUuidAndGroupId(uuid, groupId);
365            }
366    
367            public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
368                    long folderId, long fileEntryId, long fileVersionId)
369                    throws com.liferay.portal.kernel.exception.PortalException {
370                    return getService()
371                                       .getRepositoryImpl(folderId, fileEntryId, fileVersionId);
372            }
373    
374            public static com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
375                    long repositoryId)
376                    throws com.liferay.portal.kernel.exception.PortalException {
377                    return getService().getRepositoryImpl(repositoryId);
378            }
379    
380            public static com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
381                    long repositoryId)
382                    throws com.liferay.portal.kernel.exception.PortalException {
383                    return getService().getTypeSettingsProperties(repositoryId);
384            }
385    
386            public static void invalidate() {
387                    getService().invalidate();
388            }
389    
390            /**
391            * Sets the Spring bean ID for this bean.
392            *
393            * @param beanIdentifier the Spring bean ID for this bean
394            */
395            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
396                    getService().setBeanIdentifier(beanIdentifier);
397            }
398    
399            /**
400            * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
401            *
402            * @param repository the repository
403            * @return the repository that was updated
404            */
405            public static com.liferay.portal.model.Repository updateRepository(
406                    com.liferay.portal.model.Repository repository) {
407                    return getService().updateRepository(repository);
408            }
409    
410            public static void updateRepository(long repositoryId,
411                    java.lang.String name, java.lang.String description)
412                    throws com.liferay.portal.kernel.exception.PortalException {
413                    getService().updateRepository(repositoryId, name, description);
414            }
415    
416            public static RepositoryLocalService getService() {
417                    if (_service == null) {
418                            _service = (RepositoryLocalService)PortalBeanLocatorUtil.locate(RepositoryLocalService.class.getName());
419    
420                            ReferenceRegistry.registerReference(RepositoryLocalServiceUtil.class,
421                                    "_service");
422                    }
423    
424                    return _service;
425            }
426    
427            /**
428             * @deprecated As of 6.2.0
429             */
430            @Deprecated
431            public void setService(RepositoryLocalService service) {
432            }
433    
434            private static RepositoryLocalService _service;
435    }