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