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