1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.documentlibrary.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="DLFolderServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link DLFolderService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       DLFolderService
37   * @generated
38   */
39  public class DLFolderServiceUtil {
40      public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
41          long groupId, long parentFolderId, java.lang.String name,
42          java.lang.String description,
43          com.liferay.portal.service.ServiceContext serviceContext)
44          throws com.liferay.portal.PortalException,
45              com.liferay.portal.SystemException {
46          return getService()
47                     .addFolder(groupId, parentFolderId, name, description,
48              serviceContext);
49      }
50  
51      public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
52          long groupId, long sourceFolderId, long parentFolderId,
53          java.lang.String name, java.lang.String description,
54          com.liferay.portal.service.ServiceContext serviceContext)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException, java.rmi.RemoteException {
57          return getService()
58                     .copyFolder(groupId, sourceFolderId, parentFolderId, name,
59              description, serviceContext);
60      }
61  
62      public static void deleteFolder(long folderId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException, java.rmi.RemoteException {
65          getService().deleteFolder(folderId);
66      }
67  
68      public static void deleteFolder(long groupId, long parentFolderId,
69          java.lang.String name)
70          throws com.liferay.portal.PortalException,
71              com.liferay.portal.SystemException, java.rmi.RemoteException {
72          getService().deleteFolder(groupId, parentFolderId, name);
73      }
74  
75      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
76          long folderId)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException {
79          return getService().getFolder(folderId);
80      }
81  
82      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
83          long groupId, long parentFolderId, java.lang.String name)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService().getFolder(groupId, parentFolderId, name);
87      }
88  
89      public static long getFolderId(long groupId, long parentFolderId,
90          java.lang.String name)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException {
93          return getService().getFolderId(groupId, parentFolderId, name);
94      }
95  
96      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
97          long groupId, long parentFolderId)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException {
100         return getService().getFolders(groupId, parentFolderId);
101     }
102 
103     public static boolean hasInheritableLock(long folderId)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException {
106         return getService().hasInheritableLock(folderId);
107     }
108 
109     public static com.liferay.portal.model.Lock lockFolder(long folderId)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException, java.rmi.RemoteException {
112         return getService().lockFolder(folderId);
113     }
114 
115     public static com.liferay.portal.model.Lock lockFolder(long folderId,
116         java.lang.String owner, boolean inheritable, long expirationTime)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException, java.rmi.RemoteException {
119         return getService()
120                    .lockFolder(folderId, owner, inheritable, expirationTime);
121     }
122 
123     public static com.liferay.portal.model.Lock refreshFolderLock(
124         java.lang.String lockUuid, long expirationTime)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException {
127         return getService().refreshFolderLock(lockUuid, expirationTime);
128     }
129 
130     public static void reIndexSearch(long companyId)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException {
133         getService().reIndexSearch(companyId);
134     }
135 
136     public static void unlockFolder(long groupId, long parentFolderId,
137         java.lang.String name, java.lang.String lockUuid)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException {
140         getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
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 com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
150         long folderId, long parentFolderId, java.lang.String name,
151         java.lang.String description,
152         com.liferay.portal.service.ServiceContext serviceContext)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException, java.rmi.RemoteException {
155         return getService()
156                    .updateFolder(folderId, parentFolderId, name, description,
157             serviceContext);
158     }
159 
160     public static boolean verifyInheritableLock(long folderId,
161         java.lang.String lockUuid)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException {
164         return getService().verifyInheritableLock(folderId, lockUuid);
165     }
166 
167     public static DLFolderService getService() {
168         if (_service == null) {
169             _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
170         }
171 
172         return _service;
173     }
174 
175     public void setService(DLFolderService service) {
176         _service = service;
177     }
178 
179     private static DLFolderService _service;
180 }