1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="UserServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link UserService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       UserService
37   * @generated
38   */
39  public class UserServiceUtil {
40      public static void addGroupUsers(long groupId, long[] userIds)
41          throws com.liferay.portal.PortalException,
42              com.liferay.portal.SystemException, java.rmi.RemoteException {
43          getService().addGroupUsers(groupId, userIds);
44      }
45  
46      public static void addOrganizationUsers(long organizationId, long[] userIds)
47          throws com.liferay.portal.PortalException,
48              com.liferay.portal.SystemException, java.rmi.RemoteException {
49          getService().addOrganizationUsers(organizationId, userIds);
50      }
51  
52      public static void addPasswordPolicyUsers(long passwordPolicyId,
53          long[] userIds)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException, java.rmi.RemoteException {
56          getService().addPasswordPolicyUsers(passwordPolicyId, userIds);
57      }
58  
59      public static void addRoleUsers(long roleId, long[] userIds)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException, java.rmi.RemoteException {
62          getService().addRoleUsers(roleId, userIds);
63      }
64  
65      public static void addUserGroupUsers(long userGroupId, long[] userIds)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException, java.rmi.RemoteException {
68          getService().addUserGroupUsers(userGroupId, userIds);
69      }
70  
71      public static com.liferay.portal.model.User addUser(long companyId,
72          boolean autoPassword, java.lang.String password1,
73          java.lang.String password2, boolean autoScreenName,
74          java.lang.String screenName, java.lang.String emailAddress,
75          java.util.Locale locale, java.lang.String firstName,
76          java.lang.String middleName, java.lang.String lastName, int prefixId,
77          int suffixId, boolean male, int birthdayMonth, int birthdayDay,
78          int birthdayYear, java.lang.String jobTitle, long[] organizationIds,
79          boolean sendEmail)
80          throws com.liferay.portal.PortalException,
81              com.liferay.portal.SystemException, java.rmi.RemoteException {
82          return getService()
83                     .addUser(companyId, autoPassword, password1, password2,
84              autoScreenName, screenName, emailAddress, locale, firstName,
85              middleName, lastName, prefixId, suffixId, male, birthdayMonth,
86              birthdayDay, birthdayYear, jobTitle, organizationIds, sendEmail);
87      }
88  
89      public static void deleteRoleUser(long roleId, long userId)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException, java.rmi.RemoteException {
92          getService().deleteRoleUser(roleId, userId);
93      }
94  
95      public static void deleteUser(long userId)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException, java.rmi.RemoteException {
98          getService().deleteUser(userId);
99      }
100 
101     public static long getDefaultUserId(long companyId)
102         throws com.liferay.portal.PortalException,
103             com.liferay.portal.SystemException, java.rmi.RemoteException {
104         return getService().getDefaultUserId(companyId);
105     }
106 
107     public static long[] getGroupUserIds(long groupId)
108         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
109         return getService().getGroupUserIds(groupId);
110     }
111 
112     public static long[] getOrganizationUserIds(long organizationId)
113         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
114         return getService().getOrganizationUserIds(organizationId);
115     }
116 
117     public static long[] getRoleUserIds(long roleId)
118         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
119         return getService().getRoleUserIds(roleId);
120     }
121 
122     public static com.liferay.portal.model.User getUserByEmailAddress(
123         long companyId, java.lang.String emailAddress)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException, java.rmi.RemoteException {
126         return getService().getUserByEmailAddress(companyId, emailAddress);
127     }
128 
129     public static com.liferay.portal.model.User getUserById(long userId)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException, java.rmi.RemoteException {
132         return getService().getUserById(userId);
133     }
134 
135     public static com.liferay.portal.model.User getUserByScreenName(
136         long companyId, java.lang.String screenName)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException, java.rmi.RemoteException {
139         return getService().getUserByScreenName(companyId, screenName);
140     }
141 
142     public static long getUserIdByEmailAddress(long companyId,
143         java.lang.String emailAddress)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException, java.rmi.RemoteException {
146         return getService().getUserIdByEmailAddress(companyId, emailAddress);
147     }
148 
149     public static long getUserIdByScreenName(long companyId,
150         java.lang.String screenName)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException, java.rmi.RemoteException {
153         return getService().getUserIdByScreenName(companyId, screenName);
154     }
155 
156     public static boolean hasGroupUser(long groupId, long userId)
157         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
158         return getService().hasGroupUser(groupId, userId);
159     }
160 
161     public static boolean hasRoleUser(long roleId, long userId)
162         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
163         return getService().hasRoleUser(roleId, userId);
164     }
165 
166     public static boolean hasRoleUser(long companyId, java.lang.String name,
167         long userId, boolean inherited)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException, java.rmi.RemoteException {
170         return getService().hasRoleUser(companyId, name, userId, inherited);
171     }
172 
173     public static void setRoleUsers(long roleId, long[] userIds)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException, java.rmi.RemoteException {
176         getService().setRoleUsers(roleId, userIds);
177     }
178 
179     public static void setUserGroupUsers(long userGroupId, long[] userIds)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException, java.rmi.RemoteException {
182         getService().setUserGroupUsers(userGroupId, userIds);
183     }
184 
185     public static void unsetGroupUsers(long groupId, long[] userIds)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException, java.rmi.RemoteException {
188         getService().unsetGroupUsers(groupId, userIds);
189     }
190 
191     public static void unsetOrganizationUsers(long organizationId,
192         long[] userIds)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException, java.rmi.RemoteException {
195         getService().unsetOrganizationUsers(organizationId, userIds);
196     }
197 
198     public static void unsetPasswordPolicyUsers(long passwordPolicyId,
199         long[] userIds)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException, java.rmi.RemoteException {
202         getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds);
203     }
204 
205     public static void unsetRoleUsers(long roleId, long[] userIds)
206         throws com.liferay.portal.PortalException,
207             com.liferay.portal.SystemException, java.rmi.RemoteException {
208         getService().unsetRoleUsers(roleId, userIds);
209     }
210 
211     public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
212         throws com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException, java.rmi.RemoteException {
214         getService().unsetUserGroupUsers(userGroupId, userIds);
215     }
216 
217     public static com.liferay.portal.model.User updateActive(long userId,
218         boolean active)
219         throws com.liferay.portal.PortalException,
220             com.liferay.portal.SystemException, java.rmi.RemoteException {
221         return getService().updateActive(userId, active);
222     }
223 
224     public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
225         long userId, boolean agreedToTermsOfUse)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException, java.rmi.RemoteException {
228         return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse);
229     }
230 
231     public static com.liferay.portal.model.User updateLockout(long userId,
232         boolean lockout)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException, java.rmi.RemoteException {
235         return getService().updateLockout(userId, lockout);
236     }
237 
238     public static void updateOpenId(long userId, java.lang.String openId)
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException, java.rmi.RemoteException {
241         getService().updateOpenId(userId, openId);
242     }
243 
244     public static void updateOrganizations(long userId, long[] organizationIds)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException, java.rmi.RemoteException {
247         getService().updateOrganizations(userId, organizationIds);
248     }
249 
250     public static com.liferay.portal.model.User updatePassword(long userId,
251         java.lang.String password1, java.lang.String password2,
252         boolean passwordReset)
253         throws com.liferay.portal.PortalException,
254             com.liferay.portal.SystemException, java.rmi.RemoteException {
255         return getService()
256                    .updatePassword(userId, password1, password2, passwordReset);
257     }
258 
259     public static void updatePortrait(long userId, byte[] bytes)
260         throws com.liferay.portal.PortalException,
261             com.liferay.portal.SystemException, java.rmi.RemoteException {
262         getService().updatePortrait(userId, bytes);
263     }
264 
265     public static void updateScreenName(long userId, java.lang.String screenName)
266         throws com.liferay.portal.PortalException,
267             com.liferay.portal.SystemException, java.rmi.RemoteException {
268         getService().updateScreenName(userId, screenName);
269     }
270 
271     public static com.liferay.portal.model.User updateUser(long userId,
272         java.lang.String oldPassword, boolean passwordReset,
273         java.lang.String screenName, java.lang.String emailAddress,
274         java.lang.String languageId, java.lang.String timeZoneId,
275         java.lang.String greeting, java.lang.String comments,
276         java.lang.String firstName, java.lang.String middleName,
277         java.lang.String lastName, int prefixId, int suffixId, boolean male,
278         int birthdayMonth, int birthdayDay, int birthdayYear,
279         java.lang.String smsSn, java.lang.String aimSn,
280         java.lang.String facebookSn, java.lang.String icqSn,
281         java.lang.String jabberSn, java.lang.String msnSn,
282         java.lang.String mySpaceSn, java.lang.String skypeSn,
283         java.lang.String twitterSn, java.lang.String ymSn,
284         java.lang.String jobTitle, long[] organizationIds)
285         throws com.liferay.portal.PortalException,
286             com.liferay.portal.SystemException, java.rmi.RemoteException {
287         return getService()
288                    .updateUser(userId, oldPassword, passwordReset, screenName,
289             emailAddress, languageId, timeZoneId, greeting, comments,
290             firstName, middleName, lastName, prefixId, suffixId, male,
291             birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn, facebookSn,
292             icqSn, jabberSn, msnSn, mySpaceSn, skypeSn, twitterSn, ymSn,
293             jobTitle, organizationIds);
294     }
295 
296     public static com.liferay.portal.model.User updateUser(long userId,
297         java.lang.String oldPassword, java.lang.String newPassword1,
298         java.lang.String newPassword2, boolean passwordReset,
299         java.lang.String screenName, java.lang.String emailAddress,
300         java.lang.String languageId, java.lang.String timeZoneId,
301         java.lang.String greeting, java.lang.String comments,
302         java.lang.String firstName, java.lang.String middleName,
303         java.lang.String lastName, int prefixId, int suffixId, boolean male,
304         int birthdayMonth, int birthdayDay, int birthdayYear,
305         java.lang.String smsSn, java.lang.String aimSn,
306         java.lang.String facebookSn, java.lang.String icqSn,
307         java.lang.String jabberSn, java.lang.String msnSn,
308         java.lang.String mySpaceSn, java.lang.String skypeSn,
309         java.lang.String twitterSn, java.lang.String ymSn,
310         java.lang.String jobTitle, long[] organizationIds)
311         throws com.liferay.portal.PortalException,
312             com.liferay.portal.SystemException, java.rmi.RemoteException {
313         return getService()
314                    .updateUser(userId, oldPassword, newPassword1, newPassword2,
315             passwordReset, screenName, emailAddress, languageId, timeZoneId,
316             greeting, comments, firstName, middleName, lastName, prefixId,
317             suffixId, male, birthdayMonth, birthdayDay, birthdayYear, smsSn,
318             aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, skypeSn,
319             twitterSn, ymSn, jobTitle, organizationIds);
320     }
321 
322     public static UserService getService() {
323         if (_service == null) {
324             _service = (UserService)PortalBeanLocatorUtil.locate(UserService.class.getName());
325         }
326 
327         return _service;
328     }
329 
330     public void setService(UserService service) {
331         _service = service;
332     }
333 
334     private static UserService _service;
335 }