001    /**
002     * Copyright (c) 2000-2010 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link DLFolderService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       DLFolderService
030     * @generated
031     */
032    public class DLFolderServiceUtil {
033            public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
034                    long groupId, long parentFolderId, java.lang.String name,
035                    java.lang.String description,
036                    com.liferay.portal.service.ServiceContext serviceContext)
037                    throws com.liferay.portal.kernel.exception.PortalException,
038                            com.liferay.portal.kernel.exception.SystemException {
039                    return getService()
040                                       .addFolder(groupId, parentFolderId, name, description,
041                            serviceContext);
042            }
043    
044            public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
045                    long groupId, long sourceFolderId, long parentFolderId,
046                    java.lang.String name, java.lang.String description,
047                    com.liferay.portal.service.ServiceContext serviceContext)
048                    throws com.liferay.portal.kernel.exception.PortalException,
049                            com.liferay.portal.kernel.exception.SystemException,
050                            java.rmi.RemoteException {
051                    return getService()
052                                       .copyFolder(groupId, sourceFolderId, parentFolderId, name,
053                            description, serviceContext);
054            }
055    
056            public static void deleteFolder(long folderId)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException,
059                            java.rmi.RemoteException {
060                    getService().deleteFolder(folderId);
061            }
062    
063            public static void deleteFolder(long groupId, long parentFolderId,
064                    java.lang.String name)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException,
067                            java.rmi.RemoteException {
068                    getService().deleteFolder(groupId, parentFolderId, name);
069            }
070    
071            public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
072                    long groupId, java.util.List<java.lang.Long> folderIds, int status,
073                    int start, int end)
074                    throws com.liferay.portal.kernel.exception.SystemException {
075                    return getService()
076                                       .getFileEntriesAndFileShortcuts(groupId, folderIds, status,
077                            start, end);
078            }
079    
080            public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
081                    long groupId, long folderId, int status, int start, int end)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService()
084                                       .getFileEntriesAndFileShortcuts(groupId, folderId, status,
085                            start, end);
086            }
087    
088            public static int getFileEntriesAndFileShortcutsCount(long groupId,
089                    java.util.List<java.lang.Long> folderIds, int status)
090                    throws com.liferay.portal.kernel.exception.SystemException {
091                    return getService()
092                                       .getFileEntriesAndFileShortcutsCount(groupId, folderIds,
093                            status);
094            }
095    
096            public static int getFileEntriesAndFileShortcutsCount(long groupId,
097                    long folderId, int status)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return getService()
100                                       .getFileEntriesAndFileShortcutsCount(groupId, folderId,
101                            status);
102            }
103    
104            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
105                    long folderId)
106                    throws com.liferay.portal.kernel.exception.PortalException,
107                            com.liferay.portal.kernel.exception.SystemException {
108                    return getService().getFolder(folderId);
109            }
110    
111            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
112                    long groupId, long parentFolderId, java.lang.String name)
113                    throws com.liferay.portal.kernel.exception.PortalException,
114                            com.liferay.portal.kernel.exception.SystemException {
115                    return getService().getFolder(groupId, parentFolderId, name);
116            }
117    
118            public static long getFolderId(long groupId, long parentFolderId,
119                    java.lang.String name)
120                    throws com.liferay.portal.kernel.exception.PortalException,
121                            com.liferay.portal.kernel.exception.SystemException {
122                    return getService().getFolderId(groupId, parentFolderId, name);
123            }
124    
125            public static long[] getFolderIds(long groupId, long folderId)
126                    throws com.liferay.portal.kernel.exception.SystemException {
127                    return getService().getFolderIds(groupId, folderId);
128            }
129    
130            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
131                    long groupId, long parentFolderId)
132                    throws com.liferay.portal.kernel.exception.SystemException {
133                    return getService().getFolders(groupId, parentFolderId);
134            }
135    
136            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
137                    long groupId, long parentFolderId, int start, int end)
138                    throws com.liferay.portal.kernel.exception.SystemException {
139                    return getService().getFolders(groupId, parentFolderId, start, end);
140            }
141    
142            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
143                    long groupId, java.util.List<java.lang.Long> folderIds, int status,
144                    int start, int end)
145                    throws com.liferay.portal.kernel.exception.SystemException {
146                    return getService()
147                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId,
148                            folderIds, status, start, end);
149            }
150    
151            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
152                    long groupId, long folderId, int status, int start, int end)
153                    throws com.liferay.portal.kernel.exception.PortalException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getService()
156                                       .getFoldersAndFileEntriesAndFileShortcuts(groupId, folderId,
157                            status, start, end);
158            }
159    
160            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
161                    long groupId, java.util.List<java.lang.Long> folderIds, int status)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getService()
164                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
165                            folderIds, status);
166            }
167    
168            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
169                    long groupId, long folderId, int status)
170                    throws com.liferay.portal.kernel.exception.PortalException,
171                            com.liferay.portal.kernel.exception.SystemException {
172                    return getService()
173                                       .getFoldersAndFileEntriesAndFileShortcutsCount(groupId,
174                            folderId, status);
175            }
176    
177            public static int getFoldersCount(long groupId, long parentFolderId)
178                    throws com.liferay.portal.kernel.exception.SystemException {
179                    return getService().getFoldersCount(groupId, parentFolderId);
180            }
181    
182            public static void getSubfolderIds(
183                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
184                    throws com.liferay.portal.kernel.exception.SystemException {
185                    getService().getSubfolderIds(folderIds, groupId, folderId);
186            }
187    
188            public static boolean hasInheritableLock(long folderId)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException {
191                    return getService().hasInheritableLock(folderId);
192            }
193    
194            public static com.liferay.portal.model.Lock lockFolder(long folderId)
195                    throws com.liferay.portal.kernel.exception.PortalException,
196                            com.liferay.portal.kernel.exception.SystemException,
197                            java.rmi.RemoteException {
198                    return getService().lockFolder(folderId);
199            }
200    
201            public static com.liferay.portal.model.Lock lockFolder(long folderId,
202                    java.lang.String owner, boolean inheritable, long expirationTime)
203                    throws com.liferay.portal.kernel.exception.PortalException,
204                            com.liferay.portal.kernel.exception.SystemException,
205                            java.rmi.RemoteException {
206                    return getService()
207                                       .lockFolder(folderId, owner, inheritable, expirationTime);
208            }
209    
210            public static com.liferay.portal.model.Lock refreshFolderLock(
211                    java.lang.String lockUuid, long expirationTime)
212                    throws com.liferay.portal.kernel.exception.PortalException,
213                            com.liferay.portal.kernel.exception.SystemException {
214                    return getService().refreshFolderLock(lockUuid, expirationTime);
215            }
216    
217            public static void unlockFolder(long groupId, long folderId,
218                    java.lang.String lockUuid)
219                    throws com.liferay.portal.kernel.exception.PortalException,
220                            com.liferay.portal.kernel.exception.SystemException {
221                    getService().unlockFolder(groupId, folderId, lockUuid);
222            }
223    
224            public static void unlockFolder(long groupId, long parentFolderId,
225                    java.lang.String name, java.lang.String lockUuid)
226                    throws com.liferay.portal.kernel.exception.PortalException,
227                            com.liferay.portal.kernel.exception.SystemException {
228                    getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
229            }
230    
231            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
232                    long folderId, long parentFolderId, java.lang.String name,
233                    java.lang.String description,
234                    com.liferay.portal.service.ServiceContext serviceContext)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException,
237                            java.rmi.RemoteException {
238                    return getService()
239                                       .updateFolder(folderId, parentFolderId, name, description,
240                            serviceContext);
241            }
242    
243            public static boolean verifyInheritableLock(long folderId,
244                    java.lang.String lockUuid)
245                    throws com.liferay.portal.kernel.exception.PortalException,
246                            com.liferay.portal.kernel.exception.SystemException {
247                    return getService().verifyInheritableLock(folderId, lockUuid);
248            }
249    
250            public static DLFolderService getService() {
251                    if (_service == null) {
252                            _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
253                    }
254    
255                    return _service;
256            }
257    
258            public void setService(DLFolderService service) {
259                    _service = service;
260            }
261    
262            private static DLFolderService _service;
263    }