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  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="DLFolderServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link DLFolderService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       DLFolderService
39   * @generated
40   */
41  public class DLFolderServiceUtil {
42      public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
43          long groupId, long parentFolderId, java.lang.String name,
44          java.lang.String description,
45          com.liferay.portal.service.ServiceContext serviceContext)
46          throws com.liferay.portal.PortalException,
47              com.liferay.portal.SystemException {
48          return getService()
49                     .addFolder(groupId, parentFolderId, name, description,
50              serviceContext);
51      }
52  
53      public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
54          long groupId, long sourceFolderId, long parentFolderId,
55          java.lang.String name, java.lang.String description,
56          com.liferay.portal.service.ServiceContext serviceContext)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException, java.rmi.RemoteException {
59          return getService()
60                     .copyFolder(groupId, sourceFolderId, parentFolderId, name,
61              description, serviceContext);
62      }
63  
64      public static void deleteFolder(long folderId)
65          throws com.liferay.portal.PortalException,
66              com.liferay.portal.SystemException, java.rmi.RemoteException {
67          getService().deleteFolder(folderId);
68      }
69  
70      public static void deleteFolder(long groupId, long parentFolderId,
71          java.lang.String name)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException, java.rmi.RemoteException {
74          getService().deleteFolder(groupId, parentFolderId, name);
75      }
76  
77      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
78          long folderId)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException {
81          return getService().getFolder(folderId);
82      }
83  
84      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
85          long groupId, long parentFolderId, java.lang.String name)
86          throws com.liferay.portal.PortalException,
87              com.liferay.portal.SystemException {
88          return getService().getFolder(groupId, parentFolderId, name);
89      }
90  
91      public static long getFolderId(long groupId, long parentFolderId,
92          java.lang.String name)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException {
95          return getService().getFolderId(groupId, parentFolderId, name);
96      }
97  
98      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
99          long groupId, long parentFolderId)
100         throws com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException {
102         return getService().getFolders(groupId, parentFolderId);
103     }
104 
105     public static boolean hasInheritableLock(long folderId)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         return getService().hasInheritableLock(folderId);
109     }
110 
111     public static com.liferay.portal.model.Lock lockFolder(long folderId)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException, java.rmi.RemoteException {
114         return getService().lockFolder(folderId);
115     }
116 
117     public static com.liferay.portal.model.Lock lockFolder(long folderId,
118         java.lang.String owner, boolean inheritable, long expirationTime)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException, java.rmi.RemoteException {
121         return getService()
122                    .lockFolder(folderId, owner, inheritable, expirationTime);
123     }
124 
125     public static com.liferay.portal.model.Lock refreshFolderLock(
126         java.lang.String lockUuid, long expirationTime)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         return getService().refreshFolderLock(lockUuid, expirationTime);
130     }
131 
132     public static void reIndexSearch(long companyId)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         getService().reIndexSearch(companyId);
136     }
137 
138     public static void unlockFolder(long groupId, long parentFolderId,
139         java.lang.String name, java.lang.String lockUuid)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
143     }
144 
145     public static void unlockFolder(long folderId, java.lang.String lockUuid)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException {
148         getService().unlockFolder(folderId, lockUuid);
149     }
150 
151     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
152         long folderId, long parentFolderId, java.lang.String name,
153         java.lang.String description,
154         com.liferay.portal.service.ServiceContext serviceContext)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException, java.rmi.RemoteException {
157         return getService()
158                    .updateFolder(folderId, parentFolderId, name, description,
159             serviceContext);
160     }
161 
162     public static boolean verifyInheritableLock(long folderId,
163         java.lang.String lockUuid)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         return getService().verifyInheritableLock(folderId, lockUuid);
167     }
168 
169     public static DLFolderService getService() {
170         if (_service == null) {
171             _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
172 
173             ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
174                 "_service");
175             MethodCache.remove(DLFolderService.class);
176         }
177 
178         return _service;
179     }
180 
181     public void setService(DLFolderService service) {
182         MethodCache.remove(DLFolderService.class);
183 
184         _service = service;
185 
186         ReferenceRegistry.registerReference(DLFolderServiceUtil.class,
187             "_service");
188         MethodCache.remove(DLFolderService.class);
189     }
190 
191     private static DLFolderService _service;
192 }