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.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 long[] getFolderIds(long groupId, long folderId)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException {
131                    return getService().getFolderIds(groupId, folderId);
132            }
133    
134            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
135                    long groupId, long parentFolderId, int status,
136                    boolean includeMountfolders, int start, int end,
137                    com.liferay.portal.kernel.util.OrderByComparator obc)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    return getService()
141                                       .getFolders(groupId, parentFolderId, status,
142                            includeMountfolders, start, end, obc);
143            }
144    
145            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
146                    long groupId, long parentFolderId, int start, int end,
147                    com.liferay.portal.kernel.util.OrderByComparator obc)
148                    throws com.liferay.portal.kernel.exception.PortalException,
149                            com.liferay.portal.kernel.exception.SystemException {
150                    return getService().getFolders(groupId, parentFolderId, start, end, obc);
151            }
152    
153            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
154                    long groupId, long folderId, int status, boolean includeMountFolders,
155                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
156                    throws com.liferay.portal.kernel.exception.PortalException,
157                            com.liferay.portal.kernel.exception.SystemException {
158                    return getService()
159                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
160                            status, includeMountFolders, start, end, obc);
161            }
162    
163            public static int getFoldersAndFileEntriesAndFileShortcuts(long groupId,
164                    long folderId, int status, java.lang.String[] mimeTypes,
165                    boolean includeMountFolders)
166                    throws com.liferay.portal.kernel.exception.PortalException,
167                            com.liferay.portal.kernel.exception.SystemException {
168                    return getService()
169                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
170                            status, mimeTypes, includeMountFolders);
171            }
172    
173            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
174                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
175                    boolean includeMountFolders, int start, int end,
176                    com.liferay.portal.kernel.util.OrderByComparator obc)
177                    throws com.liferay.portal.kernel.exception.PortalException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    return getService()
180                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
181                            status, mimeTypes, includeMountFolders, start, end, obc);
182            }
183    
184            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
185                    long groupId, long folderId, int status, boolean includeMountFolders)
186                    throws com.liferay.portal.kernel.exception.SystemException {
187                    return getService()
188                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
189                            folderId, status, includeMountFolders);
190            }
191    
192            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
193                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
194                    boolean includeMountFolders)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getService()
197                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
198                            folderId, status, mimeTypes, includeMountFolders);
199            }
200    
201            public static int getFoldersCount(long groupId, long parentFolderId)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getService().getFoldersCount(groupId, parentFolderId);
204            }
205    
206            public static int getFoldersCount(long groupId, long parentFolderId,
207                    int status, boolean includeMountfolders)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getService()
210                                       .getFoldersCount(groupId, parentFolderId, status,
211                            includeMountfolders);
212            }
213    
214            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getMountFolders(
215                    long groupId, long parentFolderId, int start, int end,
216                    com.liferay.portal.kernel.util.OrderByComparator obc)
217                    throws com.liferay.portal.kernel.exception.PortalException,
218                            com.liferay.portal.kernel.exception.SystemException {
219                    return getService()
220                                       .getMountFolders(groupId, parentFolderId, start, end, obc);
221            }
222    
223            public static int getMountFoldersCount(long groupId, long parentFolderId)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getService().getMountFoldersCount(groupId, parentFolderId);
226            }
227    
228            public static void getSubfolderIds(
229                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
230                    throws com.liferay.portal.kernel.exception.PortalException,
231                            com.liferay.portal.kernel.exception.SystemException {
232                    getService().getSubfolderIds(folderIds, groupId, folderId);
233            }
234    
235            public static java.util.List<java.lang.Long> getSubfolderIds(long groupId,
236                    long folderId, boolean recurse)
237                    throws com.liferay.portal.kernel.exception.PortalException,
238                            com.liferay.portal.kernel.exception.SystemException {
239                    return getService().getSubfolderIds(groupId, folderId, recurse);
240            }
241    
242            public static boolean hasFolderLock(long folderId)
243                    throws com.liferay.portal.kernel.exception.PortalException,
244                            com.liferay.portal.kernel.exception.SystemException {
245                    return getService().hasFolderLock(folderId);
246            }
247    
248            public static boolean hasInheritableLock(long folderId)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException {
251                    return getService().hasInheritableLock(folderId);
252            }
253    
254            public static boolean isFolderLocked(long folderId)
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    return getService().isFolderLocked(folderId);
257            }
258    
259            public static com.liferay.portal.model.Lock lockFolder(long folderId)
260                    throws com.liferay.portal.kernel.exception.PortalException,
261                            com.liferay.portal.kernel.exception.SystemException {
262                    return getService().lockFolder(folderId);
263            }
264    
265            public static com.liferay.portal.model.Lock lockFolder(long folderId,
266                    java.lang.String owner, boolean inheritable, long expirationTime)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    return getService()
270                                       .lockFolder(folderId, owner, inheritable, expirationTime);
271            }
272    
273            public static com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
274                    long folderId, long parentFolderId,
275                    com.liferay.portal.service.ServiceContext serviceContext)
276                    throws com.liferay.portal.kernel.exception.PortalException,
277                            com.liferay.portal.kernel.exception.SystemException {
278                    return getService().moveFolder(folderId, parentFolderId, serviceContext);
279            }
280    
281            public static com.liferay.portal.model.Lock refreshFolderLock(
282                    java.lang.String lockUuid, long companyId, long expirationTime)
283                    throws com.liferay.portal.kernel.exception.PortalException,
284                            com.liferay.portal.kernel.exception.SystemException {
285                    return getService()
286                                       .refreshFolderLock(lockUuid, companyId, expirationTime);
287            }
288    
289            public static void unlockFolder(long groupId, long folderId,
290                    java.lang.String lockUuid)
291                    throws com.liferay.portal.kernel.exception.PortalException,
292                            com.liferay.portal.kernel.exception.SystemException {
293                    getService().unlockFolder(groupId, folderId, lockUuid);
294            }
295    
296            public static void unlockFolder(long groupId, long parentFolderId,
297                    java.lang.String name, java.lang.String lockUuid)
298                    throws com.liferay.portal.kernel.exception.PortalException,
299                            com.liferay.portal.kernel.exception.SystemException {
300                    getService().unlockFolder(groupId, parentFolderId, name, 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
337             */
338            public void setService(DLFolderService service) {
339            }
340    
341            private static DLFolderService _service;
342    }