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