1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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   * {@link DLFolderService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       DLFolderService
44   * @generated
45   */
46  public class DLFolderServiceUtil {
47      public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
48          long groupId, long parentFolderId, java.lang.String name,
49          java.lang.String description,
50          com.liferay.portal.service.ServiceContext serviceContext)
51          throws com.liferay.portal.PortalException,
52              com.liferay.portal.SystemException {
53          return getService()
54                     .addFolder(groupId, parentFolderId, name, description,
55              serviceContext);
56      }
57  
58      public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
59          long groupId, long sourceFolderId, long parentFolderId,
60          java.lang.String name, java.lang.String description,
61          com.liferay.portal.service.ServiceContext serviceContext)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException, java.rmi.RemoteException {
64          return getService()
65                     .copyFolder(groupId, sourceFolderId, parentFolderId, name,
66              description, serviceContext);
67      }
68  
69      public static void deleteFolder(long folderId)
70          throws com.liferay.portal.PortalException,
71              com.liferay.portal.SystemException, java.rmi.RemoteException {
72          getService().deleteFolder(folderId);
73      }
74  
75      public static void deleteFolder(long groupId, long parentFolderId,
76          java.lang.String name)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException, java.rmi.RemoteException {
79          getService().deleteFolder(groupId, parentFolderId, name);
80      }
81  
82      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
83          long folderId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService().getFolder(folderId);
87      }
88  
89      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
90          long groupId, long parentFolderId, java.lang.String name)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException {
93          return getService().getFolder(groupId, parentFolderId, name);
94      }
95  
96      public static long getFolderId(long groupId, long parentFolderId,
97          java.lang.String name)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException {
100         return getService().getFolderId(groupId, parentFolderId, name);
101     }
102 
103     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
104         long groupId, long parentFolderId)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException {
107         return getService().getFolders(groupId, parentFolderId);
108     }
109 
110     public static boolean hasInheritableLock(long folderId)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException {
113         return getService().hasInheritableLock(folderId);
114     }
115 
116     public static com.liferay.portal.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.portal.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.portal.model.Lock refreshFolderLock(
131         java.lang.String lockUuid, long expirationTime)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         return getService().refreshFolderLock(lockUuid, expirationTime);
135     }
136 
137     public static void reIndexSearch(long companyId)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException {
140         getService().reIndexSearch(companyId);
141     }
142 
143     public static void unlockFolder(long folderId, java.lang.String lockUuid)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException {
146         getService().unlockFolder(folderId, lockUuid);
147     }
148 
149     public static void unlockFolder(long groupId, long parentFolderId,
150         java.lang.String name, java.lang.String lockUuid)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException {
153         getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
154     }
155 
156     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
157         long folderId, long parentFolderId, java.lang.String name,
158         java.lang.String description,
159         com.liferay.portal.service.ServiceContext serviceContext)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException, java.rmi.RemoteException {
162         return getService()
163                    .updateFolder(folderId, parentFolderId, name, description,
164             serviceContext);
165     }
166 
167     public static boolean verifyInheritableLock(long folderId,
168         java.lang.String lockUuid)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         return getService().verifyInheritableLock(folderId, lockUuid);
172     }
173 
174     public static DLFolderService getService() {
175         if (_service == null) {
176             throw new RuntimeException("DLFolderService is not set");
177         }
178 
179         return _service;
180     }
181 
182     public void setService(DLFolderService service) {
183         _service = service;
184     }
185 
186     private static DLFolderService _service;
187 }