1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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.portal.service;
24  
25  
26  /**
27   * <a href="GroupServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portal.service.GroupService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portal.service.GroupService
45   *
46   */
47  public class GroupServiceUtil {
48      public static com.liferay.portal.model.Group addGroup(
49          java.lang.String name, java.lang.String description, int type,
50          java.lang.String friendlyURL, boolean active)
51          throws com.liferay.portal.PortalException,
52              com.liferay.portal.SystemException, java.rmi.RemoteException {
53          return _service.addGroup(name, description, type, friendlyURL, active);
54      }
55  
56      public static com.liferay.portal.model.Group addGroup(long liveGroupId,
57          java.lang.String name, java.lang.String description, int type,
58          java.lang.String friendlyURL, boolean active)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException, java.rmi.RemoteException {
61          return _service.addGroup(liveGroupId, name, description, type,
62              friendlyURL, active);
63      }
64  
65      public static void addRoleGroups(long roleId, long[] groupIds)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException, java.rmi.RemoteException {
68          _service.addRoleGroups(roleId, groupIds);
69      }
70  
71      public static void deleteGroup(long groupId)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException, java.rmi.RemoteException {
74          _service.deleteGroup(groupId);
75      }
76  
77      public static com.liferay.portal.model.Group getGroup(long groupId)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException, java.rmi.RemoteException {
80          return _service.getGroup(groupId);
81      }
82  
83      public static com.liferay.portal.model.Group getGroup(long companyId,
84          java.lang.String name)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException, java.rmi.RemoteException {
87          return _service.getGroup(companyId, name);
88      }
89  
90      public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
91          java.util.List<com.liferay.portal.model.Organization> organizations)
92          throws java.rmi.RemoteException {
93          return _service.getOrganizationsGroups(organizations);
94      }
95  
96      public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
97          java.util.List<com.liferay.portal.model.UserGroup> userGroups)
98          throws java.rmi.RemoteException {
99          return _service.getUserGroupsGroups(userGroups);
100     }
101 
102     public static boolean hasUserGroup(long userId, long groupId)
103         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
104         return _service.hasUserGroup(userId, groupId);
105     }
106 
107     public static java.util.List<com.liferay.portal.model.Group> search(
108         long companyId, java.lang.String name, java.lang.String description,
109         java.lang.String[] params, int start, int end)
110         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
111         return _service.search(companyId, name, description, params, start, end);
112     }
113 
114     public static int searchCount(long companyId, java.lang.String name,
115         java.lang.String description, java.lang.String[] params)
116         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
117         return _service.searchCount(companyId, name, description, params);
118     }
119 
120     public static void setRoleGroups(long roleId, long[] groupIds)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException, java.rmi.RemoteException {
123         _service.setRoleGroups(roleId, groupIds);
124     }
125 
126     public static void unsetRoleGroups(long roleId, long[] groupIds)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException, java.rmi.RemoteException {
129         _service.unsetRoleGroups(roleId, groupIds);
130     }
131 
132     public static com.liferay.portal.model.Group updateFriendlyURL(
133         long groupId, java.lang.String friendlyURL)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException, java.rmi.RemoteException {
136         return _service.updateFriendlyURL(groupId, friendlyURL);
137     }
138 
139     public static com.liferay.portal.model.Group updateGroup(long groupId,
140         java.lang.String name, java.lang.String description, int type,
141         java.lang.String friendlyURL, boolean active)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException, java.rmi.RemoteException {
144         return _service.updateGroup(groupId, name, description, type,
145             friendlyURL, active);
146     }
147 
148     public static com.liferay.portal.model.Group updateGroup(long groupId,
149         java.lang.String typeSettings)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException, java.rmi.RemoteException {
152         return _service.updateGroup(groupId, typeSettings);
153     }
154 
155     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
156         boolean workflowEnabled, int workflowStages,
157         java.lang.String workflowRoleNames)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException, java.rmi.RemoteException {
160         return _service.updateWorkflow(groupId, workflowEnabled,
161             workflowStages, workflowRoleNames);
162     }
163 
164     public static GroupService getService() {
165         return _service;
166     }
167 
168     public void setService(GroupService service) {
169         _service = service;
170     }
171 
172     private static GroupService _service;
173 }