1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.documentlibrary.service;
24  
25  
26  /**
27   * <a href="DLFolderServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.documentlibrary.service.DLFolderService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.documentlibrary.service.DLFolderService
45   *
46   */
47  public class DLFolderServiceUtil {
48      public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
49          long groupId, long parentFolderId, java.lang.String name,
50          java.lang.String description,
51          com.liferay.portal.service.ServiceContext serviceContext)
52          throws com.liferay.portal.PortalException,
53              com.liferay.portal.SystemException {
54          return getService()
55                     .addFolder(groupId, parentFolderId, name, description,
56              serviceContext);
57      }
58  
59      public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
60          long groupId, long sourceFolderId, long parentFolderId,
61          java.lang.String name, java.lang.String description,
62          com.liferay.portal.service.ServiceContext serviceContext)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException, java.rmi.RemoteException {
65          return getService()
66                     .copyFolder(groupId, sourceFolderId, parentFolderId, name,
67              description, serviceContext);
68      }
69  
70      public static void deleteFolder(long folderId)
71          throws com.liferay.portal.PortalException,
72              com.liferay.portal.SystemException, java.rmi.RemoteException {
73          getService().deleteFolder(folderId);
74      }
75  
76      public static void deleteFolder(long groupId, long parentFolderId,
77          java.lang.String name)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException, java.rmi.RemoteException {
80          getService().deleteFolder(groupId, parentFolderId, name);
81      }
82  
83      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
84          long folderId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getFolder(folderId);
88      }
89  
90      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
91          long groupId, long parentFolderId, java.lang.String name)
92          throws com.liferay.portal.PortalException,
93              com.liferay.portal.SystemException {
94          return getService().getFolder(groupId, parentFolderId, name);
95      }
96  
97      public static long getFolderId(long groupId, long parentFolderId,
98          java.lang.String name)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException {
101         return getService().getFolderId(groupId, parentFolderId, name);
102     }
103 
104     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
105         long groupId, long parentFolderId)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         return getService().getFolders(groupId, parentFolderId);
109     }
110 
111     public static boolean hasInheritableLock(long folderId)
112         throws com.liferay.portal.PortalException {
113         return getService().hasInheritableLock(folderId);
114     }
115 
116     public static com.liferay.lock.model.Lock lockFolder(long folderId)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException, java.rmi.RemoteException {
119         return getService().lockFolder(folderId);
120     }
121 
122     public static com.liferay.lock.model.Lock lockFolder(long folderId,
123         java.lang.String owner, boolean inheritable, long expirationTime)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException, java.rmi.RemoteException {
126         return getService()
127                    .lockFolder(folderId, owner, inheritable, expirationTime);
128     }
129 
130     public static com.liferay.lock.model.Lock refreshFolderLock(
131         java.lang.String lockUuid, long expirationTime)
132         throws com.liferay.portal.PortalException {
133         return getService().refreshFolderLock(lockUuid, expirationTime);
134     }
135 
136     public static void reIndexSearch(long companyId)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException {
139         getService().reIndexSearch(companyId);
140     }
141 
142     public static void unlockFolder(long folderId, java.lang.String lockUuid)
143         throws com.liferay.portal.PortalException {
144         getService().unlockFolder(folderId, lockUuid);
145     }
146 
147     public static void unlockFolder(long groupId, long parentFolderId,
148         java.lang.String name, java.lang.String lockUuid)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException {
151         getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
152     }
153 
154     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
155         long folderId, long parentFolderId, java.lang.String name,
156         java.lang.String description,
157         com.liferay.portal.service.ServiceContext serviceContext)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException, java.rmi.RemoteException {
160         return getService()
161                    .updateFolder(folderId, parentFolderId, name, description,
162             serviceContext);
163     }
164 
165     public static boolean verifyInheritableLock(long folderId,
166         java.lang.String lockUuid) throws com.liferay.portal.PortalException {
167         return getService().verifyInheritableLock(folderId, lockUuid);
168     }
169 
170     public static DLFolderService getService() {
171         if (_service == null) {
172             throw new RuntimeException("DLFolderService is not set");
173         }
174 
175         return _service;
176     }
177 
178     public void setService(DLFolderService service) {
179         _service = service;
180     }
181 
182     private static DLFolderService _service;
183 }