1
22
23 package com.liferay.portal.service;
24
25
51 public class GroupServiceUtil {
52 public static com.liferay.portal.model.Group addGroup(
53 java.lang.String name, java.lang.String description,
54 java.lang.String type, java.lang.String friendlyURL, boolean active)
55 throws com.liferay.portal.PortalException,
56 com.liferay.portal.SystemException, java.rmi.RemoteException {
57 GroupService groupService = GroupServiceFactory.getService();
58
59 return groupService.addGroup(name, description, type, friendlyURL,
60 active);
61 }
62
63 public static com.liferay.portal.model.Group addGroup(long liveGroupId,
64 java.lang.String name, java.lang.String description,
65 java.lang.String type, java.lang.String friendlyURL, boolean active)
66 throws com.liferay.portal.PortalException,
67 com.liferay.portal.SystemException, java.rmi.RemoteException {
68 GroupService groupService = GroupServiceFactory.getService();
69
70 return groupService.addGroup(liveGroupId, name, description, type,
71 friendlyURL, active);
72 }
73
74 public static void addRoleGroups(long roleId, long[] groupIds)
75 throws com.liferay.portal.PortalException,
76 com.liferay.portal.SystemException, java.rmi.RemoteException {
77 GroupService groupService = GroupServiceFactory.getService();
78 groupService.addRoleGroups(roleId, groupIds);
79 }
80
81 public static void deleteGroup(long groupId)
82 throws com.liferay.portal.PortalException,
83 com.liferay.portal.SystemException, java.rmi.RemoteException {
84 GroupService groupService = GroupServiceFactory.getService();
85 groupService.deleteGroup(groupId);
86 }
87
88 public static com.liferay.portal.model.Group getGroup(long groupId)
89 throws com.liferay.portal.PortalException,
90 com.liferay.portal.SystemException, java.rmi.RemoteException {
91 GroupService groupService = GroupServiceFactory.getService();
92
93 return groupService.getGroup(groupId);
94 }
95
96 public static com.liferay.portal.model.Group getGroup(long companyId,
97 java.lang.String name)
98 throws com.liferay.portal.PortalException,
99 com.liferay.portal.SystemException, java.rmi.RemoteException {
100 GroupService groupService = GroupServiceFactory.getService();
101
102 return groupService.getGroup(companyId, name);
103 }
104
105 public static java.util.List getOrganizationsGroups(
106 java.util.List organizations)
107 throws com.liferay.portal.PortalException,
108 com.liferay.portal.SystemException, java.rmi.RemoteException {
109 GroupService groupService = GroupServiceFactory.getService();
110
111 return groupService.getOrganizationsGroups(organizations);
112 }
113
114 public static java.util.List getUserGroupsGroups(java.util.List userGroups)
115 throws com.liferay.portal.PortalException,
116 com.liferay.portal.SystemException, java.rmi.RemoteException {
117 GroupService groupService = GroupServiceFactory.getService();
118
119 return groupService.getUserGroupsGroups(userGroups);
120 }
121
122 public static boolean hasUserGroup(long userId, long groupId)
123 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
124 GroupService groupService = GroupServiceFactory.getService();
125
126 return groupService.hasUserGroup(userId, groupId);
127 }
128
129 public static java.util.List search(long companyId, java.lang.String name,
130 java.lang.String description, java.lang.String[] params, int begin,
131 int end)
132 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
133 GroupService groupService = GroupServiceFactory.getService();
134
135 return groupService.search(companyId, name, description, params, begin,
136 end);
137 }
138
139 public static int searchCount(long companyId, java.lang.String name,
140 java.lang.String description, java.lang.String[] params)
141 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
142 GroupService groupService = GroupServiceFactory.getService();
143
144 return groupService.searchCount(companyId, name, description, params);
145 }
146
147 public static void setRoleGroups(long roleId, long[] groupIds)
148 throws com.liferay.portal.PortalException,
149 com.liferay.portal.SystemException, java.rmi.RemoteException {
150 GroupService groupService = GroupServiceFactory.getService();
151 groupService.setRoleGroups(roleId, groupIds);
152 }
153
154 public static void unsetRoleGroups(long roleId, long[] groupIds)
155 throws com.liferay.portal.PortalException,
156 com.liferay.portal.SystemException, java.rmi.RemoteException {
157 GroupService groupService = GroupServiceFactory.getService();
158 groupService.unsetRoleGroups(roleId, groupIds);
159 }
160
161 public static com.liferay.portal.model.Group updateGroup(long groupId,
162 java.lang.String name, java.lang.String description,
163 java.lang.String type, java.lang.String friendlyURL, boolean active)
164 throws com.liferay.portal.PortalException,
165 com.liferay.portal.SystemException, java.rmi.RemoteException {
166 GroupService groupService = GroupServiceFactory.getService();
167
168 return groupService.updateGroup(groupId, name, description, type,
169 friendlyURL, active);
170 }
171
172 public static com.liferay.portal.model.Group updateGroup(long groupId,
173 java.lang.String typeSettings)
174 throws com.liferay.portal.PortalException,
175 com.liferay.portal.SystemException, java.rmi.RemoteException {
176 GroupService groupService = GroupServiceFactory.getService();
177
178 return groupService.updateGroup(groupId, typeSettings);
179 }
180 }