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