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