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