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