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