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  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="DLFolderServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link DLFolderService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       DLFolderService
45   * @generated
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             com.liferay.portal.SystemException {
114         return getService().hasInheritableLock(folderId);
115     }
116 
117     public static com.liferay.portal.model.Lock lockFolder(long folderId)
118         throws com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException, java.rmi.RemoteException {
120         return getService().lockFolder(folderId);
121     }
122 
123     public static com.liferay.portal.model.Lock lockFolder(long folderId,
124         java.lang.String owner, boolean inheritable, long expirationTime)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException, java.rmi.RemoteException {
127         return getService()
128                    .lockFolder(folderId, owner, inheritable, expirationTime);
129     }
130 
131     public static com.liferay.portal.model.Lock refreshFolderLock(
132         java.lang.String lockUuid, long expirationTime)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         return getService().refreshFolderLock(lockUuid, expirationTime);
136     }
137 
138     public static void reIndexSearch(long companyId)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException {
141         getService().reIndexSearch(companyId);
142     }
143 
144     public static void unlockFolder(long groupId, long parentFolderId,
145         java.lang.String name, java.lang.String lockUuid)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException {
148         getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
149     }
150 
151     public static void unlockFolder(long folderId, java.lang.String lockUuid)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         getService().unlockFolder(folderId, lockUuid);
155     }
156 
157     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
158         long folderId, long parentFolderId, java.lang.String name,
159         java.lang.String description,
160         com.liferay.portal.service.ServiceContext serviceContext)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException, java.rmi.RemoteException {
163         return getService()
164                    .updateFolder(folderId, parentFolderId, name, description,
165             serviceContext);
166     }
167 
168     public static boolean verifyInheritableLock(long folderId,
169         java.lang.String lockUuid)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException {
172         return getService().verifyInheritableLock(folderId, lockUuid);
173     }
174 
175     public static DLFolderService getService() {
176         if (_service == null) {
177             _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
178         }
179 
180         return _service;
181     }
182 
183     public void setService(DLFolderService service) {
184         _service = service;
185     }
186 
187     private static DLFolderService _service;
188 }