1
22
23 package com.liferay.portal.service;
24
25 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26
27
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 com.liferay.portal.service.ServiceContext serviceContext)
52 throws com.liferay.portal.PortalException,
53 com.liferay.portal.SystemException {
54 return getService()
55 .addGroup(name, description, type, friendlyURL, active,
56 serviceContext);
57 }
58
59 public static com.liferay.portal.model.Group addGroup(long liveGroupId,
60 java.lang.String name, java.lang.String description, int type,
61 java.lang.String friendlyURL, boolean active,
62 com.liferay.portal.service.ServiceContext serviceContext)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 return getService()
66 .addGroup(liveGroupId, name, description, type, friendlyURL,
67 active, serviceContext);
68 }
69
70 public static void addRoleGroups(long roleId, long[] groupIds)
71 throws com.liferay.portal.PortalException,
72 com.liferay.portal.SystemException {
73 getService().addRoleGroups(roleId, groupIds);
74 }
75
76 public static void deleteGroup(long groupId)
77 throws com.liferay.portal.PortalException,
78 com.liferay.portal.SystemException {
79 getService().deleteGroup(groupId);
80 }
81
82 public static com.liferay.portal.model.Group getGroup(long groupId)
83 throws com.liferay.portal.PortalException,
84 com.liferay.portal.SystemException {
85 return getService().getGroup(groupId);
86 }
87
88 public static com.liferay.portal.model.Group getGroup(long companyId,
89 java.lang.String name)
90 throws com.liferay.portal.PortalException,
91 com.liferay.portal.SystemException {
92 return getService().getGroup(companyId, name);
93 }
94
95 public static java.util.List<com.liferay.portal.model.Group> getManageableGroups(
96 java.lang.String actionId, int max)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException {
99 return getService().getManageableGroups(actionId, max);
100 }
101
102 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
103 java.util.List<com.liferay.portal.model.Organization> organizations) {
104 return getService().getOrganizationsGroups(organizations);
105 }
106
107 public static com.liferay.portal.model.Group getUserGroup(long companyId,
108 long userId)
109 throws com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException {
111 return getService().getUserGroup(companyId, userId);
112 }
113
114 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
115 java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
116 return getService().getUserGroupsGroups(userGroups);
117 }
118
119 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
120 long userId, int start, int end)
121 throws com.liferay.portal.PortalException,
122 com.liferay.portal.SystemException {
123 return getService().getUserOrganizationsGroups(userId, start, end);
124 }
125
126 public static boolean hasUserGroup(long userId, long groupId)
127 throws com.liferay.portal.SystemException {
128 return getService().hasUserGroup(userId, groupId);
129 }
130
131 public static java.util.List<com.liferay.portal.model.Group> search(
132 long companyId, java.lang.String name, java.lang.String description,
133 java.lang.String[] params, int start, int end)
134 throws com.liferay.portal.SystemException {
135 return getService()
136 .search(companyId, name, description, params, start, end);
137 }
138
139 public static int searchCount(long companyId, java.lang.String name,
140 java.lang.String description, java.lang.String[] params)
141 throws com.liferay.portal.SystemException {
142 return getService().searchCount(companyId, name, description, params);
143 }
144
145 public static void setRoleGroups(long roleId, long[] groupIds)
146 throws com.liferay.portal.PortalException,
147 com.liferay.portal.SystemException {
148 getService().setRoleGroups(roleId, groupIds);
149 }
150
151 public static void unsetRoleGroups(long roleId, long[] groupIds)
152 throws com.liferay.portal.PortalException,
153 com.liferay.portal.SystemException {
154 getService().unsetRoleGroups(roleId, groupIds);
155 }
156
157 public static com.liferay.portal.model.Group updateFriendlyURL(
158 long groupId, java.lang.String friendlyURL)
159 throws com.liferay.portal.PortalException,
160 com.liferay.portal.SystemException {
161 return getService().updateFriendlyURL(groupId, friendlyURL);
162 }
163
164 public static com.liferay.portal.model.Group updateGroup(long groupId,
165 java.lang.String name, java.lang.String description, int type,
166 java.lang.String friendlyURL, boolean active,
167 com.liferay.portal.service.ServiceContext serviceContext)
168 throws com.liferay.portal.PortalException,
169 com.liferay.portal.SystemException {
170 return getService()
171 .updateGroup(groupId, name, description, type, friendlyURL,
172 active, serviceContext);
173 }
174
175 public static com.liferay.portal.model.Group updateGroup(long groupId,
176 java.lang.String typeSettings)
177 throws com.liferay.portal.PortalException,
178 com.liferay.portal.SystemException {
179 return getService().updateGroup(groupId, typeSettings);
180 }
181
182 public static com.liferay.portal.model.Group updateWorkflow(long groupId,
183 boolean workflowEnabled, int workflowStages,
184 java.lang.String workflowRoleNames)
185 throws com.liferay.portal.PortalException,
186 com.liferay.portal.SystemException {
187 return getService()
188 .updateWorkflow(groupId, workflowEnabled, workflowStages,
189 workflowRoleNames);
190 }
191
192 public static GroupService getService() {
193 if (_service == null) {
194 _service = (GroupService)PortalBeanLocatorUtil.locate(GroupService.class.getName());
195 }
196
197 return _service;
198 }
199
200 public void setService(GroupService service) {
201 _service = service;
202 }
203
204 private static GroupService _service;
205 }