001
014
015 package com.liferay.portal.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.service.GroupServiceUtil;
020
021 import java.rmi.RemoteException;
022
023
066 public class GroupServiceSoap {
067 public static com.liferay.portal.model.GroupSoap addGroup(
068 java.lang.String name, java.lang.String description, int type,
069 java.lang.String friendlyURL, boolean active,
070 com.liferay.portal.service.ServiceContext serviceContext)
071 throws RemoteException {
072 try {
073 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(name,
074 description, type, friendlyURL, active, serviceContext);
075
076 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
077 }
078 catch (Exception e) {
079 _log.error(e, e);
080
081 throw new RemoteException(e.getMessage());
082 }
083 }
084
085 public static com.liferay.portal.model.GroupSoap addGroup(
086 long liveGroupId, java.lang.String name, java.lang.String description,
087 int type, java.lang.String friendlyURL, boolean active,
088 com.liferay.portal.service.ServiceContext serviceContext)
089 throws RemoteException {
090 try {
091 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(liveGroupId,
092 name, description, type, friendlyURL, active, serviceContext);
093
094 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
095 }
096 catch (Exception e) {
097 _log.error(e, e);
098
099 throw new RemoteException(e.getMessage());
100 }
101 }
102
103 public static void addRoleGroups(long roleId, long[] groupIds)
104 throws RemoteException {
105 try {
106 GroupServiceUtil.addRoleGroups(roleId, groupIds);
107 }
108 catch (Exception e) {
109 _log.error(e, e);
110
111 throw new RemoteException(e.getMessage());
112 }
113 }
114
115 public static void deleteGroup(long groupId) throws RemoteException {
116 try {
117 GroupServiceUtil.deleteGroup(groupId);
118 }
119 catch (Exception e) {
120 _log.error(e, e);
121
122 throw new RemoteException(e.getMessage());
123 }
124 }
125
126 public static com.liferay.portal.model.GroupSoap getGroup(long groupId)
127 throws RemoteException {
128 try {
129 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(groupId);
130
131 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
132 }
133 catch (Exception e) {
134 _log.error(e, e);
135
136 throw new RemoteException(e.getMessage());
137 }
138 }
139
140 public static com.liferay.portal.model.GroupSoap getGroup(long companyId,
141 java.lang.String name) throws RemoteException {
142 try {
143 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId,
144 name);
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[] getManageableGroups(
156 java.lang.String actionId, int max) throws RemoteException {
157 try {
158 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableGroups(actionId,
159 max);
160
161 return com.liferay.portal.model.GroupSoap.toSoapModels(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[] getOrganizationsGroups(
171 com.liferay.portal.model.OrganizationSoap[] organizations)
172 throws RemoteException {
173 try {
174 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getOrganizationsGroups(com.liferay.portal.model.impl.OrganizationModelImpl.toModels(
175 organizations));
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 getUserGroup(
187 long companyId, long userId) throws RemoteException {
188 try {
189 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getUserGroup(companyId,
190 userId);
191
192 return com.liferay.portal.model.GroupSoap.toSoapModel(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[] getUserGroupsGroups(
202 com.liferay.portal.model.UserGroupSoap[] userGroups)
203 throws RemoteException {
204 try {
205 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserGroupsGroups(com.liferay.portal.model.impl.UserGroupModelImpl.toModels(
206 userGroups));
207
208 return com.liferay.portal.model.GroupSoap.toSoapModels(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[] getUserOrganizationsGroups(
218 long userId, int start, int end) throws RemoteException {
219 try {
220 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserOrganizationsGroups(userId,
221 start, end);
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 boolean hasUserGroup(long userId, long groupId)
233 throws RemoteException {
234 try {
235 boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId);
236
237 return returnValue;
238 }
239 catch (Exception e) {
240 _log.error(e, e);
241
242 throw new RemoteException(e.getMessage());
243 }
244 }
245
246 public static com.liferay.portal.model.GroupSoap[] search(long companyId,
247 java.lang.String name, java.lang.String description,
248 java.lang.String[] params, int start, int end)
249 throws RemoteException {
250 try {
251 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.search(companyId,
252 name, description, params, start, end);
253
254 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue);
255 }
256 catch (Exception e) {
257 _log.error(e, e);
258
259 throw new RemoteException(e.getMessage());
260 }
261 }
262
263 public static int searchCount(long companyId, java.lang.String name,
264 java.lang.String description, java.lang.String[] params)
265 throws RemoteException {
266 try {
267 int returnValue = GroupServiceUtil.searchCount(companyId, name,
268 description, params);
269
270 return returnValue;
271 }
272 catch (Exception e) {
273 _log.error(e, e);
274
275 throw new RemoteException(e.getMessage());
276 }
277 }
278
279 public static void setRoleGroups(long roleId, long[] groupIds)
280 throws RemoteException {
281 try {
282 GroupServiceUtil.setRoleGroups(roleId, groupIds);
283 }
284 catch (Exception e) {
285 _log.error(e, e);
286
287 throw new RemoteException(e.getMessage());
288 }
289 }
290
291 public static void unsetRoleGroups(long roleId, long[] groupIds)
292 throws RemoteException {
293 try {
294 GroupServiceUtil.unsetRoleGroups(roleId, groupIds);
295 }
296 catch (Exception e) {
297 _log.error(e, e);
298
299 throw new RemoteException(e.getMessage());
300 }
301 }
302
303 public static com.liferay.portal.model.GroupSoap updateFriendlyURL(
304 long groupId, java.lang.String friendlyURL) throws RemoteException {
305 try {
306 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId,
307 friendlyURL);
308
309 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
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 updateGroup(long groupId,
319 java.lang.String name, java.lang.String description, int type,
320 java.lang.String friendlyURL, boolean active,
321 com.liferay.portal.service.ServiceContext serviceContext)
322 throws RemoteException {
323 try {
324 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
325 name, description, type, friendlyURL, active, serviceContext);
326
327 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue);
328 }
329 catch (Exception e) {
330 _log.error(e, e);
331
332 throw new RemoteException(e.getMessage());
333 }
334 }
335
336 public static com.liferay.portal.model.GroupSoap updateGroup(long groupId,
337 java.lang.String typeSettings) throws RemoteException {
338 try {
339 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
340 typeSettings);
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 updateWorkflow(
352 long groupId, boolean workflowEnabled, int workflowStages,
353 java.lang.String workflowRoleNames) throws RemoteException {
354 try {
355 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateWorkflow(groupId,
356 workflowEnabled, workflowStages, workflowRoleNames);
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 private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class);
368 }