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="UserLocalService.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 interface defines the service. The default implementation is
36   * <code>com.liferay.portal.service.impl.UserLocalServiceImpl</code>.
37   * Modify methods in that class and rerun ServiceBuilder to populate this class
38   * and all other generated classes.
39   * </p>
40   *
41   * <p>
42   * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portal.service.UserLocalServiceUtil
48   *
49   */
50  public interface UserLocalService {
51      public com.liferay.portal.model.User addUser(
52          com.liferay.portal.model.User user)
53          throws com.liferay.portal.SystemException;
54  
55      public com.liferay.portal.model.User createUser(long userId);
56  
57      public void deleteUser(long userId)
58          throws com.liferay.portal.SystemException,
59              com.liferay.portal.PortalException;
60  
61      public void deleteUser(com.liferay.portal.model.User user)
62          throws com.liferay.portal.SystemException;
63  
64      public java.util.List<Object> dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.SystemException;
67  
68      public java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
70          int end) throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portal.model.User getUser(long userId)
73          throws com.liferay.portal.SystemException,
74              com.liferay.portal.PortalException;
75  
76      public java.util.List<com.liferay.portal.model.User> getUsers(int start,
77          int end) throws com.liferay.portal.SystemException;
78  
79      public int getUsersCount() throws com.liferay.portal.SystemException;
80  
81      public com.liferay.portal.model.User updateUser(
82          com.liferay.portal.model.User user)
83          throws com.liferay.portal.SystemException;
84  
85      public void addGroupUsers(long groupId, long[] userIds)
86          throws com.liferay.portal.PortalException,
87              com.liferay.portal.SystemException;
88  
89      public void addOrganizationUsers(long organizationId, long[] userIds)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException;
92  
93      public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
94          throws com.liferay.portal.SystemException;
95  
96      public void addRoleUsers(long roleId, long[] userIds)
97          throws com.liferay.portal.SystemException;
98  
99      public void addUserGroupUsers(long userGroupId, long[] userIds)
100         throws com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException;
102 
103     public com.liferay.portal.model.User addUser(long creatorUserId,
104         long companyId, boolean autoPassword, java.lang.String password1,
105         java.lang.String password2, boolean autoScreenName,
106         java.lang.String screenName, java.lang.String emailAddress,
107         java.util.Locale locale, java.lang.String firstName,
108         java.lang.String middleName, java.lang.String lastName, int prefixId,
109         int suffixId, boolean male, int birthdayMonth, int birthdayDay,
110         int birthdayYear, java.lang.String jobTitle, long[] organizationIds,
111         boolean sendEmail)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException;
114 
115     public int authenticateByEmailAddress(long companyId,
116         java.lang.String emailAddress, java.lang.String password,
117         java.util.Map<String, String[]> headerMap,
118         java.util.Map<String, String[]> parameterMap)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException;
121 
122     public int authenticateByScreenName(long companyId,
123         java.lang.String screenName, java.lang.String password,
124         java.util.Map<String, String[]> headerMap,
125         java.util.Map<String, String[]> parameterMap)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException;
128 
129     public int authenticateByUserId(long companyId, long userId,
130         java.lang.String password, java.util.Map<String, String[]> headerMap,
131         java.util.Map<String, String[]> parameterMap)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException;
134 
135     public long authenticateForBasic(long companyId, java.lang.String authType,
136         java.lang.String login, java.lang.String password)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException;
139 
140     public boolean authenticateForJAAS(long userId, java.lang.String encPassword);
141 
142     public void checkLockout(com.liferay.portal.model.User user)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException;
145 
146     public void checkLoginFailure(com.liferay.portal.model.User user)
147         throws com.liferay.portal.SystemException;
148 
149     public void checkLoginFailureByEmailAddress(long companyId,
150         java.lang.String emailAddress)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException;
153 
154     public void checkLoginFailureById(long userId)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException;
157 
158     public void checkLoginFailureByScreenName(long companyId,
159         java.lang.String screenName)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException;
162 
163     public void checkPasswordExpired(com.liferay.portal.model.User user)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException;
166 
167     public void clearOrganizationUsers(long organizationId)
168         throws com.liferay.portal.SystemException;
169 
170     public void clearUserGroupUsers(long userGroupId)
171         throws com.liferay.portal.SystemException;
172 
173     public com.liferay.portal.kernel.util.KeyValuePair decryptUserId(
174         long companyId, java.lang.String name, java.lang.String password)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException;
177 
178     public void deletePasswordPolicyUser(long passwordPolicyId, long userId)
179         throws com.liferay.portal.SystemException;
180 
181     public void deleteRoleUser(long roleId, long userId)
182         throws com.liferay.portal.SystemException;
183 
184     public java.lang.String encryptUserId(java.lang.String name)
185         throws com.liferay.portal.PortalException,
186             com.liferay.portal.SystemException;
187 
188     public com.liferay.portal.model.User getDefaultUser(long companyId)
189         throws com.liferay.portal.PortalException,
190             com.liferay.portal.SystemException;
191 
192     public long getDefaultUserId(long companyId)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException;
195 
196     public java.util.List<com.liferay.portal.model.User> getGroupUsers(
197         long groupId) throws com.liferay.portal.SystemException;
198 
199     public int getGroupUsersCount(long groupId)
200         throws com.liferay.portal.SystemException;
201 
202     public int getGroupUsersCount(long groupId, boolean active)
203         throws com.liferay.portal.PortalException,
204             com.liferay.portal.SystemException;
205 
206     public java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries(
207         java.lang.String type) throws com.liferay.portal.SystemException;
208 
209     public java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
210         long organizationId) throws com.liferay.portal.SystemException;
211 
212     public int getOrganizationUsersCount(long organizationId)
213         throws com.liferay.portal.SystemException;
214 
215     public int getOrganizationUsersCount(long organizationId, boolean active)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException;
218 
219     public java.util.List<com.liferay.portal.model.User> getPermissionUsers(
220         long companyId, long groupId, java.lang.String name,
221         java.lang.String primKey, java.lang.String actionId,
222         java.lang.String firstName, java.lang.String middleName,
223         java.lang.String lastName, java.lang.String emailAddress,
224         boolean andOperator, int start, int end)
225         throws com.liferay.portal.SystemException;
226 
227     public int getPermissionUsersCount(long companyId, long groupId,
228         java.lang.String name, java.lang.String primKey,
229         java.lang.String actionId, java.lang.String firstName,
230         java.lang.String middleName, java.lang.String lastName,
231         java.lang.String emailAddress, boolean andOperator)
232         throws com.liferay.portal.SystemException;
233 
234     public java.util.List<com.liferay.portal.model.User> getRoleUsers(
235         long roleId) throws com.liferay.portal.SystemException;
236 
237     public int getRoleUsersCount(long roleId)
238         throws com.liferay.portal.SystemException;
239 
240     public int getRoleUsersCount(long roleId, boolean active)
241         throws com.liferay.portal.PortalException,
242             com.liferay.portal.SystemException;
243 
244     public java.util.List<com.liferay.portal.model.User> getSocialUsers(
245         long userId, int start, int end,
246         com.liferay.portal.kernel.util.OrderByComparator obc)
247         throws com.liferay.portal.PortalException,
248             com.liferay.portal.SystemException;
249 
250     public java.util.List<com.liferay.portal.model.User> getSocialUsers(
251         long userId, int type, int start, int end,
252         com.liferay.portal.kernel.util.OrderByComparator obc)
253         throws com.liferay.portal.PortalException,
254             com.liferay.portal.SystemException;
255 
256     public java.util.List<com.liferay.portal.model.User> getSocialUsers(
257         long userId1, long userId2, int start, int end,
258         com.liferay.portal.kernel.util.OrderByComparator obc)
259         throws com.liferay.portal.PortalException,
260             com.liferay.portal.SystemException;
261 
262     public java.util.List<com.liferay.portal.model.User> getSocialUsers(
263         long userId1, long userId2, int type, int start, int end,
264         com.liferay.portal.kernel.util.OrderByComparator obc)
265         throws com.liferay.portal.PortalException,
266             com.liferay.portal.SystemException;
267 
268     public int getSocialUsersCount(long userId)
269         throws com.liferay.portal.PortalException,
270             com.liferay.portal.SystemException;
271 
272     public int getSocialUsersCount(long userId, int type)
273         throws com.liferay.portal.PortalException,
274             com.liferay.portal.SystemException;
275 
276     public int getSocialUsersCount(long userId1, long userId2)
277         throws com.liferay.portal.PortalException,
278             com.liferay.portal.SystemException;
279 
280     public int getSocialUsersCount(long userId1, long userId2, int type)
281         throws com.liferay.portal.PortalException,
282             com.liferay.portal.SystemException;
283 
284     public java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
285         long userGroupId) throws com.liferay.portal.SystemException;
286 
287     public int getUserGroupUsersCount(long userGroupId)
288         throws com.liferay.portal.SystemException;
289 
290     public int getUserGroupUsersCount(long userGroupId, boolean active)
291         throws com.liferay.portal.PortalException,
292             com.liferay.portal.SystemException;
293 
294     public com.liferay.portal.model.User getUserByContactId(long contactId)
295         throws com.liferay.portal.PortalException,
296             com.liferay.portal.SystemException;
297 
298     public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
299         java.lang.String emailAddress)
300         throws com.liferay.portal.PortalException,
301             com.liferay.portal.SystemException;
302 
303     public com.liferay.portal.model.User getUserById(long userId)
304         throws com.liferay.portal.PortalException,
305             com.liferay.portal.SystemException;
306 
307     public com.liferay.portal.model.User getUserById(long companyId, long userId)
308         throws com.liferay.portal.PortalException,
309             com.liferay.portal.SystemException;
310 
311     public com.liferay.portal.model.User getUserByOpenId(
312         java.lang.String openId)
313         throws com.liferay.portal.PortalException,
314             com.liferay.portal.SystemException;
315 
316     public com.liferay.portal.model.User getUserByPortraitId(long portraitId)
317         throws com.liferay.portal.PortalException,
318             com.liferay.portal.SystemException;
319 
320     public com.liferay.portal.model.User getUserByScreenName(long companyId,
321         java.lang.String screenName)
322         throws com.liferay.portal.PortalException,
323             com.liferay.portal.SystemException;
324 
325     public long getUserIdByEmailAddress(long companyId,
326         java.lang.String emailAddress)
327         throws com.liferay.portal.PortalException,
328             com.liferay.portal.SystemException;
329 
330     public long getUserIdByScreenName(long companyId,
331         java.lang.String screenName)
332         throws com.liferay.portal.PortalException,
333             com.liferay.portal.SystemException;
334 
335     public boolean hasGroupUser(long groupId, long userId)
336         throws com.liferay.portal.SystemException;
337 
338     public boolean hasOrganizationUser(long organizationId, long userId)
339         throws com.liferay.portal.SystemException;
340 
341     public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId)
342         throws com.liferay.portal.SystemException;
343 
344     public boolean hasRoleUser(long roleId, long userId)
345         throws com.liferay.portal.SystemException;
346 
347     public boolean hasUserGroupUser(long userGroupId, long userId)
348         throws com.liferay.portal.SystemException;
349 
350     public boolean isPasswordExpired(com.liferay.portal.model.User user)
351         throws com.liferay.portal.PortalException,
352             com.liferay.portal.SystemException;
353 
354     public boolean isPasswordExpiringSoon(com.liferay.portal.model.User user)
355         throws com.liferay.portal.PortalException,
356             com.liferay.portal.SystemException;
357 
358     public java.util.List<com.liferay.portal.model.User> search(
359         long companyId, java.lang.String keywords, java.lang.Boolean active,
360         java.util.LinkedHashMap<String, Object> params, int start, int end,
361         com.liferay.portal.kernel.util.OrderByComparator obc)
362         throws com.liferay.portal.SystemException;
363 
364     public java.util.List<com.liferay.portal.model.User> search(
365         long companyId, java.lang.String firstName,
366         java.lang.String middleName, java.lang.String lastName,
367         java.lang.String screenName, java.lang.String emailAddress,
368         java.lang.Boolean active,
369         java.util.LinkedHashMap<String, Object> params, boolean andSearch,
370         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
371         throws com.liferay.portal.SystemException;
372 
373     public int searchCount(long companyId, java.lang.String keywords,
374         java.lang.Boolean active, java.util.LinkedHashMap<String, Object> params)
375         throws com.liferay.portal.SystemException;
376 
377     public int searchCount(long companyId, java.lang.String firstName,
378         java.lang.String middleName, java.lang.String lastName,
379         java.lang.String screenName, java.lang.String emailAddress,
380         java.lang.Boolean active,
381         java.util.LinkedHashMap<String, Object> params, boolean andSearch)
382         throws com.liferay.portal.SystemException;
383 
384     public void sendPassword(long companyId, java.lang.String emailAddress,
385         java.lang.String remoteAddr, java.lang.String remoteHost,
386         java.lang.String userAgent)
387         throws com.liferay.portal.PortalException,
388             com.liferay.portal.SystemException;
389 
390     public void setRoleUsers(long roleId, long[] userIds)
391         throws com.liferay.portal.SystemException;
392 
393     public void setUserGroupUsers(long userGroupId, long[] userIds)
394         throws com.liferay.portal.PortalException,
395             com.liferay.portal.SystemException;
396 
397     public void unsetGroupUsers(long groupId, long[] userIds)
398         throws com.liferay.portal.SystemException;
399 
400     public void unsetOrganizationUsers(long organizationId, long[] userIds)
401         throws com.liferay.portal.PortalException,
402             com.liferay.portal.SystemException;
403 
404     public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
405         throws com.liferay.portal.SystemException;
406 
407     public void unsetRoleUsers(long roleId, long[] userIds)
408         throws com.liferay.portal.SystemException;
409 
410     public void unsetRoleUsers(long roleId,
411         java.util.List<com.liferay.portal.model.User> users)
412         throws com.liferay.portal.SystemException;
413 
414     public void unsetUserGroupUsers(long userGroupId, long[] userIds)
415         throws com.liferay.portal.SystemException;
416 
417     public com.liferay.portal.model.User updateActive(long userId,
418         boolean active)
419         throws com.liferay.portal.PortalException,
420             com.liferay.portal.SystemException;
421 
422     public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
423         boolean agreedToTermsOfUse)
424         throws com.liferay.portal.PortalException,
425             com.liferay.portal.SystemException;
426 
427     public com.liferay.portal.model.User updateCreateDate(long userId,
428         java.util.Date createDate)
429         throws com.liferay.portal.PortalException,
430             com.liferay.portal.SystemException;
431 
432     public com.liferay.portal.model.User updateLastLogin(long userId,
433         java.lang.String loginIP)
434         throws com.liferay.portal.PortalException,
435             com.liferay.portal.SystemException;
436 
437     public com.liferay.portal.model.User updateLockout(
438         com.liferay.portal.model.User user, boolean lockout)
439         throws com.liferay.portal.PortalException,
440             com.liferay.portal.SystemException;
441 
442     public com.liferay.portal.model.User updateLockoutByEmailAddress(
443         long companyId, java.lang.String emailAddress, boolean lockout)
444         throws com.liferay.portal.PortalException,
445             com.liferay.portal.SystemException;
446 
447     public com.liferay.portal.model.User updateLockoutById(long userId,
448         boolean lockout)
449         throws com.liferay.portal.PortalException,
450             com.liferay.portal.SystemException;
451 
452     public com.liferay.portal.model.User updateLockoutByScreenName(
453         long companyId, java.lang.String screenName, boolean lockout)
454         throws com.liferay.portal.PortalException,
455             com.liferay.portal.SystemException;
456 
457     public com.liferay.portal.model.User updateModifiedDate(long userId,
458         java.util.Date modifiedDate)
459         throws com.liferay.portal.PortalException,
460             com.liferay.portal.SystemException;
461 
462     public void updateOpenId(long userId, java.lang.String openId)
463         throws com.liferay.portal.PortalException,
464             com.liferay.portal.SystemException;
465 
466     public void updateOrganizations(long userId, long[] newOrganizationIds)
467         throws com.liferay.portal.PortalException,
468             com.liferay.portal.SystemException;
469 
470     public com.liferay.portal.model.User updatePassword(long userId,
471         java.lang.String password1, java.lang.String password2,
472         boolean passwordReset)
473         throws com.liferay.portal.PortalException,
474             com.liferay.portal.SystemException;
475 
476     public com.liferay.portal.model.User updatePassword(long userId,
477         java.lang.String password1, java.lang.String password2,
478         boolean passwordReset, boolean silentUpdate)
479         throws com.liferay.portal.PortalException,
480             com.liferay.portal.SystemException;
481 
482     public com.liferay.portal.model.User updatePasswordManually(long userId,
483         java.lang.String password, boolean passwordEncrypted,
484         boolean passwordReset, java.util.Date passwordModifiedDate)
485         throws com.liferay.portal.PortalException,
486             com.liferay.portal.SystemException;
487 
488     public void updatePasswordReset(long userId, boolean passwordReset)
489         throws com.liferay.portal.PortalException,
490             com.liferay.portal.SystemException;
491 
492     public void updatePortrait(long userId, byte[] bytes)
493         throws com.liferay.portal.PortalException,
494             com.liferay.portal.SystemException;
495 
496     public void updateScreenName(long userId, java.lang.String screenName)
497         throws com.liferay.portal.PortalException,
498             com.liferay.portal.SystemException;
499 
500     public com.liferay.portal.model.User updateUser(long userId,
501         java.lang.String oldPassword, boolean passwordReset,
502         java.lang.String screenName, java.lang.String emailAddress,
503         java.lang.String languageId, java.lang.String timeZoneId,
504         java.lang.String greeting, java.lang.String comments,
505         java.lang.String firstName, java.lang.String middleName,
506         java.lang.String lastName, int prefixId, int suffixId, boolean male,
507         int birthdayMonth, int birthdayDay, int birthdayYear,
508         java.lang.String smsSn, java.lang.String aimSn,
509         java.lang.String facebookSn, java.lang.String icqSn,
510         java.lang.String jabberSn, java.lang.String msnSn,
511         java.lang.String mySpaceSn, java.lang.String skypeSn,
512         java.lang.String twitterSn, java.lang.String ymSn,
513         java.lang.String jobTitle, long[] organizationIds)
514         throws com.liferay.portal.PortalException,
515             com.liferay.portal.SystemException;
516 
517     public com.liferay.portal.model.User updateUser(long userId,
518         java.lang.String oldPassword, java.lang.String newPassword1,
519         java.lang.String newPassword2, boolean passwordReset,
520         java.lang.String screenName, java.lang.String emailAddress,
521         java.lang.String languageId, java.lang.String timeZoneId,
522         java.lang.String greeting, java.lang.String comments,
523         java.lang.String firstName, java.lang.String middleName,
524         java.lang.String lastName, int prefixId, int suffixId, boolean male,
525         int birthdayMonth, int birthdayDay, int birthdayYear,
526         java.lang.String smsSn, java.lang.String aimSn,
527         java.lang.String facebookSn, java.lang.String icqSn,
528         java.lang.String jabberSn, java.lang.String msnSn,
529         java.lang.String mySpaceSn, java.lang.String skypeSn,
530         java.lang.String twitterSn, java.lang.String ymSn,
531         java.lang.String jobTitle, long[] organizationIds)
532         throws com.liferay.portal.PortalException,
533             com.liferay.portal.SystemException;
534 }