1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.service;
21  
22  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Propagation;
25  import com.liferay.portal.kernel.annotation.Transactional;
26  
27  /**
28   * <a href="UserService.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This interface defines the service. The default implementation is
37   * <code>com.liferay.portal.service.impl.UserServiceImpl</code>.
38   * Modify methods in that class and rerun ServiceBuilder to populate this class
39   * and all other generated classes.
40   * </p>
41   *
42   * <p>
43   * 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.
44   * </p>
45   *
46   * @author Brian Wing Shun Chan
47   *
48   * @see com.liferay.portal.service.UserServiceUtil
49   *
50   */
51  @Transactional(rollbackFor =  {
52      PortalException.class, SystemException.class})
53  public interface UserService {
54      public void addGroupUsers(long groupId, long[] userIds)
55          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException;
57  
58      public void addOrganizationUsers(long organizationId, long[] userIds)
59          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException;
61  
62      public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
63          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException;
65  
66      public void addRoleUsers(long roleId, long[] userIds)
67          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
68              com.liferay.portal.SystemException;
69  
70      public void addUserGroupUsers(long userGroupId, long[] userIds)
71          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
72              com.liferay.portal.SystemException;
73  
74      public com.liferay.portal.model.User addUser(long companyId,
75          boolean autoPassword, java.lang.String password1,
76          java.lang.String password2, boolean autoScreenName,
77          java.lang.String screenName, java.lang.String emailAddress,
78          java.util.Locale locale, java.lang.String firstName,
79          java.lang.String middleName, java.lang.String lastName, int prefixId,
80          int suffixId, boolean male, int birthdayMonth, int birthdayDay,
81          int birthdayYear, java.lang.String jobTitle, long[] organizationIds,
82          boolean sendEmail)
83          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
84              com.liferay.portal.SystemException;
85  
86      public void deleteRoleUser(long roleId, long userId)
87          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
88              com.liferay.portal.SystemException;
89  
90      public void deleteUser(long userId)
91          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException;
93  
94      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
95      public long getDefaultUserId(long companyId)
96          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException;
98  
99      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100     public long[] getGroupUserIds(long groupId)
101         throws java.rmi.RemoteException, com.liferay.portal.SystemException;
102 
103     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104     public long[] getOrganizationUserIds(long organizationId)
105         throws java.rmi.RemoteException, com.liferay.portal.SystemException;
106 
107     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108     public long[] getRoleUserIds(long roleId)
109         throws java.rmi.RemoteException, com.liferay.portal.SystemException;
110 
111     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112     public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
113         java.lang.String emailAddress)
114         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException;
116 
117     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118     public com.liferay.portal.model.User getUserById(long userId)
119         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException;
121 
122     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123     public com.liferay.portal.model.User getUserByScreenName(long companyId,
124         java.lang.String screenName)
125         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException;
127 
128     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129     public long getUserIdByEmailAddress(long companyId,
130         java.lang.String emailAddress)
131         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException;
133 
134     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135     public long getUserIdByScreenName(long companyId,
136         java.lang.String screenName)
137         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException;
139 
140     public boolean hasGroupUser(long groupId, long userId)
141         throws java.rmi.RemoteException, com.liferay.portal.SystemException;
142 
143     public boolean hasRoleUser(long roleId, long userId)
144         throws java.rmi.RemoteException, com.liferay.portal.SystemException;
145 
146     public void setRoleUsers(long roleId, long[] userIds)
147         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException;
149 
150     public void setUserGroupUsers(long userGroupId, long[] userIds)
151         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException;
153 
154     public void unsetGroupUsers(long groupId, long[] userIds)
155         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException;
157 
158     public void unsetOrganizationUsers(long organizationId, long[] userIds)
159         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException;
161 
162     public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
163         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException;
165 
166     public void unsetRoleUsers(long roleId, long[] userIds)
167         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
168             com.liferay.portal.SystemException;
169 
170     public void unsetUserGroupUsers(long userGroupId, long[] userIds)
171         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException;
173 
174     public com.liferay.portal.model.User updateActive(long userId,
175         boolean active)
176         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException;
178 
179     public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
180         boolean agreedToTermsOfUse)
181         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
182             com.liferay.portal.SystemException;
183 
184     public com.liferay.portal.model.User updateLockout(long userId,
185         boolean lockout)
186         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException;
188 
189     public void updateOpenId(long userId, java.lang.String openId)
190         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
191             com.liferay.portal.SystemException;
192 
193     public void updateOrganizations(long userId, long[] organizationIds)
194         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException;
196 
197     public com.liferay.portal.model.User updatePassword(long userId,
198         java.lang.String password1, java.lang.String password2,
199         boolean passwordReset)
200         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException;
202 
203     public void updatePortrait(long userId, byte[] bytes)
204         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException;
206 
207     public void updateScreenName(long userId, java.lang.String screenName)
208         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException;
210 
211     public com.liferay.portal.model.User updateUser(long userId,
212         java.lang.String oldPassword, boolean passwordReset,
213         java.lang.String screenName, java.lang.String emailAddress,
214         java.lang.String languageId, java.lang.String timeZoneId,
215         java.lang.String greeting, java.lang.String comments,
216         java.lang.String firstName, java.lang.String middleName,
217         java.lang.String lastName, int prefixId, int suffixId, boolean male,
218         int birthdayMonth, int birthdayDay, int birthdayYear,
219         java.lang.String smsSn, java.lang.String aimSn,
220         java.lang.String facebookSn, java.lang.String icqSn,
221         java.lang.String jabberSn, java.lang.String msnSn,
222         java.lang.String mySpaceSn, java.lang.String skypeSn,
223         java.lang.String twitterSn, java.lang.String ymSn,
224         java.lang.String jobTitle, long[] organizationIds)
225         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException;
227 
228     public com.liferay.portal.model.User updateUser(long userId,
229         java.lang.String oldPassword, java.lang.String newPassword1,
230         java.lang.String newPassword2, boolean passwordReset,
231         java.lang.String screenName, java.lang.String emailAddress,
232         java.lang.String languageId, java.lang.String timeZoneId,
233         java.lang.String greeting, java.lang.String comments,
234         java.lang.String firstName, java.lang.String middleName,
235         java.lang.String lastName, int prefixId, int suffixId, boolean male,
236         int birthdayMonth, int birthdayDay, int birthdayYear,
237         java.lang.String smsSn, java.lang.String aimSn,
238         java.lang.String facebookSn, java.lang.String icqSn,
239         java.lang.String jabberSn, java.lang.String msnSn,
240         java.lang.String mySpaceSn, java.lang.String skypeSn,
241         java.lang.String twitterSn, java.lang.String ymSn,
242         java.lang.String jobTitle, long[] organizationIds)
243         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException;
245 }