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