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.model.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.model.Lock lockFolder(long folderId,
245                    java.lang.String owner, boolean inheritable, long expirationTime)
246                    throws com.liferay.portal.kernel.exception.PortalException {
247                    return getService()
248                                       .lockFolder(folderId, owner, inheritable, expirationTime);
249            }
250    
251            public static com.liferay.portlet.documentlibrary.model.DLFolder moveFolder(
252                    long folderId, long parentFolderId,
253                    com.liferay.portal.service.ServiceContext serviceContext)
254                    throws com.liferay.portal.kernel.exception.PortalException {
255                    return getService().moveFolder(folderId, parentFolderId, serviceContext);
256            }
257    
258            public static com.liferay.portal.model.Lock refreshFolderLock(
259                    java.lang.String lockUuid, long companyId, long expirationTime)
260                    throws com.liferay.portal.kernel.exception.PortalException {
261                    return getService()
262                                       .refreshFolderLock(lockUuid, companyId, expirationTime);
263            }
264    
265            /**
266            * Sets the Spring bean ID for this bean.
267            *
268            * @param beanIdentifier the Spring bean ID for this bean
269            */
270            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
271                    getService().setBeanIdentifier(beanIdentifier);
272            }
273    
274            public static void unlockFolder(long folderId, java.lang.String lockUuid)
275                    throws com.liferay.portal.kernel.exception.PortalException {
276                    getService().unlockFolder(folderId, lockUuid);
277            }
278    
279            public static void unlockFolder(long groupId, long parentFolderId,
280                    java.lang.String name, java.lang.String lockUuid)
281                    throws com.liferay.portal.kernel.exception.PortalException {
282                    getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
283            }
284    
285            /**
286            * @deprecated As of 7.0.0, replaced by more general {@link
287            #updateFolder(long, String, String, long, List, int,
288            ServiceContext)}
289            */
290            @Deprecated
291            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
292                    long folderId, java.lang.String name, java.lang.String description,
293                    long defaultFileEntryTypeId,
294                    java.util.List<java.lang.Long> fileEntryTypeIds,
295                    boolean overrideFileEntryTypes,
296                    com.liferay.portal.service.ServiceContext serviceContext)
297                    throws com.liferay.portal.kernel.exception.PortalException {
298                    return getService()
299                                       .updateFolder(folderId, name, description,
300                            defaultFileEntryTypeId, fileEntryTypeIds, overrideFileEntryTypes,
301                            serviceContext);
302            }
303    
304            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
305                    long folderId, java.lang.String name, java.lang.String description,
306                    long defaultFileEntryTypeId,
307                    java.util.List<java.lang.Long> fileEntryTypeIds, int restrictionType,
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, restrictionType,
313                            serviceContext);
314            }
315    
316            public static boolean verifyInheritableLock(long folderId,
317                    java.lang.String lockUuid)
318                    throws com.liferay.portal.kernel.exception.PortalException {
319                    return getService().verifyInheritableLock(folderId, lockUuid);
320            }
321    
322            public static DLFolderService getService() {
323                    if (_service == null) {
324                            _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
325    
326                            ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
327                                    "_service");
328                    }
329    
330                    return _service;
331            }
332    
333            /**
334             * @deprecated As of 6.2.0
335             */
336            @Deprecated
337            public void setService(DLFolderService service) {
338            }
339    
340            private static DLFolderService _service;
341    }