001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * The utility for the group remote service. This utility wraps {@link com.liferay.portal.service.impl.GroupServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.GroupServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see GroupService
032     * @see com.liferay.portal.service.base.GroupServiceBaseImpl
033     * @see com.liferay.portal.service.impl.GroupServiceImpl
034     * @generated
035     */
036    public class GroupServiceUtil {
037            public static com.liferay.portal.model.Group addGroup(
038                    java.lang.String name, java.lang.String description, int type,
039                    java.lang.String friendlyURL, boolean active,
040                    com.liferay.portal.service.ServiceContext serviceContext)
041                    throws com.liferay.portal.kernel.exception.PortalException,
042                            com.liferay.portal.kernel.exception.SystemException {
043                    return getService()
044                                       .addGroup(name, description, type, friendlyURL, active,
045                            serviceContext);
046            }
047    
048            public static com.liferay.portal.model.Group addGroup(long liveGroupId,
049                    java.lang.String name, java.lang.String description, int type,
050                    java.lang.String friendlyURL, boolean active,
051                    com.liferay.portal.service.ServiceContext serviceContext)
052                    throws com.liferay.portal.kernel.exception.PortalException,
053                            com.liferay.portal.kernel.exception.SystemException {
054                    return getService()
055                                       .addGroup(liveGroupId, name, description, type, friendlyURL,
056                            active, serviceContext);
057            }
058    
059            public static void addRoleGroups(long roleId, long[] groupIds)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    getService().addRoleGroups(roleId, groupIds);
063            }
064    
065            public static void deleteGroup(long groupId)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    getService().deleteGroup(groupId);
069            }
070    
071            public static com.liferay.portal.model.Group getGroup(long groupId)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService().getGroup(groupId);
075            }
076    
077            public static com.liferay.portal.model.Group getGroup(long companyId,
078                    java.lang.String name)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    return getService().getGroup(companyId, name);
082            }
083    
084            public static java.util.List<com.liferay.portal.model.Group> getManageableGroups(
085                    java.lang.String actionId, int max)
086                    throws com.liferay.portal.kernel.exception.PortalException,
087                            com.liferay.portal.kernel.exception.SystemException {
088                    return getService().getManageableGroups(actionId, max);
089            }
090    
091            public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
092                    java.util.List<com.liferay.portal.model.Organization> organizations) {
093                    return getService().getOrganizationsGroups(organizations);
094            }
095    
096            public static com.liferay.portal.model.Group getUserGroup(long companyId,
097                    long userId)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException {
100                    return getService().getUserGroup(companyId, userId);
101            }
102    
103            public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
104                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
105                    throws com.liferay.portal.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.SystemException {
107                    return getService().getUserGroupsGroups(userGroups);
108            }
109    
110            public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
111                    long userId, int start, int end)
112                    throws com.liferay.portal.kernel.exception.PortalException,
113                            com.liferay.portal.kernel.exception.SystemException {
114                    return getService().getUserOrganizationsGroups(userId, start, end);
115            }
116    
117            public static boolean hasUserGroup(long userId, long groupId)
118                    throws com.liferay.portal.kernel.exception.SystemException {
119                    return getService().hasUserGroup(userId, groupId);
120            }
121    
122            public static java.util.List<com.liferay.portal.model.Group> search(
123                    long companyId, java.lang.String name, java.lang.String description,
124                    java.lang.String[] params, int start, int end)
125                    throws com.liferay.portal.kernel.exception.SystemException {
126                    return getService()
127                                       .search(companyId, name, description, params, start, end);
128            }
129    
130            public static int searchCount(long companyId, java.lang.String name,
131                    java.lang.String description, java.lang.String[] params)
132                    throws com.liferay.portal.kernel.exception.SystemException {
133                    return getService().searchCount(companyId, name, description, params);
134            }
135    
136            public static void setRoleGroups(long roleId, long[] groupIds)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    getService().setRoleGroups(roleId, groupIds);
140            }
141    
142            public static void unsetRoleGroups(long roleId, long[] groupIds)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException {
145                    getService().unsetRoleGroups(roleId, groupIds);
146            }
147    
148            public static com.liferay.portal.model.Group updateFriendlyURL(
149                    long groupId, java.lang.String friendlyURL)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    return getService().updateFriendlyURL(groupId, friendlyURL);
153            }
154    
155            public static com.liferay.portal.model.Group updateGroup(long groupId,
156                    java.lang.String name, java.lang.String description, int type,
157                    java.lang.String friendlyURL, boolean active,
158                    com.liferay.portal.service.ServiceContext serviceContext)
159                    throws com.liferay.portal.kernel.exception.PortalException,
160                            com.liferay.portal.kernel.exception.SystemException {
161                    return getService()
162                                       .updateGroup(groupId, name, description, type, friendlyURL,
163                            active, serviceContext);
164            }
165    
166            public static com.liferay.portal.model.Group updateGroup(long groupId,
167                    java.lang.String typeSettings)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getService().updateGroup(groupId, typeSettings);
171            }
172    
173            public static com.liferay.portal.model.Group updateWorkflow(long groupId,
174                    boolean workflowEnabled, int workflowStages,
175                    java.lang.String workflowRoleNames)
176                    throws com.liferay.portal.kernel.exception.PortalException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getService()
179                                       .updateWorkflow(groupId, workflowEnabled, workflowStages,
180                            workflowRoleNames);
181            }
182    
183            public static GroupService getService() {
184                    if (_service == null) {
185                            _service = (GroupService)PortalBeanLocatorUtil.locate(GroupService.class.getName());
186                    }
187    
188                    return _service;
189            }
190    
191            public void setService(GroupService service) {
192                    _service = service;
193            }
194    
195            private static GroupService _service;
196    }