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, java.rmi.RemoteException {
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, java.rmi.RemoteException {
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, java.rmi.RemoteException {
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, java.rmi.RemoteException {
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, java.rmi.RemoteException {
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, java.rmi.RemoteException {
89 return getService().getGroup(companyId, name);
90 }
91
92 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
93 java.util.List<com.liferay.portal.model.Organization> organizations)
94 throws java.rmi.RemoteException {
95 return getService().getOrganizationsGroups(organizations);
96 }
97
98 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
99 java.util.List<com.liferay.portal.model.UserGroup> userGroups)
100 throws java.rmi.RemoteException {
101 return getService().getUserGroupsGroups(userGroups);
102 }
103
104 public static boolean hasUserGroup(long userId, long groupId)
105 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
106 return getService().hasUserGroup(userId, groupId);
107 }
108
109 public static java.util.List<com.liferay.portal.model.Group> search(
110 long companyId, java.lang.String name, java.lang.String description,
111 java.lang.String[] params, int start, int end)
112 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
113 return getService()
114 .search(companyId, name, description, params, start, end);
115 }
116
117 public static int searchCount(long companyId, java.lang.String name,
118 java.lang.String description, java.lang.String[] params)
119 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
120 return getService().searchCount(companyId, name, description, params);
121 }
122
123 public static void setRoleGroups(long roleId, long[] groupIds)
124 throws com.liferay.portal.PortalException,
125 com.liferay.portal.SystemException, java.rmi.RemoteException {
126 getService().setRoleGroups(roleId, groupIds);
127 }
128
129 public static void unsetRoleGroups(long roleId, long[] groupIds)
130 throws com.liferay.portal.PortalException,
131 com.liferay.portal.SystemException, java.rmi.RemoteException {
132 getService().unsetRoleGroups(roleId, groupIds);
133 }
134
135 public static com.liferay.portal.model.Group updateFriendlyURL(
136 long groupId, java.lang.String friendlyURL)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException, java.rmi.RemoteException {
139 return getService().updateFriendlyURL(groupId, friendlyURL);
140 }
141
142 public static com.liferay.portal.model.Group updateGroup(long groupId,
143 java.lang.String name, java.lang.String description, int type,
144 java.lang.String friendlyURL, boolean active)
145 throws com.liferay.portal.PortalException,
146 com.liferay.portal.SystemException, java.rmi.RemoteException {
147 return getService()
148 .updateGroup(groupId, name, description, type, friendlyURL,
149 active);
150 }
151
152 public static com.liferay.portal.model.Group updateGroup(long groupId,
153 java.lang.String typeSettings)
154 throws com.liferay.portal.PortalException,
155 com.liferay.portal.SystemException, java.rmi.RemoteException {
156 return getService().updateGroup(groupId, typeSettings);
157 }
158
159 public static com.liferay.portal.model.Group updateWorkflow(long groupId,
160 boolean workflowEnabled, int workflowStages,
161 java.lang.String workflowRoleNames)
162 throws com.liferay.portal.PortalException,
163 com.liferay.portal.SystemException, java.rmi.RemoteException {
164 return getService()
165 .updateWorkflow(groupId, workflowEnabled, workflowStages,
166 workflowRoleNames);
167 }
168
169 public static GroupService getService() {
170 if (_service == null) {
171 throw new RuntimeException("GroupService is not set");
172 }
173
174 return _service;
175 }
176
177 public void setService(GroupService service) {
178 _service = service;
179 }
180
181 private static GroupService _service;
182 }