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.imagegallery.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="IGFolderServiceUtil.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 IGFolderService} 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       IGFolderService
37   * @generated
38   */
39  public class IGFolderServiceUtil {
40      public static com.liferay.portlet.imagegallery.model.IGFolder 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.imagegallery.model.IGFolder 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.imagegallery.model.IGFolder 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 com.liferay.portlet.imagegallery.model.IGFolder getFolder(
80          long folderId)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException, java.rmi.RemoteException {
83          return getService().getFolder(folderId);
84      }
85  
86      public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
87          long groupId, long parentFolderId, java.lang.String name)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException, java.rmi.RemoteException {
90          return getService().getFolder(groupId, parentFolderId, name);
91      }
92  
93      public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
94          long groupId, long parentFolderId)
95          throws com.liferay.portal.PortalException,
96              com.liferay.portal.SystemException, java.rmi.RemoteException {
97          return getService().getFolders(groupId, parentFolderId);
98      }
99  
100     public static com.liferay.portlet.imagegallery.model.IGFolder updateFolder(
101         long folderId, long parentFolderId, java.lang.String name,
102         java.lang.String description, boolean mergeWithParentFolder)
103         throws com.liferay.portal.PortalException,
104             com.liferay.portal.SystemException, java.rmi.RemoteException {
105         return getService()
106                    .updateFolder(folderId, parentFolderId, name, description,
107             mergeWithParentFolder);
108     }
109 
110     public static IGFolderService getService() {
111         if (_service == null) {
112             _service = (IGFolderService)PortalBeanLocatorUtil.locate(IGFolderService.class.getName());
113         }
114 
115         return _service;
116     }
117 
118     public void setService(IGFolderService service) {
119         _service = service;
120     }
121 
122     private static IGFolderService _service;
123 }