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