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 addTeamUsers(long teamId, long[] userIds)
67          throws com.liferay.portal.kernel.exception.PortalException,
68              com.liferay.portal.kernel.exception.SystemException;
69  
70      public void addUserGroupUsers(long userGroupId, long[] userIds)
71          throws com.liferay.portal.kernel.exception.PortalException,
72              com.liferay.portal.kernel.exception.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.lang.String openId, java.util.Locale locale,
79          java.lang.String firstName, java.lang.String middleName,
80          java.lang.String lastName, int prefixId, int suffixId, boolean male,
81          int birthdayMonth, int birthdayDay, int birthdayYear,
82          java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
83          long[] roleIds, long[] userGroupIds, boolean sendEmail,
84          com.liferay.portal.service.ServiceContext serviceContext)
85          throws com.liferay.portal.kernel.exception.PortalException,
86              com.liferay.portal.kernel.exception.SystemException;
87  
88      public com.liferay.portal.model.User addUser(long companyId,
89          boolean autoPassword, java.lang.String password1,
90          java.lang.String password2, boolean autoScreenName,
91          java.lang.String screenName, java.lang.String emailAddress,
92          java.lang.String openId, java.util.Locale locale,
93          java.lang.String firstName, java.lang.String middleName,
94          java.lang.String lastName, int prefixId, int suffixId, boolean male,
95          int birthdayMonth, int birthdayDay, int birthdayYear,
96          java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
97          long[] roleIds, long[] userGroupIds, boolean sendEmail,
98          java.util.List<com.liferay.portal.model.Address> addresses,
99          java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
100         java.util.List<com.liferay.portal.model.Phone> phones,
101         java.util.List<com.liferay.portal.model.Website> websites,
102         java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
103         com.liferay.portal.service.ServiceContext serviceContext)
104         throws com.liferay.portal.kernel.exception.PortalException,
105             com.liferay.portal.kernel.exception.SystemException;
106 
107     public void deletePortrait(long userId)
108         throws com.liferay.portal.kernel.exception.PortalException,
109             com.liferay.portal.kernel.exception.SystemException;
110 
111     public void deleteRoleUser(long roleId, long userId)
112         throws com.liferay.portal.kernel.exception.PortalException,
113             com.liferay.portal.kernel.exception.SystemException;
114 
115     public void deleteUser(long userId)
116         throws com.liferay.portal.kernel.exception.PortalException,
117             com.liferay.portal.kernel.exception.SystemException;
118 
119     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120     public long getDefaultUserId(long companyId)
121         throws com.liferay.portal.kernel.exception.PortalException,
122             com.liferay.portal.kernel.exception.SystemException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public long[] getGroupUserIds(long groupId)
126         throws com.liferay.portal.kernel.exception.SystemException;
127 
128     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129     public long[] getOrganizationUserIds(long organizationId)
130         throws com.liferay.portal.kernel.exception.SystemException;
131 
132     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133     public long[] getRoleUserIds(long roleId)
134         throws com.liferay.portal.kernel.exception.SystemException;
135 
136     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137     public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
138         java.lang.String emailAddress)
139         throws com.liferay.portal.kernel.exception.PortalException,
140             com.liferay.portal.kernel.exception.SystemException;
141 
142     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143     public com.liferay.portal.model.User getUserById(long userId)
144         throws com.liferay.portal.kernel.exception.PortalException,
145             com.liferay.portal.kernel.exception.SystemException;
146 
147     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148     public com.liferay.portal.model.User getUserByScreenName(long companyId,
149         java.lang.String screenName)
150         throws com.liferay.portal.kernel.exception.PortalException,
151             com.liferay.portal.kernel.exception.SystemException;
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public long getUserIdByEmailAddress(long companyId,
155         java.lang.String emailAddress)
156         throws com.liferay.portal.kernel.exception.PortalException,
157             com.liferay.portal.kernel.exception.SystemException;
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public long getUserIdByScreenName(long companyId,
161         java.lang.String screenName)
162         throws com.liferay.portal.kernel.exception.PortalException,
163             com.liferay.portal.kernel.exception.SystemException;
164 
165     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166     public boolean hasGroupUser(long groupId, long userId)
167         throws com.liferay.portal.kernel.exception.SystemException;
168 
169     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170     public boolean hasRoleUser(long roleId, long userId)
171         throws com.liferay.portal.kernel.exception.SystemException;
172 
173     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174     public boolean hasRoleUser(long companyId, java.lang.String name,
175         long userId, boolean inherited)
176         throws com.liferay.portal.kernel.exception.PortalException,
177             com.liferay.portal.kernel.exception.SystemException;
178 
179     public void setRoleUsers(long roleId, long[] userIds)
180         throws com.liferay.portal.kernel.exception.PortalException,
181             com.liferay.portal.kernel.exception.SystemException;
182 
183     public void setUserGroupUsers(long userGroupId, long[] userIds)
184         throws com.liferay.portal.kernel.exception.PortalException,
185             com.liferay.portal.kernel.exception.SystemException;
186 
187     public void unsetGroupUsers(long groupId, long[] userIds)
188         throws com.liferay.portal.kernel.exception.PortalException,
189             com.liferay.portal.kernel.exception.SystemException;
190 
191     public void unsetOrganizationUsers(long organizationId, long[] userIds)
192         throws com.liferay.portal.kernel.exception.PortalException,
193             com.liferay.portal.kernel.exception.SystemException;
194 
195     public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
196         throws com.liferay.portal.kernel.exception.PortalException,
197             com.liferay.portal.kernel.exception.SystemException;
198 
199     public void unsetRoleUsers(long roleId, long[] userIds)
200         throws com.liferay.portal.kernel.exception.PortalException,
201             com.liferay.portal.kernel.exception.SystemException;
202 
203     public void unsetTeamUsers(long teamId, long[] userIds)
204         throws com.liferay.portal.kernel.exception.PortalException,
205             com.liferay.portal.kernel.exception.SystemException;
206 
207     public void unsetUserGroupUsers(long userGroupId, long[] userIds)
208         throws com.liferay.portal.kernel.exception.PortalException,
209             com.liferay.portal.kernel.exception.SystemException;
210 
211     public com.liferay.portal.model.User updateActive(long userId,
212         boolean active)
213         throws com.liferay.portal.kernel.exception.PortalException,
214             com.liferay.portal.kernel.exception.SystemException;
215 
216     public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
217         boolean agreedToTermsOfUse)
218         throws com.liferay.portal.kernel.exception.PortalException,
219             com.liferay.portal.kernel.exception.SystemException;
220 
221     public void updateEmailAddress(long userId, java.lang.String password,
222         java.lang.String emailAddress1, java.lang.String emailAddress2)
223         throws com.liferay.portal.kernel.exception.PortalException,
224             com.liferay.portal.kernel.exception.SystemException;
225 
226     public com.liferay.portal.model.User updateLockout(long userId,
227         boolean lockout)
228         throws com.liferay.portal.kernel.exception.PortalException,
229             com.liferay.portal.kernel.exception.SystemException;
230 
231     public void updateOpenId(long userId, java.lang.String openId)
232         throws com.liferay.portal.kernel.exception.PortalException,
233             com.liferay.portal.kernel.exception.SystemException;
234 
235     public void updateOrganizations(long userId, long[] organizationIds)
236         throws com.liferay.portal.kernel.exception.PortalException,
237             com.liferay.portal.kernel.exception.SystemException;
238 
239     public com.liferay.portal.model.User updatePassword(long userId,
240         java.lang.String password1, java.lang.String password2,
241         boolean passwordReset)
242         throws com.liferay.portal.kernel.exception.PortalException,
243             com.liferay.portal.kernel.exception.SystemException;
244 
245     public void updatePortrait(long userId, byte[] bytes)
246         throws com.liferay.portal.kernel.exception.PortalException,
247             com.liferay.portal.kernel.exception.SystemException;
248 
249     public void updateReminderQuery(long userId, java.lang.String question,
250         java.lang.String answer)
251         throws com.liferay.portal.kernel.exception.PortalException,
252             com.liferay.portal.kernel.exception.SystemException;
253 
254     public void updateScreenName(long userId, java.lang.String screenName)
255         throws com.liferay.portal.kernel.exception.PortalException,
256             com.liferay.portal.kernel.exception.SystemException;
257 
258     public com.liferay.portal.model.User updateUser(long userId,
259         java.lang.String oldPassword, java.lang.String newPassword1,
260         java.lang.String newPassword2, boolean passwordReset,
261         java.lang.String reminderQueryQuestion,
262         java.lang.String reminderQueryAnswer, java.lang.String screenName,
263         java.lang.String emailAddress, java.lang.String openId,
264         java.lang.String languageId, java.lang.String timeZoneId,
265         java.lang.String greeting, java.lang.String comments,
266         java.lang.String firstName, java.lang.String middleName,
267         java.lang.String lastName, int prefixId, int suffixId, boolean male,
268         int birthdayMonth, int birthdayDay, int birthdayYear,
269         java.lang.String smsSn, java.lang.String aimSn,
270         java.lang.String facebookSn, java.lang.String icqSn,
271         java.lang.String jabberSn, java.lang.String msnSn,
272         java.lang.String mySpaceSn, java.lang.String skypeSn,
273         java.lang.String twitterSn, java.lang.String ymSn,
274         java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
275         long[] roleIds,
276         java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
277         long[] userGroupIds,
278         com.liferay.portal.service.ServiceContext serviceContext)
279         throws com.liferay.portal.kernel.exception.PortalException,
280             com.liferay.portal.kernel.exception.SystemException;
281 
282     public com.liferay.portal.model.User updateUser(long userId,
283         java.lang.String oldPassword, java.lang.String newPassword1,
284         java.lang.String newPassword2, boolean passwordReset,
285         java.lang.String reminderQueryQuestion,
286         java.lang.String reminderQueryAnswer, java.lang.String screenName,
287         java.lang.String emailAddress, java.lang.String openId,
288         java.lang.String languageId, java.lang.String timeZoneId,
289         java.lang.String greeting, java.lang.String comments,
290         java.lang.String firstName, java.lang.String middleName,
291         java.lang.String lastName, int prefixId, int suffixId, boolean male,
292         int birthdayMonth, int birthdayDay, int birthdayYear,
293         java.lang.String smsSn, java.lang.String aimSn,
294         java.lang.String facebookSn, java.lang.String icqSn,
295         java.lang.String jabberSn, java.lang.String msnSn,
296         java.lang.String mySpaceSn, java.lang.String skypeSn,
297         java.lang.String twitterSn, java.lang.String ymSn,
298         java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
299         long[] roleIds,
300         java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
301         long[] userGroupIds,
302         java.util.List<com.liferay.portal.model.Address> addresses,
303         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
304         java.util.List<com.liferay.portal.model.Phone> phones,
305         java.util.List<com.liferay.portal.model.Website> websites,
306         java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
307         com.liferay.portal.service.ServiceContext serviceContext)
308         throws com.liferay.portal.kernel.exception.PortalException,
309             com.liferay.portal.kernel.exception.SystemException;
310 }