1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.annotation.Isolation;
18  import com.liferay.portal.kernel.annotation.Propagation;
19  import com.liferay.portal.kernel.annotation.Transactional;
20  import com.liferay.portal.kernel.exception.PortalException;
21  import com.liferay.portal.kernel.exception.SystemException;
22  
23  /**
24   * <a href="UserService.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This interface defines the service. The default implementation is
33   * {@link
34   * com.liferay.portal.service.impl.UserServiceImpl}}.
35   * Modify methods in that class and rerun ServiceBuilder to populate this class
36   * and all other generated classes.
37   * </p>
38   *
39   * <p>
40   * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       UserServiceUtil
45   * @generated
46   */
47  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
48      PortalException.class, SystemException.class})
49  public interface UserService {
50      public void addGroupUsers(long groupId, long[] userIds)
51          throws com.liferay.portal.kernel.exception.PortalException,
52              com.liferay.portal.kernel.exception.SystemException;
53  
54      public void addOrganizationUsers(long organizationId, long[] userIds)
55          throws com.liferay.portal.kernel.exception.PortalException,
56              com.liferay.portal.kernel.exception.SystemException;
57  
58      public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
59          throws com.liferay.portal.kernel.exception.PortalException,
60              com.liferay.portal.kernel.exception.SystemException;
61  
62      public void addRoleUsers(long roleId, long[] userIds)
63          throws com.liferay.portal.kernel.exception.PortalException,
64              com.liferay.portal.kernel.exception.SystemException;
65  
66      public void addUserGroupUsers(long userGroupId, long[] userIds)
67          throws com.liferay.portal.kernel.exception.PortalException,
68              com.liferay.portal.kernel.exception.SystemException;
69  
70      public com.liferay.portal.model.User addUser(long companyId,
71          boolean autoPassword, java.lang.String password1,
72          java.lang.String password2, boolean autoScreenName,
73          java.lang.String screenName, java.lang.String emailAddress,
74          java.lang.String openId, java.util.Locale locale,
75          java.lang.String firstName, java.lang.String middleName,
76          java.lang.String lastName, int prefixId, int suffixId, boolean male,
77          int birthdayMonth, int birthdayDay, int birthdayYear,
78          java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
79          long[] roleIds, long[] userGroupIds, boolean sendEmail,
80          com.liferay.portal.service.ServiceContext serviceContext)
81          throws com.liferay.portal.kernel.exception.PortalException,
82              com.liferay.portal.kernel.exception.SystemException;
83  
84      public com.liferay.portal.model.User addUser(long companyId,
85          boolean autoPassword, java.lang.String password1,
86          java.lang.String password2, boolean autoScreenName,
87          java.lang.String screenName, java.lang.String emailAddress,
88          java.lang.String openId, java.util.Locale locale,
89          java.lang.String firstName, java.lang.String middleName,
90          java.lang.String lastName, int prefixId, int suffixId, boolean male,
91          int birthdayMonth, int birthdayDay, int birthdayYear,
92          java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
93          long[] roleIds, long[] userGroupIds, boolean sendEmail,
94          java.util.List<com.liferay.portal.model.Address> addresses,
95          java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
96          java.util.List<com.liferay.portal.model.Phone> phones,
97          java.util.List<com.liferay.portal.model.Website> websites,
98          java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
99          com.liferay.portal.service.ServiceContext serviceContext)
100         throws com.liferay.portal.kernel.exception.PortalException,
101             com.liferay.portal.kernel.exception.SystemException;
102 
103     public void deletePortrait(long userId)
104         throws com.liferay.portal.kernel.exception.PortalException,
105             com.liferay.portal.kernel.exception.SystemException;
106 
107     public void deleteRoleUser(long roleId, long userId)
108         throws com.liferay.portal.kernel.exception.PortalException,
109             com.liferay.portal.kernel.exception.SystemException;
110 
111     public void deleteUser(long userId)
112         throws com.liferay.portal.kernel.exception.PortalException,
113             com.liferay.portal.kernel.exception.SystemException;
114 
115     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
116     public long getDefaultUserId(long companyId)
117         throws com.liferay.portal.kernel.exception.PortalException,
118             com.liferay.portal.kernel.exception.SystemException;
119 
120     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121     public long[] getGroupUserIds(long groupId)
122         throws com.liferay.portal.kernel.exception.SystemException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public long[] getOrganizationUserIds(long organizationId)
126         throws com.liferay.portal.kernel.exception.SystemException;
127 
128     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129     public long[] getRoleUserIds(long roleId)
130         throws com.liferay.portal.kernel.exception.SystemException;
131 
132     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133     public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
134         java.lang.String emailAddress)
135         throws com.liferay.portal.kernel.exception.PortalException,
136             com.liferay.portal.kernel.exception.SystemException;
137 
138     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139     public com.liferay.portal.model.User getUserById(long userId)
140         throws com.liferay.portal.kernel.exception.PortalException,
141             com.liferay.portal.kernel.exception.SystemException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public com.liferay.portal.model.User getUserByScreenName(long companyId,
145         java.lang.String screenName)
146         throws com.liferay.portal.kernel.exception.PortalException,
147             com.liferay.portal.kernel.exception.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public long getUserIdByEmailAddress(long companyId,
151         java.lang.String emailAddress)
152         throws com.liferay.portal.kernel.exception.PortalException,
153             com.liferay.portal.kernel.exception.SystemException;
154 
155     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
156     public long getUserIdByScreenName(long companyId,
157         java.lang.String screenName)
158         throws com.liferay.portal.kernel.exception.PortalException,
159             com.liferay.portal.kernel.exception.SystemException;
160 
161     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162     public boolean hasGroupUser(long groupId, long userId)
163         throws com.liferay.portal.kernel.exception.SystemException;
164 
165     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166     public boolean hasRoleUser(long roleId, long userId)
167         throws com.liferay.portal.kernel.exception.SystemException;
168 
169     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170     public boolean hasRoleUser(long companyId, java.lang.String name,
171         long userId, boolean inherited)
172         throws com.liferay.portal.kernel.exception.PortalException,
173             com.liferay.portal.kernel.exception.SystemException;
174 
175     public void setRoleUsers(long roleId, long[] userIds)
176         throws com.liferay.portal.kernel.exception.PortalException,
177             com.liferay.portal.kernel.exception.SystemException;
178 
179     public void setUserGroupUsers(long userGroupId, long[] userIds)
180         throws com.liferay.portal.kernel.exception.PortalException,
181             com.liferay.portal.kernel.exception.SystemException;
182 
183     public void unsetGroupUsers(long groupId, long[] userIds)
184         throws com.liferay.portal.kernel.exception.PortalException,
185             com.liferay.portal.kernel.exception.SystemException;
186 
187     public void unsetOrganizationUsers(long organizationId, long[] userIds)
188         throws com.liferay.portal.kernel.exception.PortalException,
189             com.liferay.portal.kernel.exception.SystemException;
190 
191     public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
192         throws com.liferay.portal.kernel.exception.PortalException,
193             com.liferay.portal.kernel.exception.SystemException;
194 
195     public void unsetRoleUsers(long roleId, long[] userIds)
196         throws com.liferay.portal.kernel.exception.PortalException,
197             com.liferay.portal.kernel.exception.SystemException;
198 
199     public void unsetUserGroupUsers(long userGroupId, long[] userIds)
200         throws com.liferay.portal.kernel.exception.PortalException,
201             com.liferay.portal.kernel.exception.SystemException;
202 
203     public com.liferay.portal.model.User updateActive(long userId,
204         boolean active)
205         throws com.liferay.portal.kernel.exception.PortalException,
206             com.liferay.portal.kernel.exception.SystemException;
207 
208     public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
209         boolean agreedToTermsOfUse)
210         throws com.liferay.portal.kernel.exception.PortalException,
211             com.liferay.portal.kernel.exception.SystemException;
212 
213     public void updateEmailAddress(long userId, java.lang.String password,
214         java.lang.String emailAddress1, java.lang.String emailAddress2)
215         throws com.liferay.portal.kernel.exception.PortalException,
216             com.liferay.portal.kernel.exception.SystemException;
217 
218     public com.liferay.portal.model.User updateLockout(long userId,
219         boolean lockout)
220         throws com.liferay.portal.kernel.exception.PortalException,
221             com.liferay.portal.kernel.exception.SystemException;
222 
223     public void updateOpenId(long userId, java.lang.String openId)
224         throws com.liferay.portal.kernel.exception.PortalException,
225             com.liferay.portal.kernel.exception.SystemException;
226 
227     public void updateOrganizations(long userId, long[] organizationIds)
228         throws com.liferay.portal.kernel.exception.PortalException,
229             com.liferay.portal.kernel.exception.SystemException;
230 
231     public com.liferay.portal.model.User updatePassword(long userId,
232         java.lang.String password1, java.lang.String password2,
233         boolean passwordReset)
234         throws com.liferay.portal.kernel.exception.PortalException,
235             com.liferay.portal.kernel.exception.SystemException;
236 
237     public void updatePortrait(long userId, byte[] bytes)
238         throws com.liferay.portal.kernel.exception.PortalException,
239             com.liferay.portal.kernel.exception.SystemException;
240 
241     public void updateReminderQuery(long userId, java.lang.String question,
242         java.lang.String answer)
243         throws com.liferay.portal.kernel.exception.PortalException,
244             com.liferay.portal.kernel.exception.SystemException;
245 
246     public void updateScreenName(long userId, java.lang.String screenName)
247         throws com.liferay.portal.kernel.exception.PortalException,
248             com.liferay.portal.kernel.exception.SystemException;
249 
250     public com.liferay.portal.model.User updateUser(long userId,
251         java.lang.String oldPassword, java.lang.String newPassword1,
252         java.lang.String newPassword2, boolean passwordReset,
253         java.lang.String reminderQueryQuestion,
254         java.lang.String reminderQueryAnswer, java.lang.String screenName,
255         java.lang.String emailAddress, java.lang.String openId,
256         java.lang.String languageId, java.lang.String timeZoneId,
257         java.lang.String greeting, java.lang.String comments,
258         java.lang.String firstName, java.lang.String middleName,
259         java.lang.String lastName, int prefixId, int suffixId, boolean male,
260         int birthdayMonth, int birthdayDay, int birthdayYear,
261         java.lang.String smsSn, java.lang.String aimSn,
262         java.lang.String facebookSn, java.lang.String icqSn,
263         java.lang.String jabberSn, java.lang.String msnSn,
264         java.lang.String mySpaceSn, java.lang.String skypeSn,
265         java.lang.String twitterSn, java.lang.String ymSn,
266         java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
267         long[] roleIds,
268         java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
269         long[] userGroupIds,
270         com.liferay.portal.service.ServiceContext serviceContext)
271         throws com.liferay.portal.kernel.exception.PortalException,
272             com.liferay.portal.kernel.exception.SystemException;
273 
274     public com.liferay.portal.model.User updateUser(long userId,
275         java.lang.String oldPassword, java.lang.String newPassword1,
276         java.lang.String newPassword2, boolean passwordReset,
277         java.lang.String reminderQueryQuestion,
278         java.lang.String reminderQueryAnswer, java.lang.String screenName,
279         java.lang.String emailAddress, java.lang.String openId,
280         java.lang.String languageId, java.lang.String timeZoneId,
281         java.lang.String greeting, java.lang.String comments,
282         java.lang.String firstName, java.lang.String middleName,
283         java.lang.String lastName, int prefixId, int suffixId, boolean male,
284         int birthdayMonth, int birthdayDay, int birthdayYear,
285         java.lang.String smsSn, java.lang.String aimSn,
286         java.lang.String facebookSn, java.lang.String icqSn,
287         java.lang.String jabberSn, java.lang.String msnSn,
288         java.lang.String mySpaceSn, java.lang.String skypeSn,
289         java.lang.String twitterSn, java.lang.String ymSn,
290         java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
291         long[] roleIds,
292         java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
293         long[] userGroupIds,
294         java.util.List<com.liferay.portal.model.Address> addresses,
295         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
296         java.util.List<com.liferay.portal.model.Phone> phones,
297         java.util.List<com.liferay.portal.model.Website> websites,
298         java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
299         com.liferay.portal.service.ServiceContext serviceContext)
300         throws com.liferay.portal.kernel.exception.PortalException,
301             com.liferay.portal.kernel.exception.SystemException;
302 }