001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
082                    long folderId)
083                    throws com.liferay.portal.kernel.exception.PortalException,
084                            com.liferay.portal.kernel.exception.SystemException {
085                    return getService().getFolder(folderId);
086            }
087    
088            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
089                    long groupId, long parentFolderId, java.lang.String name)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException {
092                    return getService().getFolder(groupId, parentFolderId, name);
093            }
094    
095            public static long[] getFolderIds(long groupId, long folderId)
096                    throws com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getFolderIds(groupId, folderId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
101                    long groupId, long parentFolderId, boolean includeMountfolders,
102                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
103                    throws com.liferay.portal.kernel.exception.SystemException {
104                    return getService()
105                                       .getFolders(groupId, parentFolderId, includeMountfolders,
106                            start, end, obc);
107            }
108    
109            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
110                    long groupId, long parentFolderId, int start, int end,
111                    com.liferay.portal.kernel.util.OrderByComparator obc)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService().getFolders(groupId, parentFolderId, start, end, obc);
114            }
115    
116            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
117                    long groupId, long folderId, int status, boolean includeMountFolders,
118                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
119                    throws com.liferay.portal.kernel.exception.SystemException {
120                    return getService()
121                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
122                            status, includeMountFolders, start, end, obc);
123            }
124    
125            public static int getFoldersAndFileEntriesAndFileShortcuts(long groupId,
126                    long folderId, int status, java.lang.String[] mimeTypes,
127                    boolean includeMountFolders)
128                    throws com.liferay.portal.kernel.exception.SystemException {
129                    return getService()
130                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
131                            status, mimeTypes, includeMountFolders);
132            }
133    
134            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
135                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
136                    boolean includeMountFolders, int start, int end,
137                    com.liferay.portal.kernel.util.OrderByComparator obc)
138                    throws com.liferay.portal.kernel.exception.SystemException {
139                    return getService()
140                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
141                            status, mimeTypes, includeMountFolders, start, end, obc);
142            }
143    
144            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
145                    long groupId, long folderId, int status, boolean includeMountFolders)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    return getService()
148                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
149                            folderId, status, includeMountFolders);
150            }
151    
152            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
153                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
154                    boolean includeMountFolders)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getService()
157                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
158                            folderId, status, mimeTypes, includeMountFolders);
159            }
160    
161            public static int getFoldersCount(long groupId, long parentFolderId)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getService().getFoldersCount(groupId, parentFolderId);
164            }
165    
166            public static int getFoldersCount(long groupId, long parentFolderId,
167                    boolean includeMountfolders)
168                    throws com.liferay.portal.kernel.exception.SystemException {
169                    return getService()
170                                       .getFoldersCount(groupId, parentFolderId, includeMountfolders);
171            }
172    
173            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getMountFolders(
174                    long groupId, long parentFolderId, int start, int end,
175                    com.liferay.portal.kernel.util.OrderByComparator obc)
176                    throws com.liferay.portal.kernel.exception.SystemException {
177                    return getService()
178                                       .getMountFolders(groupId, parentFolderId, start, end, obc);
179            }
180    
181            public static int getMountFoldersCount(long groupId, long parentFolderId)
182                    throws com.liferay.portal.kernel.exception.SystemException {
183                    return getService().getMountFoldersCount(groupId, parentFolderId);
184            }
185    
186            public static void getSubfolderIds(
187                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
188                    throws com.liferay.portal.kernel.exception.SystemException {
189                    getService().getSubfolderIds(folderIds, groupId, folderId);
190            }
191    
192            public static java.util.List<java.lang.Long> getSubfolderIds(long groupId,
193                    long folderId, boolean recurse)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getService().getSubfolderIds(groupId, folderId, recurse);
196            }
197    
198            public static boolean hasFolderLock(long folderId)
199                    throws com.liferay.portal.kernel.exception.PortalException,
200                            com.liferay.portal.kernel.exception.SystemException {
201                    return getService().hasFolderLock(folderId);
202            }
203    
204            public static boolean hasInheritableLock(long folderId)
205                    throws com.liferay.portal.kernel.exception.PortalException,
206                            com.liferay.portal.kernel.exception.SystemException {
207                    return getService().hasInheritableLock(folderId);
208            }
209    
210            public static boolean isFolderLocked(long folderId)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getService().isFolderLocked(folderId);
213            }
214    
215            public static com.liferay.portal.model.Lock lockFolder(long folderId)
216                    throws com.liferay.portal.kernel.exception.PortalException,
217                            com.liferay.portal.kernel.exception.SystemException {
218                    return getService().lockFolder(folderId);
219            }
220    
221            public static com.liferay.portal.model.Lock lockFolder(long folderId,
222                    java.lang.String owner, boolean inheritable, long expirationTime)
223                    throws com.liferay.portal.kernel.exception.PortalException,
224                            com.liferay.portal.kernel.exception.SystemException {
225                    return getService()
226                                       .lockFolder(folderId, owner, inheritable, expirationTime);
227            }
228    
229            public static com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
230                    long folderId, long parentFolderId,
231                    com.liferay.portal.service.ServiceContext serviceContext)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException {
234                    return getService().moveFolder(folderId, parentFolderId, serviceContext);
235            }
236    
237            public static com.liferay.portal.model.Lock refreshFolderLock(
238                    java.lang.String lockUuid, long expirationTime)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException {
241                    return getService().refreshFolderLock(lockUuid, expirationTime);
242            }
243    
244            public static void unlockFolder(long groupId, long folderId,
245                    java.lang.String lockUuid)
246                    throws com.liferay.portal.kernel.exception.PortalException,
247                            com.liferay.portal.kernel.exception.SystemException {
248                    getService().unlockFolder(groupId, folderId, lockUuid);
249            }
250    
251            public static void unlockFolder(long groupId, long parentFolderId,
252                    java.lang.String name, java.lang.String lockUuid)
253                    throws com.liferay.portal.kernel.exception.PortalException,
254                            com.liferay.portal.kernel.exception.SystemException {
255                    getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
256            }
257    
258            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
259                    long folderId, java.lang.String name, java.lang.String description,
260                    long defaultFileEntryTypeId,
261                    java.util.List<java.lang.Long> fileEntryTypeIds,
262                    boolean overrideFileEntryTypes,
263                    com.liferay.portal.service.ServiceContext serviceContext)
264                    throws com.liferay.portal.kernel.exception.PortalException,
265                            com.liferay.portal.kernel.exception.SystemException {
266                    return getService()
267                                       .updateFolder(folderId, name, description,
268                            defaultFileEntryTypeId, fileEntryTypeIds, overrideFileEntryTypes,
269                            serviceContext);
270            }
271    
272            public static boolean verifyInheritableLock(long folderId,
273                    java.lang.String lockUuid)
274                    throws com.liferay.portal.kernel.exception.PortalException,
275                            com.liferay.portal.kernel.exception.SystemException {
276                    return getService().verifyInheritableLock(folderId, lockUuid);
277            }
278    
279            public static DLFolderService getService() {
280                    if (_service == null) {
281                            _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
282    
283                            ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
284                                    "_service");
285                            MethodCache.remove(DLFolderService.class);
286                    }
287    
288                    return _service;
289            }
290    
291            public void setService(DLFolderService service) {
292                    MethodCache.remove(DLFolderService.class);
293    
294                    _service = service;
295    
296                    ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
297                            "_service");
298                    MethodCache.remove(DLFolderService.class);
299            }
300    
301            private static DLFolderService _service;
302    }