1
22
23 package com.liferay.portal.service;
24
25
26
46 public class UserServiceUtil {
47 public static void addGroupUsers(long groupId, long[] userIds)
48 throws com.liferay.portal.PortalException,
49 com.liferay.portal.SystemException, java.rmi.RemoteException {
50 getService().addGroupUsers(groupId, userIds);
51 }
52
53 public static void addOrganizationUsers(long organizationId, long[] userIds)
54 throws com.liferay.portal.PortalException,
55 com.liferay.portal.SystemException, java.rmi.RemoteException {
56 getService().addOrganizationUsers(organizationId, userIds);
57 }
58
59 public static void addPasswordPolicyUsers(long passwordPolicyId,
60 long[] userIds)
61 throws com.liferay.portal.PortalException,
62 com.liferay.portal.SystemException, java.rmi.RemoteException {
63 getService().addPasswordPolicyUsers(passwordPolicyId, userIds);
64 }
65
66 public static void addRoleUsers(long roleId, long[] userIds)
67 throws com.liferay.portal.PortalException,
68 com.liferay.portal.SystemException, java.rmi.RemoteException {
69 getService().addRoleUsers(roleId, userIds);
70 }
71
72 public static void addUserGroupUsers(long userGroupId, long[] userIds)
73 throws com.liferay.portal.PortalException,
74 com.liferay.portal.SystemException, java.rmi.RemoteException {
75 getService().addUserGroupUsers(userGroupId, userIds);
76 }
77
78 public static com.liferay.portal.model.User addUser(long companyId,
79 boolean autoPassword, java.lang.String password1,
80 java.lang.String password2, boolean autoScreenName,
81 java.lang.String screenName, java.lang.String emailAddress,
82 java.util.Locale locale, java.lang.String firstName,
83 java.lang.String middleName, java.lang.String lastName, int prefixId,
84 int suffixId, boolean male, int birthdayMonth, int birthdayDay,
85 int birthdayYear, java.lang.String jobTitle, long[] organizationIds,
86 boolean sendEmail)
87 throws com.liferay.portal.PortalException,
88 com.liferay.portal.SystemException, java.rmi.RemoteException {
89 return getService()
90 .addUser(companyId, autoPassword, password1, password2,
91 autoScreenName, screenName, emailAddress, locale, firstName,
92 middleName, lastName, prefixId, suffixId, male, birthdayMonth,
93 birthdayDay, birthdayYear, jobTitle, organizationIds, sendEmail);
94 }
95
96 public static void deleteRoleUser(long roleId, long userId)
97 throws com.liferay.portal.PortalException,
98 com.liferay.portal.SystemException, java.rmi.RemoteException {
99 getService().deleteRoleUser(roleId, userId);
100 }
101
102 public static void deleteUser(long userId)
103 throws com.liferay.portal.PortalException,
104 com.liferay.portal.SystemException, java.rmi.RemoteException {
105 getService().deleteUser(userId);
106 }
107
108 public static long getDefaultUserId(long companyId)
109 throws com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException, java.rmi.RemoteException {
111 return getService().getDefaultUserId(companyId);
112 }
113
114 public static long[] getGroupUserIds(long groupId)
115 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
116 return getService().getGroupUserIds(groupId);
117 }
118
119 public static long[] getOrganizationUserIds(long organizationId)
120 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
121 return getService().getOrganizationUserIds(organizationId);
122 }
123
124 public static long[] getRoleUserIds(long roleId)
125 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
126 return getService().getRoleUserIds(roleId);
127 }
128
129 public static com.liferay.portal.model.User getUserByEmailAddress(
130 long companyId, java.lang.String emailAddress)
131 throws com.liferay.portal.PortalException,
132 com.liferay.portal.SystemException, java.rmi.RemoteException {
133 return getService().getUserByEmailAddress(companyId, emailAddress);
134 }
135
136 public static com.liferay.portal.model.User getUserById(long userId)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException, java.rmi.RemoteException {
139 return getService().getUserById(userId);
140 }
141
142 public static com.liferay.portal.model.User getUserByScreenName(
143 long companyId, java.lang.String screenName)
144 throws com.liferay.portal.PortalException,
145 com.liferay.portal.SystemException, java.rmi.RemoteException {
146 return getService().getUserByScreenName(companyId, screenName);
147 }
148
149 public static long getUserIdByEmailAddress(long companyId,
150 java.lang.String emailAddress)
151 throws com.liferay.portal.PortalException,
152 com.liferay.portal.SystemException, java.rmi.RemoteException {
153 return getService().getUserIdByEmailAddress(companyId, emailAddress);
154 }
155
156 public static long getUserIdByScreenName(long companyId,
157 java.lang.String screenName)
158 throws com.liferay.portal.PortalException,
159 com.liferay.portal.SystemException, java.rmi.RemoteException {
160 return getService().getUserIdByScreenName(companyId, screenName);
161 }
162
163 public static boolean hasGroupUser(long groupId, long userId)
164 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
165 return getService().hasGroupUser(groupId, userId);
166 }
167
168 public static boolean hasRoleUser(long roleId, long userId)
169 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
170 return getService().hasRoleUser(roleId, userId);
171 }
172
173 public static boolean hasRoleUser(long companyId, java.lang.String name,
174 long userId, boolean inherited)
175 throws com.liferay.portal.PortalException,
176 com.liferay.portal.SystemException, java.rmi.RemoteException {
177 return getService().hasRoleUser(companyId, name, userId, inherited);
178 }
179
180 public static void setRoleUsers(long roleId, long[] userIds)
181 throws com.liferay.portal.PortalException,
182 com.liferay.portal.SystemException, java.rmi.RemoteException {
183 getService().setRoleUsers(roleId, userIds);
184 }
185
186 public static void setUserGroupUsers(long userGroupId, long[] userIds)
187 throws com.liferay.portal.PortalException,
188 com.liferay.portal.SystemException, java.rmi.RemoteException {
189 getService().setUserGroupUsers(userGroupId, userIds);
190 }
191
192 public static void unsetGroupUsers(long groupId, long[] userIds)
193 throws com.liferay.portal.PortalException,
194 com.liferay.portal.SystemException, java.rmi.RemoteException {
195 getService().unsetGroupUsers(groupId, userIds);
196 }
197
198 public static void unsetOrganizationUsers(long organizationId,
199 long[] userIds)
200 throws com.liferay.portal.PortalException,
201 com.liferay.portal.SystemException, java.rmi.RemoteException {
202 getService().unsetOrganizationUsers(organizationId, userIds);
203 }
204
205 public static void unsetPasswordPolicyUsers(long passwordPolicyId,
206 long[] userIds)
207 throws com.liferay.portal.PortalException,
208 com.liferay.portal.SystemException, java.rmi.RemoteException {
209 getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds);
210 }
211
212 public static void unsetRoleUsers(long roleId, long[] userIds)
213 throws com.liferay.portal.PortalException,
214 com.liferay.portal.SystemException, java.rmi.RemoteException {
215 getService().unsetRoleUsers(roleId, userIds);
216 }
217
218 public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
219 throws com.liferay.portal.PortalException,
220 com.liferay.portal.SystemException, java.rmi.RemoteException {
221 getService().unsetUserGroupUsers(userGroupId, userIds);
222 }
223
224 public static com.liferay.portal.model.User updateActive(long userId,
225 boolean active)
226 throws com.liferay.portal.PortalException,
227 com.liferay.portal.SystemException, java.rmi.RemoteException {
228 return getService().updateActive(userId, active);
229 }
230
231 public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
232 long userId, boolean agreedToTermsOfUse)
233 throws com.liferay.portal.PortalException,
234 com.liferay.portal.SystemException, java.rmi.RemoteException {
235 return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse);
236 }
237
238 public static com.liferay.portal.model.User updateLockout(long userId,
239 boolean lockout)
240 throws com.liferay.portal.PortalException,
241 com.liferay.portal.SystemException, java.rmi.RemoteException {
242 return getService().updateLockout(userId, lockout);
243 }
244
245 public static void updateOpenId(long userId, java.lang.String openId)
246 throws com.liferay.portal.PortalException,
247 com.liferay.portal.SystemException, java.rmi.RemoteException {
248 getService().updateOpenId(userId, openId);
249 }
250
251 public static void updateOrganizations(long userId, long[] organizationIds)
252 throws com.liferay.portal.PortalException,
253 com.liferay.portal.SystemException, java.rmi.RemoteException {
254 getService().updateOrganizations(userId, organizationIds);
255 }
256
257 public static com.liferay.portal.model.User updatePassword(long userId,
258 java.lang.String password1, java.lang.String password2,
259 boolean passwordReset)
260 throws com.liferay.portal.PortalException,
261 com.liferay.portal.SystemException, java.rmi.RemoteException {
262 return getService()
263 .updatePassword(userId, password1, password2, passwordReset);
264 }
265
266 public static void updatePortrait(long userId, byte[] bytes)
267 throws com.liferay.portal.PortalException,
268 com.liferay.portal.SystemException, java.rmi.RemoteException {
269 getService().updatePortrait(userId, bytes);
270 }
271
272 public static void updateScreenName(long userId, java.lang.String screenName)
273 throws com.liferay.portal.PortalException,
274 com.liferay.portal.SystemException, java.rmi.RemoteException {
275 getService().updateScreenName(userId, screenName);
276 }
277
278 public static com.liferay.portal.model.User updateUser(long userId,
279 java.lang.String oldPassword, boolean passwordReset,
280 java.lang.String screenName, java.lang.String emailAddress,
281 java.lang.String languageId, java.lang.String timeZoneId,
282 java.lang.String greeting, java.lang.String comments,
283 java.lang.String firstName, java.lang.String middleName,
284 java.lang.String lastName, int prefixId, int suffixId, boolean male,
285 int birthdayMonth, int birthdayDay, int birthdayYear,
286 java.lang.String smsSn, java.lang.String aimSn,
287 java.lang.String facebookSn, java.lang.String icqSn,
288 java.lang.String jabberSn, java.lang.String msnSn,
289 java.lang.String mySpaceSn, java.lang.String skypeSn,
290 java.lang.String twitterSn, java.lang.String ymSn,
291 java.lang.String jobTitle, long[] organizationIds)
292 throws com.liferay.portal.PortalException,
293 com.liferay.portal.SystemException, java.rmi.RemoteException {
294 return getService()
295 .updateUser(userId, oldPassword, passwordReset, screenName,
296 emailAddress, languageId, timeZoneId, greeting, comments,
297 firstName, middleName, lastName, prefixId, suffixId, male,
298 birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn, facebookSn,
299 icqSn, jabberSn, msnSn, mySpaceSn, skypeSn, twitterSn, ymSn,
300 jobTitle, organizationIds);
301 }
302
303 public static com.liferay.portal.model.User updateUser(long userId,
304 java.lang.String oldPassword, java.lang.String newPassword1,
305 java.lang.String newPassword2, boolean passwordReset,
306 java.lang.String screenName, java.lang.String emailAddress,
307 java.lang.String languageId, java.lang.String timeZoneId,
308 java.lang.String greeting, java.lang.String comments,
309 java.lang.String firstName, java.lang.String middleName,
310 java.lang.String lastName, int prefixId, int suffixId, boolean male,
311 int birthdayMonth, int birthdayDay, int birthdayYear,
312 java.lang.String smsSn, java.lang.String aimSn,
313 java.lang.String facebookSn, java.lang.String icqSn,
314 java.lang.String jabberSn, java.lang.String msnSn,
315 java.lang.String mySpaceSn, java.lang.String skypeSn,
316 java.lang.String twitterSn, java.lang.String ymSn,
317 java.lang.String jobTitle, long[] organizationIds)
318 throws com.liferay.portal.PortalException,
319 com.liferay.portal.SystemException, java.rmi.RemoteException {
320 return getService()
321 .updateUser(userId, oldPassword, newPassword1, newPassword2,
322 passwordReset, screenName, emailAddress, languageId, timeZoneId,
323 greeting, comments, firstName, middleName, lastName, prefixId,
324 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, smsSn,
325 aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, skypeSn,
326 twitterSn, ymSn, jobTitle, organizationIds);
327 }
328
329 public static UserService getService() {
330 if (_service == null) {
331 throw new RuntimeException("UserService is not set");
332 }
333
334 return _service;
335 }
336
337 public void setService(UserService service) {
338 _service = service;
339 }
340
341 private static UserService _service;
342 }