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