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