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            /**
071            * Returns the Spring bean ID for this bean.
072            *
073            * @return the Spring bean ID for this bean
074            */
075            public static java.lang.String getBeanIdentifier() {
076                    return getService().getBeanIdentifier();
077            }
078    
079            public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
080                    long groupId, long folderId, int status, int start, int end)
081                    throws com.liferay.portal.kernel.exception.PortalException {
082                    return getService()
083                                       .getFileEntriesAndFileShortcuts(groupId, folderId, status,
084                            start, end);
085            }
086    
087            public static int getFileEntriesAndFileShortcutsCount(long groupId,
088                    long folderId, int status)
089                    throws com.liferay.portal.kernel.exception.PortalException {
090                    return getService()
091                                       .getFileEntriesAndFileShortcutsCount(groupId, folderId,
092                            status);
093            }
094    
095            public static int getFileEntriesAndFileShortcutsCount(long groupId,
096                    long folderId, int status, java.lang.String[] mimeTypes)
097                    throws com.liferay.portal.kernel.exception.PortalException {
098                    return getService()
099                                       .getFileEntriesAndFileShortcutsCount(groupId, folderId,
100                            status, mimeTypes);
101            }
102    
103            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
104                    long folderId)
105                    throws com.liferay.portal.kernel.exception.PortalException {
106                    return getService().getFolder(folderId);
107            }
108    
109            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
110                    long groupId, long parentFolderId, java.lang.String name)
111                    throws com.liferay.portal.kernel.exception.PortalException {
112                    return getService().getFolder(groupId, parentFolderId, name);
113            }
114    
115            public static java.util.List<java.lang.Long> getFolderIds(long groupId,
116                    long folderId)
117                    throws com.liferay.portal.kernel.exception.PortalException {
118                    return getService().getFolderIds(groupId, folderId);
119            }
120    
121            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
122                    long groupId, long parentFolderId, int start, int end,
123                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFolder> obc)
124                    throws com.liferay.portal.kernel.exception.PortalException {
125                    return getService().getFolders(groupId, parentFolderId, start, end, obc);
126            }
127    
128            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
129                    long groupId, long parentFolderId, int status,
130                    boolean includeMountfolders, int start, int end,
131                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFolder> obc)
132                    throws com.liferay.portal.kernel.exception.PortalException {
133                    return getService()
134                                       .getFolders(groupId, parentFolderId, status,
135                            includeMountfolders, start, end, obc);
136            }
137    
138            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
139                    long groupId, long folderId, int status, boolean includeMountFolders,
140                    int start, int end,
141                    com.liferay.portal.kernel.util.OrderByComparator<?> obc)
142                    throws com.liferay.portal.kernel.exception.PortalException {
143                    return getService()
144                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
145                            status, includeMountFolders, start, end, obc);
146            }
147    
148            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
149                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
150                    boolean includeMountFolders, int start, int end,
151                    com.liferay.portal.kernel.util.OrderByComparator<?> obc)
152                    throws com.liferay.portal.kernel.exception.PortalException {
153                    return getService()
154                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
155                            status, mimeTypes, includeMountFolders, start, end, obc);
156            }
157    
158            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
159                    long groupId, long folderId, int status, boolean includeMountFolders)
160                    throws com.liferay.portal.kernel.exception.PortalException {
161                    return getService()
162                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
163                            folderId, status, includeMountFolders);
164            }
165    
166            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
167                    long groupId, long folderId, int status, java.lang.String[] mimeTypes,
168                    boolean includeMountFolders)
169                    throws com.liferay.portal.kernel.exception.PortalException {
170                    return getService()
171                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
172                            folderId, status, mimeTypes, includeMountFolders);
173            }
174    
175            public static int getFoldersCount(long groupId, long parentFolderId)
176                    throws com.liferay.portal.kernel.exception.PortalException {
177                    return getService().getFoldersCount(groupId, parentFolderId);
178            }
179    
180            public static int getFoldersCount(long groupId, long parentFolderId,
181                    int status, boolean includeMountfolders)
182                    throws com.liferay.portal.kernel.exception.PortalException {
183                    return getService()
184                                       .getFoldersCount(groupId, parentFolderId, status,
185                            includeMountfolders);
186            }
187    
188            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getMountFolders(
189                    long groupId, long parentFolderId, int start, int end,
190                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFolder> obc)
191                    throws com.liferay.portal.kernel.exception.PortalException {
192                    return getService()
193                                       .getMountFolders(groupId, parentFolderId, start, end, obc);
194            }
195    
196            public static int getMountFoldersCount(long groupId, long parentFolderId)
197                    throws com.liferay.portal.kernel.exception.PortalException {
198                    return getService().getMountFoldersCount(groupId, parentFolderId);
199            }
200    
201            /**
202            * @deprecated As of 7.0.0, replaced by {@link #getSubfolderIds(List, long,
203            long, boolean)}
204            */
205            @Deprecated
206            public static void getSubfolderIds(
207                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
208                    throws com.liferay.portal.kernel.exception.PortalException {
209                    getService().getSubfolderIds(folderIds, groupId, folderId);
210            }
211    
212            public static void getSubfolderIds(
213                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId,
214                    boolean recurse)
215                    throws com.liferay.portal.kernel.exception.PortalException {
216                    getService().getSubfolderIds(folderIds, groupId, folderId, recurse);
217            }
218    
219            public static java.util.List<java.lang.Long> getSubfolderIds(long groupId,
220                    long folderId, boolean recurse)
221                    throws com.liferay.portal.kernel.exception.PortalException {
222                    return getService().getSubfolderIds(groupId, folderId, recurse);
223            }
224    
225            public static boolean hasFolderLock(long folderId)
226                    throws com.liferay.portal.kernel.exception.PortalException {
227                    return getService().hasFolderLock(folderId);
228            }
229    
230            public static boolean hasInheritableLock(long folderId)
231                    throws com.liferay.portal.kernel.exception.PortalException {
232                    return getService().hasInheritableLock(folderId);
233            }
234    
235            public static boolean isFolderLocked(long folderId) {
236                    return getService().isFolderLocked(folderId);
237            }
238    
239            public static com.liferay.portal.kernel.lock.Lock lockFolder(long folderId)
240                    throws com.liferay.portal.kernel.exception.PortalException {
241                    return getService().lockFolder(folderId);
242            }
243    
244            public static com.liferay.portal.kernel.lock.Lock lockFolder(
245                    long folderId, java.lang.String owner, boolean inheritable,
246                    long expirationTime)
247                    throws com.liferay.portal.kernel.exception.PortalException {
248                    return getService()
249                                       .lockFolder(folderId, owner, inheritable, expirationTime);
250            }
251    
252            public static com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
253                    long folderId, long parentFolderId,
254                    com.liferay.portal.service.ServiceContext serviceContext)
255                    throws com.liferay.portal.kernel.exception.PortalException {
256                    return getService().moveFolder(folderId, parentFolderId, serviceContext);
257            }
258    
259            public static com.liferay.portal.kernel.lock.Lock refreshFolderLock(
260                    java.lang.String lockUuid, long companyId, long expirationTime)
261                    throws com.liferay.portal.kernel.exception.PortalException {
262                    return getService()
263                                       .refreshFolderLock(lockUuid, companyId, expirationTime);
264            }
265    
266            /**
267            * Sets the Spring bean ID for this bean.
268            *
269            * @param beanIdentifier the Spring bean ID for this bean
270            */
271            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
272                    getService().setBeanIdentifier(beanIdentifier);
273            }
274    
275            public static void unlockFolder(long folderId, java.lang.String lockUuid)
276                    throws com.liferay.portal.kernel.exception.PortalException {
277                    getService().unlockFolder(folderId, lockUuid);
278            }
279    
280            public static void unlockFolder(long groupId, long parentFolderId,
281                    java.lang.String name, java.lang.String lockUuid)
282                    throws com.liferay.portal.kernel.exception.PortalException {
283                    getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
284            }
285    
286            /**
287            * @deprecated As of 7.0.0, replaced by more general {@link
288            #updateFolder(long, String, String, long, List, int,
289            ServiceContext)}
290            */
291            @Deprecated
292            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
293                    long folderId, java.lang.String name, java.lang.String description,
294                    long defaultFileEntryTypeId,
295                    java.util.List<java.lang.Long> fileEntryTypeIds,
296                    boolean overrideFileEntryTypes,
297                    com.liferay.portal.service.ServiceContext serviceContext)
298                    throws com.liferay.portal.kernel.exception.PortalException {
299                    return getService()
300                                       .updateFolder(folderId, name, description,
301                            defaultFileEntryTypeId, fileEntryTypeIds, overrideFileEntryTypes,
302                            serviceContext);
303            }
304    
305            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
306                    long folderId, java.lang.String name, java.lang.String description,
307                    long defaultFileEntryTypeId,
308                    java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
309                    com.liferay.portal.service.ServiceContext serviceContext)
310                    throws com.liferay.portal.kernel.exception.PortalException {
311                    return getService()
312                                       .updateFolder(folderId, name, description,
313                            defaultFileEntryTypeId, fileEntryTypeIds, restrictionType,
314                            serviceContext);
315            }
316    
317            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
318                    long folderId, long parentFolderId, java.lang.String name,
319                    java.lang.String description, long defaultFileEntryTypeId,
320                    java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
321                    com.liferay.portal.service.ServiceContext serviceContext)
322                    throws com.liferay.portal.kernel.exception.PortalException {
323                    return getService()
324                                       .updateFolder(folderId, parentFolderId, name, description,
325                            defaultFileEntryTypeId, fileEntryTypeIds, restrictionType,
326                            serviceContext);
327            }
328    
329            public static boolean verifyInheritableLock(long folderId,
330                    java.lang.String lockUuid)
331                    throws com.liferay.portal.kernel.exception.PortalException {
332                    return getService().verifyInheritableLock(folderId, lockUuid);
333            }
334    
335            public static DLFolderService getService() {
336                    if (_service == null) {
337                            _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
338    
339                            ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
340                                    "_service");
341                    }
342    
343                    return _service;
344            }
345    
346            /**
347             * @deprecated As of 6.2.0
348             */
349            @Deprecated
350            public void setService(DLFolderService service) {
351            }
352    
353            private static DLFolderService _service;
354    }