1
22
23 package com.liferay.portal.service;
24
25
26
47 public class GroupServiceUtil {
48 public static com.liferay.portal.model.Group addGroup(
49 java.lang.String name, java.lang.String description, int type,
50 java.lang.String friendlyURL, boolean active)
51 throws com.liferay.portal.PortalException,
52 com.liferay.portal.SystemException {
53 return getService()
54 .addGroup(name, description, type, friendlyURL, active);
55 }
56
57 public static com.liferay.portal.model.Group addGroup(long liveGroupId,
58 java.lang.String name, java.lang.String description, int type,
59 java.lang.String friendlyURL, boolean active)
60 throws com.liferay.portal.PortalException,
61 com.liferay.portal.SystemException {
62 return getService()
63 .addGroup(liveGroupId, name, description, type, friendlyURL,
64 active);
65 }
66
67 public static void addRoleGroups(long roleId, long[] groupIds)
68 throws com.liferay.portal.PortalException,
69 com.liferay.portal.SystemException {
70 getService().addRoleGroups(roleId, groupIds);
71 }
72
73 public static void deleteGroup(long groupId)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 getService().deleteGroup(groupId);
77 }
78
79 public static com.liferay.portal.model.Group getGroup(long groupId)
80 throws com.liferay.portal.PortalException,
81 com.liferay.portal.SystemException {
82 return getService().getGroup(groupId);
83 }
84
85 public static com.liferay.portal.model.Group getGroup(long companyId,
86 java.lang.String name)
87 throws com.liferay.portal.PortalException,
88 com.liferay.portal.SystemException {
89 return getService().getGroup(companyId, name);
90 }
91
92 public static java.util.List<com.liferay.portal.model.Group> getManageableGroups(
93 long userId, java.lang.String actionId)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 return getService().getManageableGroups(userId, actionId);
97 }
98
99 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
100 java.util.List<com.liferay.portal.model.Organization> organizations) {
101 return getService().getOrganizationsGroups(organizations);
102 }
103
104 public static com.liferay.portal.model.Group getUserGroup(long companyId,
105 long userId)
106 throws com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException {
108 return getService().getUserGroup(companyId, userId);
109 }
110
111 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
112 java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
113 return getService().getUserGroupsGroups(userGroups);
114 }
115
116 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
117 long userId, int start, int end)
118 throws com.liferay.portal.PortalException,
119 com.liferay.portal.SystemException {
120 return getService().getUserOrganizationsGroups(userId, start, end);
121 }
122
123 public static boolean hasUserGroup(long userId, long groupId)
124 throws com.liferay.portal.SystemException {
125 return getService().hasUserGroup(userId, groupId);
126 }
127
128 public static java.util.List<com.liferay.portal.model.Group> search(
129 long companyId, java.lang.String name, java.lang.String description,
130 java.lang.String[] params, int start, int end)
131 throws com.liferay.portal.SystemException {
132 return getService()
133 .search(companyId, name, description, params, start, end);
134 }
135
136 public static int searchCount(long companyId, java.lang.String name,
137 java.lang.String description, java.lang.String[] params)
138 throws com.liferay.portal.SystemException {
139 return getService().searchCount(companyId, name, description, params);
140 }
141
142 public static void setRoleGroups(long roleId, long[] groupIds)
143 throws com.liferay.portal.PortalException,
144 com.liferay.portal.SystemException {
145 getService().setRoleGroups(roleId, groupIds);
146 }
147
148 public static void unsetRoleGroups(long roleId, long[] groupIds)
149 throws com.liferay.portal.PortalException,
150 com.liferay.portal.SystemException {
151 getService().unsetRoleGroups(roleId, groupIds);
152 }
153
154 public static com.liferay.portal.model.Group updateFriendlyURL(
155 long groupId, java.lang.String friendlyURL)
156 throws com.liferay.portal.PortalException,
157 com.liferay.portal.SystemException {
158 return getService().updateFriendlyURL(groupId, friendlyURL);
159 }
160
161 public static com.liferay.portal.model.Group updateGroup(long groupId,
162 java.lang.String name, java.lang.String description, int type,
163 java.lang.String friendlyURL, boolean active)
164 throws com.liferay.portal.PortalException,
165 com.liferay.portal.SystemException {
166 return getService()
167 .updateGroup(groupId, name, description, type, friendlyURL,
168 active);
169 }
170
171 public static com.liferay.portal.model.Group updateGroup(long groupId,
172 java.lang.String typeSettings)
173 throws com.liferay.portal.PortalException,
174 com.liferay.portal.SystemException {
175 return getService().updateGroup(groupId, typeSettings);
176 }
177
178 public static com.liferay.portal.model.Group updateWorkflow(long groupId,
179 boolean workflowEnabled, int workflowStages,
180 java.lang.String workflowRoleNames)
181 throws com.liferay.portal.PortalException,
182 com.liferay.portal.SystemException {
183 return getService()
184 .updateWorkflow(groupId, workflowEnabled, workflowStages,
185 workflowRoleNames);
186 }
187
188 public static GroupService getService() {
189 if (_service == null) {
190 throw new RuntimeException("GroupService is not set");
191 }
192
193 return _service;
194 }
195
196 public void setService(GroupService service) {
197 _service = service;
198 }
199
200 private static GroupService _service;
201 }