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            public static void checkRepository(long repositoryId) {
069                    getService().checkRepository(repositoryId);
070            }
071    
072            /**
073            * Creates a new repository with the primary key. Does not add the repository to the database.
074            *
075            * @param repositoryId the primary key for the new repository
076            * @return the new repository
077            */
078            public static com.liferay.portal.model.Repository createRepository(
079                    long repositoryId) {
080                    return getService().createRepository(repositoryId);
081            }
082    
083            /**
084            * @throws PortalException
085            */
086            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
087                    com.liferay.portal.model.PersistedModel persistedModel)
088                    throws com.liferay.portal.kernel.exception.PortalException {
089                    return getService().deletePersistedModel(persistedModel);
090            }
091    
092            public static void deleteRepositories(long groupId)
093                    throws com.liferay.portal.kernel.exception.PortalException {
094                    getService().deleteRepositories(groupId);
095            }
096    
097            /**
098            * Deletes the repository from the database. Also notifies the appropriate model listeners.
099            *
100            * @param repository the repository
101            * @return the repository that was removed
102            */
103            public static com.liferay.portal.model.Repository deleteRepository(
104                    com.liferay.portal.model.Repository repository) {
105                    return getService().deleteRepository(repository);
106            }
107    
108            /**
109            * Deletes the repository with the primary key from the database. Also notifies the appropriate model listeners.
110            *
111            * @param repositoryId the primary key of the repository
112            * @return the repository that was removed
113            * @throws PortalException if a repository with the primary key could not be found
114            */
115            public static com.liferay.portal.model.Repository deleteRepository(
116                    long repositoryId)
117                    throws com.liferay.portal.kernel.exception.PortalException {
118                    return getService().deleteRepository(repositoryId);
119            }
120    
121            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
122                    return getService().dynamicQuery();
123            }
124    
125            /**
126            * Performs a dynamic query on the database and returns the matching rows.
127            *
128            * @param dynamicQuery the dynamic query
129            * @return the matching rows
130            */
131            public static <T> java.util.List<T> dynamicQuery(
132                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
133                    return getService().dynamicQuery(dynamicQuery);
134            }
135    
136            /**
137            * Performs a dynamic query on the database and returns a range of the matching rows.
138            *
139            * <p>
140            * 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.
141            * </p>
142            *
143            * @param dynamicQuery the dynamic query
144            * @param start the lower bound of the range of model instances
145            * @param end the upper bound of the range of model instances (not inclusive)
146            * @return the range of matching rows
147            */
148            public static <T> java.util.List<T> dynamicQuery(
149                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
150                    int end) {
151                    return getService().dynamicQuery(dynamicQuery, start, end);
152            }
153    
154            /**
155            * Performs a dynamic query on the database and returns an ordered 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            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
165            * @return the ordered range of matching rows
166            */
167            public static <T> java.util.List<T> dynamicQuery(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
169                    int end,
170                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
171                    return getService()
172                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
173            }
174    
175            /**
176            * Returns the number of rows matching the dynamic query.
177            *
178            * @param dynamicQuery the dynamic query
179            * @return the number of rows matching the dynamic query
180            */
181            public static long dynamicQueryCount(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
183                    return getService().dynamicQueryCount(dynamicQuery);
184            }
185    
186            /**
187            * Returns the number of rows matching the dynamic query.
188            *
189            * @param dynamicQuery the dynamic query
190            * @param projection the projection to apply to the query
191            * @return the number of rows matching the dynamic query
192            */
193            public static long dynamicQueryCount(
194                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
195                    com.liferay.portal.kernel.dao.orm.Projection projection) {
196                    return getService().dynamicQueryCount(dynamicQuery, projection);
197            }
198    
199            public static com.liferay.portal.model.Repository fetchRepository(
200                    long groupId, java.lang.String name, java.lang.String portletId) {
201                    return getService().fetchRepository(groupId, name, portletId);
202            }
203    
204            public static com.liferay.portal.model.Repository fetchRepository(
205                    long groupId, java.lang.String portletId) {
206                    return getService().fetchRepository(groupId, portletId);
207            }
208    
209            public static com.liferay.portal.model.Repository fetchRepository(
210                    long repositoryId) {
211                    return getService().fetchRepository(repositoryId);
212            }
213    
214            /**
215            * Returns the repository matching the UUID and group.
216            *
217            * @param uuid the repository's UUID
218            * @param groupId the primary key of the group
219            * @return the matching repository, or <code>null</code> if a matching repository could not be found
220            */
221            public static com.liferay.portal.model.Repository fetchRepositoryByUuidAndGroupId(
222                    java.lang.String uuid, long groupId) {
223                    return getService().fetchRepositoryByUuidAndGroupId(uuid, groupId);
224            }
225    
226            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
227                    return getService().getActionableDynamicQuery();
228            }
229    
230            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
231                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
232                    return getService().getExportActionableDynamicQuery(portletDataContext);
233            }
234    
235            public static java.util.List<com.liferay.portal.model.Repository> getGroupRepositories(
236                    long groupId) {
237                    return getService().getGroupRepositories(groupId);
238            }
239    
240            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
241                    return getService().getIndexableActionableDynamicQuery();
242            }
243    
244            /**
245            * Returns the OSGi service identifier.
246            *
247            * @return the OSGi service identifier
248            */
249            public static java.lang.String getOSGiServiceIdentifier() {
250                    return getService().getOSGiServiceIdentifier();
251            }
252    
253            public static com.liferay.portal.model.PersistedModel getPersistedModel(
254                    java.io.Serializable primaryKeyObj)
255                    throws com.liferay.portal.kernel.exception.PortalException {
256                    return getService().getPersistedModel(primaryKeyObj);
257            }
258    
259            /**
260            * Returns a range of all the repositories.
261            *
262            * <p>
263            * 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.
264            * </p>
265            *
266            * @param start the lower bound of the range of repositories
267            * @param end the upper bound of the range of repositories (not inclusive)
268            * @return the range of repositories
269            */
270            public static java.util.List<com.liferay.portal.model.Repository> getRepositories(
271                    int start, int end) {
272                    return getService().getRepositories(start, end);
273            }
274    
275            /**
276            * Returns all the repositories matching the UUID and company.
277            *
278            * @param uuid the UUID of the repositories
279            * @param companyId the primary key of the company
280            * @return the matching repositories, or an empty list if no matches were found
281            */
282            public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
283                    java.lang.String uuid, long companyId) {
284                    return getService().getRepositoriesByUuidAndCompanyId(uuid, companyId);
285            }
286    
287            /**
288            * Returns a range of repositories matching the UUID and company.
289            *
290            * @param uuid the UUID of the repositories
291            * @param companyId the primary key of the company
292            * @param start the lower bound of the range of repositories
293            * @param end the upper bound of the range of repositories (not inclusive)
294            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
295            * @return the range of matching repositories, or an empty list if no matches were found
296            */
297            public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
298                    java.lang.String uuid, long companyId, int start, int end,
299                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Repository> orderByComparator) {
300                    return getService()
301                                       .getRepositoriesByUuidAndCompanyId(uuid, companyId, start,
302                            end, orderByComparator);
303            }
304    
305            /**
306            * Returns the number of repositories.
307            *
308            * @return the number of repositories
309            */
310            public static int getRepositoriesCount() {
311                    return getService().getRepositoriesCount();
312            }
313    
314            public static com.liferay.portal.model.Repository getRepository(
315                    long groupId, java.lang.String name, java.lang.String portletId)
316                    throws com.liferay.portal.kernel.exception.PortalException {
317                    return getService().getRepository(groupId, name, portletId);
318            }
319    
320            public static com.liferay.portal.model.Repository getRepository(
321                    long groupId, java.lang.String portletId)
322                    throws com.liferay.portal.kernel.exception.PortalException {
323                    return getService().getRepository(groupId, portletId);
324            }
325    
326            /**
327            * Returns the repository with the primary key.
328            *
329            * @param repositoryId the primary key of the repository
330            * @return the repository
331            * @throws PortalException if a repository with the primary key could not be found
332            */
333            public static com.liferay.portal.model.Repository getRepository(
334                    long repositoryId)
335                    throws com.liferay.portal.kernel.exception.PortalException {
336                    return getService().getRepository(repositoryId);
337            }
338    
339            /**
340            * Returns the repository matching the UUID and group.
341            *
342            * @param uuid the repository's UUID
343            * @param groupId the primary key of the group
344            * @return the matching repository
345            * @throws PortalException if a matching repository could not be found
346            */
347            public static com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId(
348                    java.lang.String uuid, long groupId)
349                    throws com.liferay.portal.kernel.exception.PortalException {
350                    return getService().getRepositoryByUuidAndGroupId(uuid, groupId);
351            }
352    
353            public static com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
354                    long repositoryId)
355                    throws com.liferay.portal.kernel.exception.PortalException {
356                    return getService().getTypeSettingsProperties(repositoryId);
357            }
358    
359            /**
360            * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
361            *
362            * @param repository the repository
363            * @return the repository that was updated
364            */
365            public static com.liferay.portal.model.Repository updateRepository(
366                    com.liferay.portal.model.Repository repository) {
367                    return getService().updateRepository(repository);
368            }
369    
370            public static void updateRepository(long repositoryId,
371                    java.lang.String name, java.lang.String description)
372                    throws com.liferay.portal.kernel.exception.PortalException {
373                    getService().updateRepository(repositoryId, name, description);
374            }
375    
376            public static void updateRepository(long repositoryId,
377                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties)
378                    throws com.liferay.portal.kernel.exception.PortalException {
379                    getService().updateRepository(repositoryId, typeSettingsProperties);
380            }
381    
382            public static RepositoryLocalService getService() {
383                    if (_service == null) {
384                            _service = (RepositoryLocalService)PortalBeanLocatorUtil.locate(RepositoryLocalService.class.getName());
385    
386                            ReferenceRegistry.registerReference(RepositoryLocalServiceUtil.class,
387                                    "_service");
388                    }
389    
390                    return _service;
391            }
392    
393            private static RepositoryLocalService _service;
394    }