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 plid, long parentFolderId, java.lang.String name,
42          java.lang.String description, boolean addCommunityPermissions,
43          boolean addGuestPermissions)
44          throws com.liferay.portal.PortalException,
45              com.liferay.portal.SystemException, java.rmi.RemoteException {
46          return getService()
47                     .addFolder(plid, parentFolderId, name, description,
48              addCommunityPermissions, addGuestPermissions);
49      }
50  
51      public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
52          long plid, long parentFolderId, java.lang.String name,
53          java.lang.String description, java.lang.String[] communityPermissions,
54          java.lang.String[] guestPermissions)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException, java.rmi.RemoteException {
57          return getService()
58                     .addFolder(plid, parentFolderId, name, description,
59              communityPermissions, guestPermissions);
60      }
61  
62      public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
63          long plid, long sourceFolderId, long parentFolderId,
64          java.lang.String name, java.lang.String description,
65          boolean addCommunityPermissions, boolean addGuestPermissions)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException, java.rmi.RemoteException {
68          return getService()
69                     .copyFolder(plid, sourceFolderId, parentFolderId, name,
70              description, addCommunityPermissions, addGuestPermissions);
71      }
72  
73      public static void deleteFolder(long folderId)
74          throws com.liferay.portal.PortalException,
75              com.liferay.portal.SystemException, java.rmi.RemoteException {
76          getService().deleteFolder(folderId);
77      }
78  
79      public static void deleteFolder(long groupId, long parentFolderId,
80          java.lang.String name)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException, java.rmi.RemoteException {
83          getService().deleteFolder(groupId, parentFolderId, name);
84      }
85  
86      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
87          long folderId)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException, java.rmi.RemoteException {
90          return getService().getFolder(folderId);
91      }
92  
93      public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
94          long groupId, long parentFolderId, java.lang.String name)
95          throws com.liferay.portal.PortalException,
96              com.liferay.portal.SystemException, java.rmi.RemoteException {
97          return getService().getFolder(groupId, parentFolderId, name);
98      }
99  
100     public static long getFolderId(long groupId, long parentFolderId,
101         java.lang.String name)
102         throws com.liferay.portal.PortalException,
103             com.liferay.portal.SystemException, java.rmi.RemoteException {
104         return getService().getFolderId(groupId, parentFolderId, name);
105     }
106 
107     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
108         long groupId, long parentFolderId)
109         throws com.liferay.portal.PortalException,
110             com.liferay.portal.SystemException, java.rmi.RemoteException {
111         return getService().getFolders(groupId, parentFolderId);
112     }
113 
114     public static void reIndexSearch(long companyId)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException, java.rmi.RemoteException {
117         getService().reIndexSearch(companyId);
118     }
119 
120     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
121         long folderId, long parentFolderId, java.lang.String name,
122         java.lang.String description)
123         throws com.liferay.portal.PortalException,
124             com.liferay.portal.SystemException, java.rmi.RemoteException {
125         return getService()
126                    .updateFolder(folderId, parentFolderId, name, description);
127     }
128 
129     public static DLFolderService getService() {
130         if (_service == null) {
131             _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
132         }
133 
134         return _service;
135     }
136 
137     public void setService(DLFolderService service) {
138         _service = service;
139     }
140 
141     private static DLFolderService _service;
142 }