001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
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    /**
024     * <p>
025     * This class provides a SOAP utility for the
026     * {@link com.liferay.portal.service.GroupServiceUtil} service utility. The
027     * static methods of this class calls the same methods of the service utility.
028     * However, the signatures are different because it is difficult for SOAP to
029     * support certain types.
030     * </p>
031     *
032     * <p>
033     * ServiceBuilder follows certain rules in translating the methods. For example,
034     * if the method in the service utility returns a {@link java.util.List}, that
035     * is translated to an array of {@link com.liferay.portal.model.GroupSoap}.
036     * If the method in the service utility returns a
037     * {@link com.liferay.portal.model.Group}, that is translated to a
038     * {@link com.liferay.portal.model.GroupSoap}. Methods that SOAP cannot
039     * safely wire are skipped.
040     * </p>
041     *
042     * <p>
043     * The benefits of using the SOAP utility is that it is cross platform
044     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
045     * even Perl, to call the generated services. One drawback of SOAP is that it is
046     * slow because it needs to serialize all calls into a text format (XML).
047     * </p>
048     *
049     * <p>
050     * You can see a list of services at
051     * http://localhost:8080/tunnel-web/secure/axis. Set the property
052     * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
053     * security.
054     * </p>
055     *
056     * <p>
057     * The SOAP utility is only generated for remote services.
058     * </p>
059     *
060     * @author    Brian Wing Shun Chan
061     * @see       GroupServiceHttp
062     * @see       com.liferay.portal.model.GroupSoap
063     * @see       com.liferay.portal.service.GroupServiceUtil
064     * @generated
065     */
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    }