001    /**
002     * Copyright (c) 2000-2013 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.portlet.documentlibrary.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the document library folder remote service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.impl.DLFolderServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
022     *
023     * <p>
024     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see DLFolderService
029     * @see com.liferay.portlet.documentlibrary.service.base.DLFolderServiceBaseImpl
030     * @see com.liferay.portlet.documentlibrary.service.impl.DLFolderServiceImpl
031     * @generated
032     */
033    public class DLFolderServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFolderServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
059                    long groupId, long repositoryId, boolean mountPoint,
060                    long parentFolderId, java.lang.String name,
061                    java.lang.String description,
062                    com.liferay.portal.service.ServiceContext serviceContext)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    return getService()
066                                       .addFolder(groupId, repositoryId, mountPoint,
067                            parentFolderId, name, description, serviceContext);
068            }
069    
070            public static void deleteFolder(long folderId)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    getService().deleteFolder(folderId);
074            }
075    
076            public static void deleteFolder(long folderId, boolean includeTrashedEntries)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    getService().deleteFolder(folderId, includeTrashedEntries);
080            }
081    
082            public static void deleteFolder(long groupId, long parentFolderId,
083                    java.lang.String name)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    getService().deleteFolder(groupId, parentFolderId, name);
087            }
088    
089            public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
090                    long groupId, long folderId, int status, int start, int end)
091                    throws com.liferay.portal.kernel.exception.PortalException,
092                            com.liferay.portal.kernel.exception.SystemException {
093                    return getService()
094                                       .getFileEntriesAndFileShortcuts(groupId, folderId, status,
095                            start, end);
096            }
097    
098            public static int getFileEntriesAndFileShortcutsCount(long groupId,
099                    long folderId, int status)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService()
102                                       .getFileEntriesAndFileShortcutsCount(groupId, folderId,
103                            status);
104            }
105    
106            public static int getFileEntriesAndFileShortcutsCount(long groupId,
107                    long folderId, int status, java.lang.String[] mimeTypes)
108                    throws com.liferay.portal.kernel.exception.SystemException {
109                    return getService()
110                                       .getFileEntriesAndFileShortcutsCount(groupId, folderId,
111                            status, mimeTypes);
112            }
113    
114            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
115                    long folderId)
116                    throws com.liferay.portal.kernel.exception.PortalException,
117                            com.liferay.portal.kernel.exception.SystemException {
118                    return getService().getFolder(folderId);
119            }
120    
121            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
122                    long groupId, long parentFolderId, java.lang.String name)
123                    throws com.liferay.portal.kernel.exception.PortalException,
124                            com.liferay.portal.kernel.exception.SystemException {
125                    return getService().getFolder(groupId, parentFolderId, name);
126            }
127    
128            public static java.util.List<java.lang.Long> getFolderIds(long groupId,
129                    long folderId)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException {
132                    return getService().getFolderIds(groupId, folderId);
133            }
134    
135            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
136                    long groupId, long parentFolderId, int status,
137                    boolean includeMountfolders, int start, int end,
138                    com.liferay.portal.kernel.util.OrderByComparator obc)
139                    throws com.liferay.portal.kernel.exception.PortalException,
140                            com.liferay.portal.kernel.exception.SystemException {
141                    return getService()
142                                       .getFolders(groupId, parentFolderId, status,
143                            includeMountfolders, start, end, obc);
144            }
145    
146            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
147                    long groupId, long parentFolderId, int start, int end,
148                    com.liferay.portal.kernel.util.OrderByComparator obc)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException {
151                    return getService().getFolders(groupId, parentFolderId, start, end, obc);
152            }
153    
154            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
155                    long groupId, long folderId, int status, boolean includeMountFolders,
156                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException {
159                    return getService()
160                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
161                            status, includeMountFolders, start, end, obc);
162            }
163    
164            public static int getFoldersAndFileEntriesAndFileShortcuts(long groupId,
165                    long folderId, int status, java.lang.String[] mimeTypes,
166                    boolean includeMountFolders)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException {
169                    return getService()
170                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
171                            status, mimeTypes, includeMountFolders);
172            }
173    
174            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
175                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
176                    boolean includeMountFolders, int start, int end,
177                    com.liferay.portal.kernel.util.OrderByComparator obc)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getService()
181                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
182                            status, mimeTypes, includeMountFolders, start, end, obc);
183            }
184    
185            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
186                    long groupId, long folderId, int status, boolean includeMountFolders)
187                    throws com.liferay.portal.kernel.exception.SystemException {
188                    return getService()
189                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
190                            folderId, status, includeMountFolders);
191            }
192    
193            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
194                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
195                    boolean includeMountFolders)
196                    throws com.liferay.portal.kernel.exception.SystemException {
197                    return getService()
198                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
199                            folderId, status, mimeTypes, includeMountFolders);
200            }
201    
202            public static int getFoldersCount(long groupId, long parentFolderId)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getService().getFoldersCount(groupId, parentFolderId);
205            }
206    
207            public static int getFoldersCount(long groupId, long parentFolderId,
208                    int status, boolean includeMountfolders)
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return getService()
211                                       .getFoldersCount(groupId, parentFolderId, status,
212                            includeMountfolders);
213            }
214    
215            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getMountFolders(
216                    long groupId, long parentFolderId, int start, int end,
217                    com.liferay.portal.kernel.util.OrderByComparator obc)
218                    throws com.liferay.portal.kernel.exception.PortalException,
219                            com.liferay.portal.kernel.exception.SystemException {
220                    return getService()
221                                       .getMountFolders(groupId, parentFolderId, start, end, obc);
222            }
223    
224            public static int getMountFoldersCount(long groupId, long parentFolderId)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return getService().getMountFoldersCount(groupId, parentFolderId);
227            }
228    
229            public static void getSubfolderIds(
230                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
231                    throws com.liferay.portal.kernel.exception.PortalException,
232                            com.liferay.portal.kernel.exception.SystemException {
233                    getService().getSubfolderIds(folderIds, groupId, folderId);
234            }
235    
236            public static java.util.List<java.lang.Long> getSubfolderIds(long groupId,
237                    long folderId, boolean recurse)
238                    throws com.liferay.portal.kernel.exception.PortalException,
239                            com.liferay.portal.kernel.exception.SystemException {
240                    return getService().getSubfolderIds(groupId, folderId, recurse);
241            }
242    
243            public static boolean hasFolderLock(long folderId)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    return getService().hasFolderLock(folderId);
247            }
248    
249            public static boolean hasInheritableLock(long folderId)
250                    throws com.liferay.portal.kernel.exception.PortalException,
251                            com.liferay.portal.kernel.exception.SystemException {
252                    return getService().hasInheritableLock(folderId);
253            }
254    
255            public static boolean isFolderLocked(long folderId)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    return getService().isFolderLocked(folderId);
258            }
259    
260            public static com.liferay.portal.model.Lock lockFolder(long folderId)
261                    throws com.liferay.portal.kernel.exception.PortalException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    return getService().lockFolder(folderId);
264            }
265    
266            public static com.liferay.portal.model.Lock lockFolder(long folderId,
267                    java.lang.String owner, boolean inheritable, long expirationTime)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException {
270                    return getService()
271                                       .lockFolder(folderId, owner, inheritable, expirationTime);
272            }
273    
274            public static com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
275                    long folderId, long parentFolderId,
276                    com.liferay.portal.service.ServiceContext serviceContext)
277                    throws com.liferay.portal.kernel.exception.PortalException,
278                            com.liferay.portal.kernel.exception.SystemException {
279                    return getService().moveFolder(folderId, parentFolderId, serviceContext);
280            }
281    
282            public static com.liferay.portal.model.Lock refreshFolderLock(
283                    java.lang.String lockUuid, long companyId, long expirationTime)
284                    throws com.liferay.portal.kernel.exception.PortalException,
285                            com.liferay.portal.kernel.exception.SystemException {
286                    return getService()
287                                       .refreshFolderLock(lockUuid, companyId, expirationTime);
288            }
289    
290            public static void unlockFolder(long groupId, long parentFolderId,
291                    java.lang.String name, java.lang.String lockUuid)
292                    throws com.liferay.portal.kernel.exception.PortalException,
293                            com.liferay.portal.kernel.exception.SystemException {
294                    getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
295            }
296    
297            public static void unlockFolder(long folderId, java.lang.String lockUuid)
298                    throws com.liferay.portal.kernel.exception.PortalException,
299                            com.liferay.portal.kernel.exception.SystemException {
300                    getService().unlockFolder(folderId, lockUuid);
301            }
302    
303            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
304                    long folderId, java.lang.String name, java.lang.String description,
305                    long defaultFileEntryTypeId,
306                    java.util.List<java.lang.Long> fileEntryTypeIds,
307                    boolean overrideFileEntryTypes,
308                    com.liferay.portal.service.ServiceContext serviceContext)
309                    throws com.liferay.portal.kernel.exception.PortalException,
310                            com.liferay.portal.kernel.exception.SystemException {
311                    return getService()
312                                       .updateFolder(folderId, name, description,
313                            defaultFileEntryTypeId, fileEntryTypeIds, overrideFileEntryTypes,
314                            serviceContext);
315            }
316    
317            public static boolean verifyInheritableLock(long folderId,
318                    java.lang.String lockUuid)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    return getService().verifyInheritableLock(folderId, lockUuid);
322            }
323    
324            public static DLFolderService getService() {
325                    if (_service == null) {
326                            _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
327    
328                            ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
329                                    "_service");
330                    }
331    
332                    return _service;
333            }
334    
335            /**
336             * @deprecated As of 6.2.0
337             */
338            public void setService(DLFolderService service) {
339            }
340    
341            private static DLFolderService _service;
342    }