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                    throws com.liferay.portal.kernel.exception.PortalException {
112                    getService().deleteRepositories(groupId);
113            }
114    
115            /**
116            * Deletes the repository from the database. Also notifies the appropriate model listeners.
117            *
118            * @param repository the repository
119            * @return the repository that was removed
120            */
121            public static com.liferay.portal.model.Repository deleteRepository(
122                    com.liferay.portal.model.Repository repository) {
123                    return getService().deleteRepository(repository);
124            }
125    
126            /**
127            * Deletes the repository with the primary key from the database. Also notifies the appropriate model listeners.
128            *
129            * @param repositoryId the primary key of the repository
130            * @return the repository that was removed
131            * @throws PortalException if a repository with the primary key could not be found
132            */
133            public static com.liferay.portal.model.Repository deleteRepository(
134                    long repositoryId)
135                    throws com.liferay.portal.kernel.exception.PortalException {
136                    return getService().deleteRepository(repositoryId);
137            }
138    
139            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
140                    return getService().dynamicQuery();
141            }
142    
143            /**
144            * Performs a dynamic query on the database and returns the matching rows.
145            *
146            * @param dynamicQuery the dynamic query
147            * @return the matching rows
148            */
149            public static <T> java.util.List<T> dynamicQuery(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
151                    return getService().dynamicQuery(dynamicQuery);
152            }
153    
154            /**
155            * Performs a dynamic query on the database and returns a range of the matching rows.
156            *
157            * <p>
158            * 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.
159            * </p>
160            *
161            * @param dynamicQuery the dynamic query
162            * @param start the lower bound of the range of model instances
163            * @param end the upper bound of the range of model instances (not inclusive)
164            * @return the range of matching rows
165            */
166            public static <T> java.util.List<T> dynamicQuery(
167                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
168                    int end) {
169                    return getService().dynamicQuery(dynamicQuery, start, end);
170            }
171    
172            /**
173            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param dynamicQuery the dynamic query
180            * @param start the lower bound of the range of model instances
181            * @param end the upper bound of the range of model instances (not inclusive)
182            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
183            * @return the ordered range of matching rows
184            */
185            public static <T> java.util.List<T> dynamicQuery(
186                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
187                    int end,
188                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
189                    return getService()
190                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
191            }
192    
193            /**
194            * Returns the number of rows matching the dynamic query.
195            *
196            * @param dynamicQuery the dynamic query
197            * @return the number of rows matching the dynamic query
198            */
199            public static long dynamicQueryCount(
200                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
201                    return getService().dynamicQueryCount(dynamicQuery);
202            }
203    
204            /**
205            * Returns the number of rows matching the dynamic query.
206            *
207            * @param dynamicQuery the dynamic query
208            * @param projection the projection to apply to the query
209            * @return the number of rows matching the dynamic query
210            */
211            public static long dynamicQueryCount(
212                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
213                    com.liferay.portal.kernel.dao.orm.Projection projection) {
214                    return getService().dynamicQueryCount(dynamicQuery, projection);
215            }
216    
217            public static com.liferay.portal.model.Repository fetchRepository(
218                    long groupId, java.lang.String name, java.lang.String portletId) {
219                    return getService().fetchRepository(groupId, name, portletId);
220            }
221    
222            public static com.liferay.portal.model.Repository fetchRepository(
223                    long groupId, java.lang.String portletId) {
224                    return getService().fetchRepository(groupId, portletId);
225            }
226    
227            public static com.liferay.portal.model.Repository fetchRepository(
228                    long repositoryId) {
229                    return getService().fetchRepository(repositoryId);
230            }
231    
232            /**
233            * Returns the repository matching the UUID and group.
234            *
235            * @param uuid the repository's UUID
236            * @param groupId the primary key of the group
237            * @return the matching repository, or <code>null</code> if a matching repository could not be found
238            */
239            public static com.liferay.portal.model.Repository fetchRepositoryByUuidAndGroupId(
240                    java.lang.String uuid, long groupId) {
241                    return getService().fetchRepositoryByUuidAndGroupId(uuid, groupId);
242            }
243    
244            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
245                    return getService().getActionableDynamicQuery();
246            }
247    
248            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
249                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
250                    return getService().getExportActionableDynamicQuery(portletDataContext);
251            }
252    
253            public static java.util.List<com.liferay.portal.model.Repository> getGroupRepositories(
254                    long groupId) {
255                    return getService().getGroupRepositories(groupId);
256            }
257    
258            /**
259            * Returns the OSGi service identifier.
260            *
261            * @return the OSGi service identifier
262            */
263            public static java.lang.String getOSGiServiceIdentifier() {
264                    return getService().getOSGiServiceIdentifier();
265            }
266    
267            public static com.liferay.portal.model.PersistedModel getPersistedModel(
268                    java.io.Serializable primaryKeyObj)
269                    throws com.liferay.portal.kernel.exception.PortalException {
270                    return getService().getPersistedModel(primaryKeyObj);
271            }
272    
273            /**
274            * Returns a range of all the repositories.
275            *
276            * <p>
277            * 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.
278            * </p>
279            *
280            * @param start the lower bound of the range of repositories
281            * @param end the upper bound of the range of repositories (not inclusive)
282            * @return the range of repositories
283            */
284            public static java.util.List<com.liferay.portal.model.Repository> getRepositories(
285                    int start, int end) {
286                    return getService().getRepositories(start, end);
287            }
288    
289            /**
290            * Returns all the repositories matching the UUID and company.
291            *
292            * @param uuid the UUID of the repositories
293            * @param companyId the primary key of the company
294            * @return the matching repositories, or an empty list if no matches were found
295            */
296            public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
297                    java.lang.String uuid, long companyId) {
298                    return getService().getRepositoriesByUuidAndCompanyId(uuid, companyId);
299            }
300    
301            /**
302            * Returns a range of repositories matching the UUID and company.
303            *
304            * @param uuid the UUID of the repositories
305            * @param companyId the primary key of the company
306            * @param start the lower bound of the range of repositories
307            * @param end the upper bound of the range of repositories (not inclusive)
308            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
309            * @return the range of matching repositories, or an empty list if no matches were found
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.util.UnicodeProperties getTypeSettingsProperties(
368                    long repositoryId)
369                    throws com.liferay.portal.kernel.exception.PortalException {
370                    return getService().getTypeSettingsProperties(repositoryId);
371            }
372    
373            /**
374            * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
375            *
376            * @param repository the repository
377            * @return the repository that was updated
378            */
379            public static com.liferay.portal.model.Repository updateRepository(
380                    com.liferay.portal.model.Repository repository) {
381                    return getService().updateRepository(repository);
382            }
383    
384            public static void updateRepository(long repositoryId,
385                    java.lang.String name, java.lang.String description)
386                    throws com.liferay.portal.kernel.exception.PortalException {
387                    getService().updateRepository(repositoryId, name, description);
388            }
389    
390            public static void updateRepository(long repositoryId,
391                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties)
392                    throws com.liferay.portal.kernel.exception.PortalException {
393                    getService().updateRepository(repositoryId, typeSettingsProperties);
394            }
395    
396            public static RepositoryLocalService getService() {
397                    if (_service == null) {
398                            _service = (RepositoryLocalService)PortalBeanLocatorUtil.locate(RepositoryLocalService.class.getName());
399    
400                            ReferenceRegistry.registerReference(RepositoryLocalServiceUtil.class,
401                                    "_service");
402                    }
403    
404                    return _service;
405            }
406    
407            /**
408             * @deprecated As of 6.2.0
409             */
410            @Deprecated
411            public void setService(RepositoryLocalService service) {
412            }
413    
414            private static RepositoryLocalService _service;
415    }