1
22
23 package com.liferay.portal.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.service.GroupServiceUtil;
28
29 import java.rmi.RemoteException;
30
31
81 public class GroupServiceSoap {
82 public static com.liferay.portal.model.GroupSoap addGroup(
83 java.lang.String name, java.lang.String description, int type,
84 java.lang.String friendlyURL, boolean active,
85 com.liferay.portal.service.ServiceContext serviceContext)
86 throws RemoteException {
87 try {
88 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(name,
89 description, type, friendlyURL, active, serviceContext);
90
91 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
92 }
93 catch (Exception e) {
94 _log.error(e, e);
95
96 throw new RemoteException(e.getMessage());
97 }
98 }
99
100 public static com.liferay.portal.model.GroupSoap addGroup(
101 long liveGroupId, java.lang.String name, java.lang.String description,
102 int type, java.lang.String friendlyURL, boolean active,
103 com.liferay.portal.service.ServiceContext serviceContext)
104 throws RemoteException {
105 try {
106 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(liveGroupId,
107 name, description, type, friendlyURL, active, serviceContext);
108
109 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
110 }
111 catch (Exception e) {
112 _log.error(e, e);
113
114 throw new RemoteException(e.getMessage());
115 }
116 }
117
118 public static void addRoleGroups(long roleId, long[] groupIds)
119 throws RemoteException {
120 try {
121 GroupServiceUtil.addRoleGroups(roleId, groupIds);
122 }
123 catch (Exception e) {
124 _log.error(e, e);
125
126 throw new RemoteException(e.getMessage());
127 }
128 }
129
130 public static void deleteGroup(long groupId) throws RemoteException {
131 try {
132 GroupServiceUtil.deleteGroup(groupId);
133 }
134 catch (Exception e) {
135 _log.error(e, e);
136
137 throw new RemoteException(e.getMessage());
138 }
139 }
140
141 public static com.liferay.portal.model.GroupSoap getGroup(long groupId)
142 throws RemoteException {
143 try {
144 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(groupId);
145
146 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
147 }
148 catch (Exception e) {
149 _log.error(e, e);
150
151 throw new RemoteException(e.getMessage());
152 }
153 }
154
155 public static com.liferay.portal.model.GroupSoap getGroup(long companyId,
156 java.lang.String name) throws RemoteException {
157 try {
158 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId,
159 name);
160
161 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
162 }
163 catch (Exception e) {
164 _log.error(e, e);
165
166 throw new RemoteException(e.getMessage());
167 }
168 }
169
170 public static com.liferay.portal.model.GroupSoap[] getManageableGroups(
171 java.lang.String actionId, int max) throws RemoteException {
172 try {
173 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableGroups(actionId,
174 max);
175
176 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
177 }
178 catch (Exception e) {
179 _log.error(e, e);
180
181 throw new RemoteException(e.getMessage());
182 }
183 }
184
185 public static com.liferay.portal.model.GroupSoap[] getOrganizationsGroups(
186 com.liferay.portal.model.OrganizationSoap[] organizations)
187 throws RemoteException {
188 try {
189 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getOrganizationsGroups(com.liferay.portal.model.impl.OrganizationModelImpl.toModels(
190 organizations));
191
192 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
193 }
194 catch (Exception e) {
195 _log.error(e, e);
196
197 throw new RemoteException(e.getMessage());
198 }
199 }
200
201 public static com.liferay.portal.model.GroupSoap getUserGroup(
202 long companyId, long userId) throws RemoteException {
203 try {
204 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getUserGroup(companyId,
205 userId);
206
207 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
208 }
209 catch (Exception e) {
210 _log.error(e, e);
211
212 throw new RemoteException(e.getMessage());
213 }
214 }
215
216 public static com.liferay.portal.model.GroupSoap[] getUserGroupsGroups(
217 com.liferay.portal.model.UserGroupSoap[] userGroups)
218 throws RemoteException {
219 try {
220 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserGroupsGroups(com.liferay.portal.model.impl.UserGroupModelImpl.toModels(
221 userGroups));
222
223 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
224 }
225 catch (Exception e) {
226 _log.error(e, e);
227
228 throw new RemoteException(e.getMessage());
229 }
230 }
231
232 public static com.liferay.portal.model.GroupSoap[] getUserOrganizationsGroups(
233 long userId, int start, int end) throws RemoteException {
234 try {
235 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserOrganizationsGroups(userId,
236 start, end);
237
238 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
239 }
240 catch (Exception e) {
241 _log.error(e, e);
242
243 throw new RemoteException(e.getMessage());
244 }
245 }
246
247 public static boolean hasUserGroup(long userId, long groupId)
248 throws RemoteException {
249 try {
250 boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId);
251
252 return returnValue;
253 }
254 catch (Exception e) {
255 _log.error(e, e);
256
257 throw new RemoteException(e.getMessage());
258 }
259 }
260
261 public static com.liferay.portal.model.GroupSoap[] search(long companyId,
262 java.lang.String name, java.lang.String description,
263 java.lang.String[] params, int start, int end)
264 throws RemoteException {
265 try {
266 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.search(companyId,
267 name, description, params, start, end);
268
269 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
270 }
271 catch (Exception e) {
272 _log.error(e, e);
273
274 throw new RemoteException(e.getMessage());
275 }
276 }
277
278 public static int searchCount(long companyId, java.lang.String name,
279 java.lang.String description, java.lang.String[] params)
280 throws RemoteException {
281 try {
282 int returnValue = GroupServiceUtil.searchCount(companyId, name,
283 description, params);
284
285 return returnValue;
286 }
287 catch (Exception e) {
288 _log.error(e, e);
289
290 throw new RemoteException(e.getMessage());
291 }
292 }
293
294 public static void setRoleGroups(long roleId, long[] groupIds)
295 throws RemoteException {
296 try {
297 GroupServiceUtil.setRoleGroups(roleId, groupIds);
298 }
299 catch (Exception e) {
300 _log.error(e, e);
301
302 throw new RemoteException(e.getMessage());
303 }
304 }
305
306 public static void unsetRoleGroups(long roleId, long[] groupIds)
307 throws RemoteException {
308 try {
309 GroupServiceUtil.unsetRoleGroups(roleId, groupIds);
310 }
311 catch (Exception e) {
312 _log.error(e, e);
313
314 throw new RemoteException(e.getMessage());
315 }
316 }
317
318 public static com.liferay.portal.model.GroupSoap updateFriendlyURL(
319 long groupId, java.lang.String friendlyURL) throws RemoteException {
320 try {
321 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId,
322 friendlyURL);
323
324 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
325 }
326 catch (Exception e) {
327 _log.error(e, e);
328
329 throw new RemoteException(e.getMessage());
330 }
331 }
332
333 public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
334 java.lang.String name, java.lang.String description, int type,
335 java.lang.String friendlyURL, boolean active,
336 com.liferay.portal.service.ServiceContext serviceContext)
337 throws RemoteException {
338 try {
339 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
340 name, description, type, friendlyURL, active, serviceContext);
341
342 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
343 }
344 catch (Exception e) {
345 _log.error(e, e);
346
347 throw new RemoteException(e.getMessage());
348 }
349 }
350
351 public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
352 java.lang.String typeSettings) throws RemoteException {
353 try {
354 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
355 typeSettings);
356
357 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
358 }
359 catch (Exception e) {
360 _log.error(e, e);
361
362 throw new RemoteException(e.getMessage());
363 }
364 }
365
366 public static com.liferay.portal.model.GroupSoap updateWorkflow(
367 long groupId, boolean workflowEnabled, int workflowStages,
368 java.lang.String workflowRoleNames) throws RemoteException {
369 try {
370 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateWorkflow(groupId,
371 workflowEnabled, workflowStages, workflowRoleNames);
372
373 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
374 }
375 catch (Exception e) {
376 _log.error(e, e);
377
378 throw new RemoteException(e.getMessage());
379 }
380 }
381
382 private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class);
383 }