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  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="UserService.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This interface defines the service. The default implementation is
40   * <code>com.liferay.portal.service.impl.UserServiceImpl</code>.
41   * Modify methods in that class and rerun ServiceBuilder to populate this class
42   * and all other generated classes.
43   * </p>
44   *
45   * <p>
46   * 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.
47   * </p>
48   *
49   * @author Brian Wing Shun Chan
50   *
51   * @see com.liferay.portal.service.UserServiceUtil
52   *
53   */
54  @Transactional(rollbackFor =  {
55      PortalException.class, SystemException.class})
56  public interface UserService {
57      public void addGroupUsers(long groupId, long[] userIds)
58          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
59              com.liferay.portal.SystemException;
60  
61      public void addOrganizationUsers(long organizationId, long[] userIds)
62          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
63              com.liferay.portal.SystemException;
64  
65      public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
66          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException;
68  
69      public void addRoleUsers(long roleId, long[] userIds)
70          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
71              com.liferay.portal.SystemException;
72  
73      public void addUserGroupUsers(long userGroupId, long[] userIds)
74          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
75              com.liferay.portal.SystemException;
76  
77      public com.liferay.portal.model.User addUser(long companyId,
78          boolean autoPassword, java.lang.String password1,
79          java.lang.String password2, boolean autoScreenName,
80          java.lang.String screenName, java.lang.String emailAddress,
81          java.util.Locale locale, java.lang.String firstName,
82          java.lang.String middleName, java.lang.String lastName, int prefixId,
83          int suffixId, boolean male, int birthdayMonth, int birthdayDay,
84          int birthdayYear, java.lang.String jobTitle, long[] organizationIds,
85          boolean sendEmail)
86          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
87              com.liferay.portal.SystemException;
88  
89      public void deleteRoleUser(long roleId, long userId)
90          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException;
92  
93      public void deleteUser(long userId)
94          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
95              com.liferay.portal.SystemException;
96  
97      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
98      public long getDefaultUserId(long companyId)
99          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException;
101 
102     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103     public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
104         java.lang.String emailAddress)
105         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException;
107 
108     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109     public com.liferay.portal.model.User getUserById(long userId)
110         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException;
112 
113     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114     public com.liferay.portal.model.User getUserByScreenName(long companyId,
115         java.lang.String screenName)
116         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException;
118 
119     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120     public long getUserIdByEmailAddress(long companyId,
121         java.lang.String emailAddress)
122         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException;
124 
125     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126     public long getUserIdByScreenName(long companyId,
127         java.lang.String screenName)
128         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException;
130 
131     public boolean hasGroupUser(long groupId, long userId)
132         throws java.rmi.RemoteException, com.liferay.portal.SystemException;
133 
134     public boolean hasRoleUser(long roleId, long userId)
135         throws java.rmi.RemoteException, com.liferay.portal.SystemException;
136 
137     public void setRoleUsers(long roleId, long[] userIds)
138         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException;
140 
141     public void setUserGroupUsers(long userGroupId, long[] userIds)
142         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException;
144 
145     public void unsetGroupUsers(long groupId, long[] userIds)
146         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException;
148 
149     public void unsetOrganizationUsers(long organizationId, long[] userIds)
150         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException;
152 
153     public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
154         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException;
156 
157     public void unsetRoleUsers(long roleId, long[] userIds)
158         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException;
160 
161     public void unsetUserGroupUsers(long userGroupId, long[] userIds)
162         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException;
164 
165     public com.liferay.portal.model.User updateActive(long userId,
166         boolean active)
167         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
168             com.liferay.portal.SystemException;
169 
170     public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
171         boolean agreedToTermsOfUse)
172         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
173             com.liferay.portal.SystemException;
174 
175     public com.liferay.portal.model.User updateLockout(long userId,
176         boolean lockout)
177         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
178             com.liferay.portal.SystemException;
179 
180     public void updateOpenId(long userId, java.lang.String openId)
181         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
182             com.liferay.portal.SystemException;
183 
184     public void updateOrganizations(long userId, long[] organizationIds)
185         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
186             com.liferay.portal.SystemException;
187 
188     public com.liferay.portal.model.User updatePassword(long userId,
189         java.lang.String password1, java.lang.String password2,
190         boolean passwordReset)
191         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException;
193 
194     public void updatePortrait(long userId, byte[] bytes)
195         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
196             com.liferay.portal.SystemException;
197 
198     public void updateScreenName(long userId, java.lang.String screenName)
199         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException;
201 
202     public com.liferay.portal.model.User updateUser(long userId,
203         java.lang.String oldPassword, boolean passwordReset,
204         java.lang.String screenName, java.lang.String emailAddress,
205         java.lang.String languageId, java.lang.String timeZoneId,
206         java.lang.String greeting, java.lang.String comments,
207         java.lang.String firstName, java.lang.String middleName,
208         java.lang.String lastName, int prefixId, int suffixId, boolean male,
209         int birthdayMonth, int birthdayDay, int birthdayYear,
210         java.lang.String smsSn, java.lang.String aimSn,
211         java.lang.String facebookSn, java.lang.String icqSn,
212         java.lang.String jabberSn, java.lang.String msnSn,
213         java.lang.String mySpaceSn, java.lang.String skypeSn,
214         java.lang.String twitterSn, java.lang.String ymSn,
215         java.lang.String jobTitle, long[] organizationIds)
216         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException;
218 
219     public com.liferay.portal.model.User updateUser(long userId,
220         java.lang.String oldPassword, java.lang.String newPassword1,
221         java.lang.String newPassword2, boolean passwordReset,
222         java.lang.String screenName, java.lang.String emailAddress,
223         java.lang.String languageId, java.lang.String timeZoneId,
224         java.lang.String greeting, java.lang.String comments,
225         java.lang.String firstName, java.lang.String middleName,
226         java.lang.String lastName, int prefixId, int suffixId, boolean male,
227         int birthdayMonth, int birthdayDay, int birthdayYear,
228         java.lang.String smsSn, java.lang.String aimSn,
229         java.lang.String facebookSn, java.lang.String icqSn,
230         java.lang.String jabberSn, java.lang.String msnSn,
231         java.lang.String mySpaceSn, java.lang.String skypeSn,
232         java.lang.String twitterSn, java.lang.String ymSn,
233         java.lang.String jobTitle, long[] organizationIds)
234         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException;
236 }