1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service;
24  
25  
26  /**
27   * <a href="UserServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portal.service.UserService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portal.service.UserService
45   *
46   */
47  public class UserServiceUtil {
48      public static void addGroupUsers(long groupId, long[] userIds)
49          throws com.liferay.portal.PortalException,
50              com.liferay.portal.SystemException, java.rmi.RemoteException {
51          _service.addGroupUsers(groupId, userIds);
52      }
53  
54      public static void addOrganizationUsers(long organizationId, long[] userIds)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException, java.rmi.RemoteException {
57          _service.addOrganizationUsers(organizationId, userIds);
58      }
59  
60      public static void addPasswordPolicyUsers(long passwordPolicyId,
61          long[] userIds)
62          throws com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException, java.rmi.RemoteException {
64          _service.addPasswordPolicyUsers(passwordPolicyId, userIds);
65      }
66  
67      public static void addRoleUsers(long roleId, long[] userIds)
68          throws com.liferay.portal.PortalException,
69              com.liferay.portal.SystemException, java.rmi.RemoteException {
70          _service.addRoleUsers(roleId, userIds);
71      }
72  
73      public static void addUserGroupUsers(long userGroupId, long[] userIds)
74          throws com.liferay.portal.PortalException,
75              com.liferay.portal.SystemException, java.rmi.RemoteException {
76          _service.addUserGroupUsers(userGroupId, userIds);
77      }
78  
79      public static com.liferay.portal.model.User addUser(long companyId,
80          boolean autoPassword, java.lang.String password1,
81          java.lang.String password2, boolean autoScreenName,
82          java.lang.String screenName, java.lang.String emailAddress,
83          java.util.Locale locale, java.lang.String firstName,
84          java.lang.String middleName, java.lang.String lastName, int prefixId,
85          int suffixId, boolean male, int birthdayMonth, int birthdayDay,
86          int birthdayYear, java.lang.String jobTitle, long[] organizationIds,
87          boolean sendEmail)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException, java.rmi.RemoteException {
90          return _service.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          _service.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         _service.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 _service.getDefaultUserId(companyId);
112     }
113 
114     public static java.util.List<com.liferay.portal.model.User> getGroupUsers(
115         long groupId)
116         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
117         return _service.getGroupUsers(groupId);
118     }
119 
120     public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
121         long roleId)
122         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
123         return _service.getRoleUsers(roleId);
124     }
125 
126     public static com.liferay.portal.model.User getUserByEmailAddress(
127         long companyId, java.lang.String emailAddress)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException, java.rmi.RemoteException {
130         return _service.getUserByEmailAddress(companyId, emailAddress);
131     }
132 
133     public static com.liferay.portal.model.User getUserById(long userId)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException, java.rmi.RemoteException {
136         return _service.getUserById(userId);
137     }
138 
139     public static com.liferay.portal.model.User getUserByScreenName(
140         long companyId, java.lang.String screenName)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException, java.rmi.RemoteException {
143         return _service.getUserByScreenName(companyId, screenName);
144     }
145 
146     public static long getUserIdByEmailAddress(long companyId,
147         java.lang.String emailAddress)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException, java.rmi.RemoteException {
150         return _service.getUserIdByEmailAddress(companyId, emailAddress);
151     }
152 
153     public static long getUserIdByScreenName(long companyId,
154         java.lang.String screenName)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException, java.rmi.RemoteException {
157         return _service.getUserIdByScreenName(companyId, screenName);
158     }
159 
160     public static boolean hasGroupUser(long groupId, long userId)
161         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
162         return _service.hasGroupUser(groupId, userId);
163     }
164 
165     public static boolean hasRoleUser(long roleId, long userId)
166         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
167         return _service.hasRoleUser(roleId, userId);
168     }
169 
170     public static void setRoleUsers(long roleId, long[] userIds)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException, java.rmi.RemoteException {
173         _service.setRoleUsers(roleId, userIds);
174     }
175 
176     public static void setUserGroupUsers(long userGroupId, long[] userIds)
177         throws com.liferay.portal.PortalException,
178             com.liferay.portal.SystemException, java.rmi.RemoteException {
179         _service.setUserGroupUsers(userGroupId, userIds);
180     }
181 
182     public static void unsetGroupUsers(long groupId, long[] userIds)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException, java.rmi.RemoteException {
185         _service.unsetGroupUsers(groupId, userIds);
186     }
187 
188     public static void unsetOrganizationUsers(long organizationId,
189         long[] userIds)
190         throws com.liferay.portal.PortalException,
191             com.liferay.portal.SystemException, java.rmi.RemoteException {
192         _service.unsetOrganizationUsers(organizationId, userIds);
193     }
194 
195     public static void unsetPasswordPolicyUsers(long passwordPolicyId,
196         long[] userIds)
197         throws com.liferay.portal.PortalException,
198             com.liferay.portal.SystemException, java.rmi.RemoteException {
199         _service.unsetPasswordPolicyUsers(passwordPolicyId, userIds);
200     }
201 
202     public static void unsetRoleUsers(long roleId, long[] userIds)
203         throws com.liferay.portal.PortalException,
204             com.liferay.portal.SystemException, java.rmi.RemoteException {
205         _service.unsetRoleUsers(roleId, userIds);
206     }
207 
208     public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException, java.rmi.RemoteException {
211         _service.unsetUserGroupUsers(userGroupId, userIds);
212     }
213 
214     public static com.liferay.portal.model.User updateActive(long userId,
215         boolean active)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException, java.rmi.RemoteException {
218         return _service.updateActive(userId, active);
219     }
220 
221     public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
222         long userId, boolean agreedToTermsOfUse)
223         throws com.liferay.portal.PortalException,
224             com.liferay.portal.SystemException, java.rmi.RemoteException {
225         return _service.updateAgreedToTermsOfUse(userId, agreedToTermsOfUse);
226     }
227 
228     public static com.liferay.portal.model.User updateLockout(long userId,
229         boolean lockout)
230         throws com.liferay.portal.PortalException,
231             com.liferay.portal.SystemException, java.rmi.RemoteException {
232         return _service.updateLockout(userId, lockout);
233     }
234 
235     public static void updateOrganizations(long userId, long[] organizationIds)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.SystemException, java.rmi.RemoteException {
238         _service.updateOrganizations(userId, organizationIds);
239     }
240 
241     public static com.liferay.portal.model.User updatePassword(long userId,
242         java.lang.String password1, java.lang.String password2,
243         boolean passwordReset)
244         throws com.liferay.portal.PortalException,
245             com.liferay.portal.SystemException, java.rmi.RemoteException {
246         return _service.updatePassword(userId, password1, password2,
247             passwordReset);
248     }
249 
250     public static void updatePortrait(long userId, byte[] bytes)
251         throws com.liferay.portal.PortalException,
252             com.liferay.portal.SystemException, java.rmi.RemoteException {
253         _service.updatePortrait(userId, bytes);
254     }
255 
256     public static void updateScreenName(long userId, java.lang.String screenName)
257         throws com.liferay.portal.PortalException,
258             com.liferay.portal.SystemException, java.rmi.RemoteException {
259         _service.updateScreenName(userId, screenName);
260     }
261 
262     public static void updateOpenId(long userId, java.lang.String openId)
263         throws com.liferay.portal.PortalException,
264             com.liferay.portal.SystemException, java.rmi.RemoteException {
265         _service.updateOpenId(userId, openId);
266     }
267 
268     public static com.liferay.portal.model.User updateUser(long userId,
269         java.lang.String oldPassword, boolean passwordReset,
270         java.lang.String screenName, java.lang.String emailAddress,
271         java.lang.String languageId, java.lang.String timeZoneId,
272         java.lang.String greeting, java.lang.String comments,
273         java.lang.String firstName, java.lang.String middleName,
274         java.lang.String lastName, int prefixId, int suffixId, boolean male,
275         int birthdayMonth, int birthdayDay, int birthdayYear,
276         java.lang.String smsSn, java.lang.String aimSn,
277         java.lang.String facebookSn, java.lang.String icqSn,
278         java.lang.String jabberSn, java.lang.String msnSn,
279         java.lang.String mySpaceSn, java.lang.String skypeSn,
280         java.lang.String twitterSn, java.lang.String ymSn,
281         java.lang.String jobTitle, long[] organizationIds)
282         throws com.liferay.portal.PortalException,
283             com.liferay.portal.SystemException, java.rmi.RemoteException {
284         return _service.updateUser(userId, oldPassword, passwordReset,
285             screenName, emailAddress, languageId, timeZoneId, greeting,
286             comments, firstName, middleName, lastName, prefixId, suffixId,
287             male, birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn,
288             facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, skypeSn, twitterSn,
289             ymSn, jobTitle, organizationIds);
290     }
291 
292     public static com.liferay.portal.model.User updateUser(long userId,
293         java.lang.String oldPassword, java.lang.String newPassword1,
294         java.lang.String newPassword2, boolean passwordReset,
295         java.lang.String screenName, java.lang.String emailAddress,
296         java.lang.String languageId, java.lang.String timeZoneId,
297         java.lang.String greeting, java.lang.String comments,
298         java.lang.String firstName, java.lang.String middleName,
299         java.lang.String lastName, int prefixId, int suffixId, boolean male,
300         int birthdayMonth, int birthdayDay, int birthdayYear,
301         java.lang.String smsSn, java.lang.String aimSn,
302         java.lang.String facebookSn, java.lang.String icqSn,
303         java.lang.String jabberSn, java.lang.String msnSn,
304         java.lang.String mySpaceSn, java.lang.String skypeSn,
305         java.lang.String twitterSn, java.lang.String ymSn,
306         java.lang.String jobTitle, long[] organizationIds)
307         throws com.liferay.portal.PortalException,
308             com.liferay.portal.SystemException, java.rmi.RemoteException {
309         return _service.updateUser(userId, oldPassword, newPassword1,
310             newPassword2, passwordReset, screenName, emailAddress, languageId,
311             timeZoneId, greeting, comments, firstName, middleName, lastName,
312             prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
313             smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn,
314             skypeSn, twitterSn, ymSn, jobTitle, organizationIds);
315     }
316 
317     public static UserService getService() {
318         return _service;
319     }
320 
321     public void setService(UserService service) {
322         _service = service;
323     }
324 
325     private static UserService _service;
326 }