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            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
259                    return getService().getIndexableActionableDynamicQuery();
260            }
261    
262            /**
263            * Returns the OSGi service identifier.
264            *
265            * @return the OSGi service identifier
266            */
267            public static java.lang.String getOSGiServiceIdentifier() {
268                    return getService().getOSGiServiceIdentifier();
269            }
270    
271            public static com.liferay.portal.model.PersistedModel getPersistedModel(
272                    java.io.Serializable primaryKeyObj)
273                    throws com.liferay.portal.kernel.exception.PortalException {
274                    return getService().getPersistedModel(primaryKeyObj);
275            }
276    
277            /**
278            * Returns a range of all the repositories.
279            *
280            * <p>
281            * 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.
282            * </p>
283            *
284            * @param start the lower bound of the range of repositories
285            * @param end the upper bound of the range of repositories (not inclusive)
286            * @return the range of repositories
287            */
288            public static java.util.List<com.liferay.portal.model.Repository> getRepositories(
289                    int start, int end) {
290                    return getService().getRepositories(start, end);
291            }
292    
293            /**
294            * Returns all the repositories matching the UUID and company.
295            *
296            * @param uuid the UUID of the repositories
297            * @param companyId the primary key of the company
298            * @return the matching repositories, or an empty list if no matches were found
299            */
300            public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
301                    java.lang.String uuid, long companyId) {
302                    return getService().getRepositoriesByUuidAndCompanyId(uuid, companyId);
303            }
304    
305            /**
306            * Returns a range of repositories matching the UUID and company.
307            *
308            * @param uuid the UUID of the repositories
309            * @param companyId the primary key of the company
310            * @param start the lower bound of the range of repositories
311            * @param end the upper bound of the range of repositories (not inclusive)
312            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
313            * @return the range of matching repositories, or an empty list if no matches were found
314            */
315            public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
316                    java.lang.String uuid, long companyId, int start, int end,
317                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Repository> orderByComparator) {
318                    return getService()
319                                       .getRepositoriesByUuidAndCompanyId(uuid, companyId, start,
320                            end, orderByComparator);
321            }
322    
323            /**
324            * Returns the number of repositories.
325            *
326            * @return the number of repositories
327            */
328            public static int getRepositoriesCount() {
329                    return getService().getRepositoriesCount();
330            }
331    
332            public static com.liferay.portal.model.Repository getRepository(
333                    long groupId, java.lang.String name, java.lang.String portletId)
334                    throws com.liferay.portal.kernel.exception.PortalException {
335                    return getService().getRepository(groupId, name, portletId);
336            }
337    
338            public static com.liferay.portal.model.Repository getRepository(
339                    long groupId, java.lang.String portletId)
340                    throws com.liferay.portal.kernel.exception.PortalException {
341                    return getService().getRepository(groupId, portletId);
342            }
343    
344            /**
345            * Returns the repository with the primary key.
346            *
347            * @param repositoryId the primary key of the repository
348            * @return the repository
349            * @throws PortalException if a repository with the primary key could not be found
350            */
351            public static com.liferay.portal.model.Repository getRepository(
352                    long repositoryId)
353                    throws com.liferay.portal.kernel.exception.PortalException {
354                    return getService().getRepository(repositoryId);
355            }
356    
357            /**
358            * Returns the repository matching the UUID and group.
359            *
360            * @param uuid the repository's UUID
361            * @param groupId the primary key of the group
362            * @return the matching repository
363            * @throws PortalException if a matching repository could not be found
364            */
365            public static com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId(
366                    java.lang.String uuid, long groupId)
367                    throws com.liferay.portal.kernel.exception.PortalException {
368                    return getService().getRepositoryByUuidAndGroupId(uuid, groupId);
369            }
370    
371            public static com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
372                    long repositoryId)
373                    throws com.liferay.portal.kernel.exception.PortalException {
374                    return getService().getTypeSettingsProperties(repositoryId);
375            }
376    
377            /**
378            * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
379            *
380            * @param repository the repository
381            * @return the repository that was updated
382            */
383            public static com.liferay.portal.model.Repository updateRepository(
384                    com.liferay.portal.model.Repository repository) {
385                    return getService().updateRepository(repository);
386            }
387    
388            public static void updateRepository(long repositoryId,
389                    java.lang.String name, java.lang.String description)
390                    throws com.liferay.portal.kernel.exception.PortalException {
391                    getService().updateRepository(repositoryId, name, description);
392            }
393    
394            public static void updateRepository(long repositoryId,
395                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties)
396                    throws com.liferay.portal.kernel.exception.PortalException {
397                    getService().updateRepository(repositoryId, typeSettingsProperties);
398            }
399    
400            public static RepositoryLocalService getService() {
401                    if (_service == null) {
402                            _service = (RepositoryLocalService)PortalBeanLocatorUtil.locate(RepositoryLocalService.class.getName());
403    
404                            ReferenceRegistry.registerReference(RepositoryLocalServiceUtil.class,
405                                    "_service");
406                    }
407    
408                    return _service;
409            }
410    
411            private static RepositoryLocalService _service;
412    }