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, java.lang.String[] mimeTypes,
161                    boolean includeMountFolders,
162                    com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition)
163                    throws com.liferay.portal.kernel.exception.PortalException {
164                    return getService()
165                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
166                            folderId, mimeTypes, includeMountFolders, queryDefinition);
167            }
168    
169            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
170                    long groupId, long folderId, int status, boolean includeMountFolders)
171                    throws com.liferay.portal.kernel.exception.PortalException {
172                    return getService()
173                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
174                            folderId, status, includeMountFolders);
175            }
176    
177            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
178                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
179                    boolean includeMountFolders)
180                    throws com.liferay.portal.kernel.exception.PortalException {
181                    return getService()
182                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
183                            folderId, status, mimeTypes, includeMountFolders);
184            }
185    
186            public static int getFoldersCount(long groupId, long parentFolderId)
187                    throws com.liferay.portal.kernel.exception.PortalException {
188                    return getService().getFoldersCount(groupId, parentFolderId);
189            }
190    
191            public static int getFoldersCount(long groupId, long parentFolderId,
192                    int status, boolean includeMountfolders)
193                    throws com.liferay.portal.kernel.exception.PortalException {
194                    return getService()
195                                       .getFoldersCount(groupId, parentFolderId, status,
196                            includeMountfolders);
197            }
198    
199            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getMountFolders(
200                    long groupId, long parentFolderId, int start, int end,
201                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFolder> obc)
202                    throws com.liferay.portal.kernel.exception.PortalException {
203                    return getService()
204                                       .getMountFolders(groupId, parentFolderId, start, end, obc);
205            }
206    
207            public static int getMountFoldersCount(long groupId, long parentFolderId)
208                    throws com.liferay.portal.kernel.exception.PortalException {
209                    return getService().getMountFoldersCount(groupId, parentFolderId);
210            }
211    
212            /**
213            * Returns the OSGi service identifier.
214            *
215            * @return the OSGi service identifier
216            */
217            public static java.lang.String getOSGiServiceIdentifier() {
218                    return getService().getOSGiServiceIdentifier();
219            }
220    
221            /**
222            * @deprecated As of 7.0.0, replaced by {@link #getSubfolderIds(List, long,
223            long, boolean)}
224            */
225            @Deprecated
226            public static void getSubfolderIds(
227                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
228                    throws com.liferay.portal.kernel.exception.PortalException {
229                    getService().getSubfolderIds(folderIds, groupId, folderId);
230            }
231    
232            public static void getSubfolderIds(
233                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId,
234                    boolean recurse)
235                    throws com.liferay.portal.kernel.exception.PortalException {
236                    getService().getSubfolderIds(folderIds, groupId, folderId, recurse);
237            }
238    
239            public static java.util.List<java.lang.Long> getSubfolderIds(long groupId,
240                    long folderId, boolean recurse)
241                    throws com.liferay.portal.kernel.exception.PortalException {
242                    return getService().getSubfolderIds(groupId, folderId, recurse);
243            }
244    
245            public static boolean hasFolderLock(long folderId)
246                    throws com.liferay.portal.kernel.exception.PortalException {
247                    return getService().hasFolderLock(folderId);
248            }
249    
250            public static boolean hasInheritableLock(long folderId)
251                    throws com.liferay.portal.kernel.exception.PortalException {
252                    return getService().hasInheritableLock(folderId);
253            }
254    
255            public static boolean isFolderLocked(long folderId) {
256                    return getService().isFolderLocked(folderId);
257            }
258    
259            public static com.liferay.portal.kernel.lock.Lock lockFolder(long folderId)
260                    throws com.liferay.portal.kernel.exception.PortalException {
261                    return getService().lockFolder(folderId);
262            }
263    
264            public static com.liferay.portal.kernel.lock.Lock lockFolder(
265                    long folderId, java.lang.String owner, boolean inheritable,
266                    long expirationTime)
267                    throws com.liferay.portal.kernel.exception.PortalException {
268                    return getService()
269                                       .lockFolder(folderId, owner, inheritable, expirationTime);
270            }
271    
272            public static com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
273                    long folderId, long parentFolderId,
274                    com.liferay.portal.service.ServiceContext serviceContext)
275                    throws com.liferay.portal.kernel.exception.PortalException {
276                    return getService().moveFolder(folderId, parentFolderId, serviceContext);
277            }
278    
279            public static com.liferay.portal.kernel.lock.Lock refreshFolderLock(
280                    java.lang.String lockUuid, long companyId, long expirationTime)
281                    throws com.liferay.portal.kernel.exception.PortalException {
282                    return getService()
283                                       .refreshFolderLock(lockUuid, companyId, expirationTime);
284            }
285    
286            public static void unlockFolder(long folderId, java.lang.String lockUuid)
287                    throws com.liferay.portal.kernel.exception.PortalException {
288                    getService().unlockFolder(folderId, lockUuid);
289            }
290    
291            public static void unlockFolder(long groupId, long parentFolderId,
292                    java.lang.String name, java.lang.String lockUuid)
293                    throws com.liferay.portal.kernel.exception.PortalException {
294                    getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
295            }
296    
297            /**
298            * @deprecated As of 7.0.0, replaced by more general {@link
299            #updateFolder(long, String, String, long, List, int,
300            ServiceContext)}
301            */
302            @Deprecated
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                    return getService()
311                                       .updateFolder(folderId, name, description,
312                            defaultFileEntryTypeId, fileEntryTypeIds, overrideFileEntryTypes,
313                            serviceContext);
314            }
315    
316            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
317                    long folderId, java.lang.String name, java.lang.String description,
318                    long defaultFileEntryTypeId,
319                    java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
320                    com.liferay.portal.service.ServiceContext serviceContext)
321                    throws com.liferay.portal.kernel.exception.PortalException {
322                    return getService()
323                                       .updateFolder(folderId, name, description,
324                            defaultFileEntryTypeId, fileEntryTypeIds, restrictionType,
325                            serviceContext);
326            }
327    
328            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
329                    long folderId, long parentFolderId, java.lang.String name,
330                    java.lang.String description, long defaultFileEntryTypeId,
331                    java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
332                    com.liferay.portal.service.ServiceContext serviceContext)
333                    throws com.liferay.portal.kernel.exception.PortalException {
334                    return getService()
335                                       .updateFolder(folderId, parentFolderId, name, description,
336                            defaultFileEntryTypeId, fileEntryTypeIds, restrictionType,
337                            serviceContext);
338            }
339    
340            public static boolean verifyInheritableLock(long folderId,
341                    java.lang.String lockUuid)
342                    throws com.liferay.portal.kernel.exception.PortalException {
343                    return getService().verifyInheritableLock(folderId, lockUuid);
344            }
345    
346            public static DLFolderService getService() {
347                    if (_service == null) {
348                            _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
349    
350                            ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
351                                    "_service");
352                    }
353    
354                    return _service;
355            }
356    
357            private static DLFolderService _service;
358    }