001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service;
022:
023: /**
024: * <a href="GroupServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portal.service.GroupService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portal.service.GroupServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portal.service.GroupService
047: * @see com.liferay.portal.service.GroupServiceFactory
048: *
049: */
050: public class GroupServiceUtil {
051: public static com.liferay.portal.model.Group addGroup(
052: java.lang.String name, java.lang.String description,
053: int type, java.lang.String friendlyURL, boolean active)
054: throws com.liferay.portal.PortalException,
055: com.liferay.portal.SystemException,
056: java.rmi.RemoteException {
057: GroupService groupService = GroupServiceFactory.getService();
058:
059: return groupService.addGroup(name, description, type,
060: friendlyURL, active);
061: }
062:
063: public static com.liferay.portal.model.Group addGroup(
064: long liveGroupId, java.lang.String name,
065: java.lang.String description, int type,
066: java.lang.String friendlyURL, boolean active)
067: throws com.liferay.portal.PortalException,
068: com.liferay.portal.SystemException,
069: java.rmi.RemoteException {
070: GroupService groupService = GroupServiceFactory.getService();
071:
072: return groupService.addGroup(liveGroupId, name, description,
073: type, friendlyURL, active);
074: }
075:
076: public static void addRoleGroups(long roleId, long[] groupIds)
077: throws com.liferay.portal.PortalException,
078: com.liferay.portal.SystemException,
079: java.rmi.RemoteException {
080: GroupService groupService = GroupServiceFactory.getService();
081:
082: groupService.addRoleGroups(roleId, groupIds);
083: }
084:
085: public static void deleteGroup(long groupId)
086: throws com.liferay.portal.PortalException,
087: com.liferay.portal.SystemException,
088: java.rmi.RemoteException {
089: GroupService groupService = GroupServiceFactory.getService();
090:
091: groupService.deleteGroup(groupId);
092: }
093:
094: public static com.liferay.portal.model.Group getGroup(long groupId)
095: throws com.liferay.portal.PortalException,
096: com.liferay.portal.SystemException,
097: java.rmi.RemoteException {
098: GroupService groupService = GroupServiceFactory.getService();
099:
100: return groupService.getGroup(groupId);
101: }
102:
103: public static com.liferay.portal.model.Group getGroup(
104: long companyId, java.lang.String name)
105: throws com.liferay.portal.PortalException,
106: com.liferay.portal.SystemException,
107: java.rmi.RemoteException {
108: GroupService groupService = GroupServiceFactory.getService();
109:
110: return groupService.getGroup(companyId, name);
111: }
112:
113: public static java.util.List getOrganizationsGroups(
114: java.util.List organizations)
115: throws com.liferay.portal.PortalException,
116: com.liferay.portal.SystemException,
117: java.rmi.RemoteException {
118: GroupService groupService = GroupServiceFactory.getService();
119:
120: return groupService.getOrganizationsGroups(organizations);
121: }
122:
123: public static java.util.List getUserGroupsGroups(
124: java.util.List userGroups)
125: throws com.liferay.portal.PortalException,
126: com.liferay.portal.SystemException,
127: java.rmi.RemoteException {
128: GroupService groupService = GroupServiceFactory.getService();
129:
130: return groupService.getUserGroupsGroups(userGroups);
131: }
132:
133: public static boolean hasUserGroup(long userId, long groupId)
134: throws com.liferay.portal.SystemException,
135: java.rmi.RemoteException {
136: GroupService groupService = GroupServiceFactory.getService();
137:
138: return groupService.hasUserGroup(userId, groupId);
139: }
140:
141: public static java.util.List search(long companyId,
142: java.lang.String name, java.lang.String description,
143: java.lang.String[] params, int begin, int end)
144: throws com.liferay.portal.SystemException,
145: java.rmi.RemoteException {
146: GroupService groupService = GroupServiceFactory.getService();
147:
148: return groupService.search(companyId, name, description,
149: params, begin, end);
150: }
151:
152: public static int searchCount(long companyId,
153: java.lang.String name, java.lang.String description,
154: java.lang.String[] params)
155: throws com.liferay.portal.SystemException,
156: java.rmi.RemoteException {
157: GroupService groupService = GroupServiceFactory.getService();
158:
159: return groupService.searchCount(companyId, name, description,
160: params);
161: }
162:
163: public static void setRoleGroups(long roleId, long[] groupIds)
164: throws com.liferay.portal.PortalException,
165: com.liferay.portal.SystemException,
166: java.rmi.RemoteException {
167: GroupService groupService = GroupServiceFactory.getService();
168:
169: groupService.setRoleGroups(roleId, groupIds);
170: }
171:
172: public static void unsetRoleGroups(long roleId, long[] groupIds)
173: throws com.liferay.portal.PortalException,
174: com.liferay.portal.SystemException,
175: java.rmi.RemoteException {
176: GroupService groupService = GroupServiceFactory.getService();
177:
178: groupService.unsetRoleGroups(roleId, groupIds);
179: }
180:
181: public static com.liferay.portal.model.Group updateGroup(
182: long groupId, java.lang.String name,
183: java.lang.String description, int type,
184: java.lang.String friendlyURL, boolean active)
185: throws com.liferay.portal.PortalException,
186: com.liferay.portal.SystemException,
187: java.rmi.RemoteException {
188: GroupService groupService = GroupServiceFactory.getService();
189:
190: return groupService.updateGroup(groupId, name, description,
191: type, friendlyURL, active);
192: }
193:
194: public static com.liferay.portal.model.Group updateGroup(
195: long groupId, java.lang.String typeSettings)
196: throws com.liferay.portal.PortalException,
197: com.liferay.portal.SystemException,
198: java.rmi.RemoteException {
199: GroupService groupService = GroupServiceFactory.getService();
200:
201: return groupService.updateGroup(groupId, typeSettings);
202: }
203: }
|