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