1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.Isolation;
28  import com.liferay.portal.kernel.annotation.Propagation;
29  import com.liferay.portal.kernel.annotation.Transactional;
30  
31  /**
32   * <a href="UserService.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This interface defines the service. The default implementation is
41   * {@link
42   * com.liferay.portal.service.impl.UserServiceImpl}}.
43   * Modify methods in that class and rerun ServiceBuilder to populate this class
44   * and all other generated classes.
45   * </p>
46   *
47   * <p>
48   * 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.
49   * </p>
50   *
51   * @author    Brian Wing Shun Chan
52   * @see       UserServiceUtil
53   * @generated
54   */
55  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
56      PortalException.class, SystemException.class})
57  public interface UserService {
58      public void addGroupUsers(long groupId, long[] userIds)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException;
61  
62      public void addOrganizationUsers(long organizationId, long[] userIds)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException;
65  
66      public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
67          throws com.liferay.portal.PortalException,
68              com.liferay.portal.SystemException;
69  
70      public void addRoleUsers(long roleId, long[] userIds)
71          throws com.liferay.portal.PortalException,
72              com.liferay.portal.SystemException;
73  
74      public void addUserGroupUsers(long userGroupId, long[] userIds)
75          throws com.liferay.portal.PortalException,
76              com.liferay.portal.SystemException;
77  
78      public com.liferay.portal.model.User addUser(long companyId,
79          boolean autoPassword, java.lang.String password1,
80          java.lang.String password2, boolean autoScreenName,
81          java.lang.String screenName, java.lang.String emailAddress,
82          java.lang.String openId, java.util.Locale locale,
83          java.lang.String firstName, java.lang.String middleName,
84          java.lang.String lastName, int prefixId, int suffixId, boolean male,
85          int birthdayMonth, int birthdayDay, int birthdayYear,
86          java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
87          long[] roleIds, long[] userGroupIds, boolean sendEmail,
88          com.liferay.portal.service.ServiceContext serviceContext)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException;
91  
92      public com.liferay.portal.model.User addUser(long companyId,
93          boolean autoPassword, java.lang.String password1,
94          java.lang.String password2, boolean autoScreenName,
95          java.lang.String screenName, java.lang.String emailAddress,
96          java.lang.String openId, java.util.Locale locale,
97          java.lang.String firstName, java.lang.String middleName,
98          java.lang.String lastName, int prefixId, int suffixId, boolean male,
99          int birthdayMonth, int birthdayDay, int birthdayYear,
100         java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
101         long[] roleIds, long[] userGroupIds, boolean sendEmail,
102         java.util.List<com.liferay.portal.model.Address> addresses,
103         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
104         java.util.List<com.liferay.portal.model.Phone> phones,
105         java.util.List<com.liferay.portal.model.Website> websites,
106         java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
107         com.liferay.portal.service.ServiceContext serviceContext)
108         throws com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException;
110 
111     public void deletePortrait(long userId)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException;
114 
115     public void deleteRoleUser(long roleId, long userId)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException;
118 
119     public void deleteUser(long userId)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException;
122 
123     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124     public long getDefaultUserId(long companyId)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException;
127 
128     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129     public long[] getGroupUserIds(long groupId)
130         throws com.liferay.portal.SystemException;
131 
132     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133     public long[] getOrganizationUserIds(long organizationId)
134         throws com.liferay.portal.SystemException;
135 
136     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137     public long[] getRoleUserIds(long roleId)
138         throws com.liferay.portal.SystemException;
139 
140     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141     public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
142         java.lang.String emailAddress)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException;
145 
146     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147     public com.liferay.portal.model.User getUserById(long userId)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException;
150 
151     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152     public com.liferay.portal.model.User getUserByScreenName(long companyId,
153         java.lang.String screenName)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException;
156 
157     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158     public long getUserIdByEmailAddress(long companyId,
159         java.lang.String emailAddress)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException;
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public long getUserIdByScreenName(long companyId,
165         java.lang.String screenName)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException;
168 
169     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170     public boolean hasGroupUser(long groupId, long userId)
171         throws com.liferay.portal.SystemException;
172 
173     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
174     public boolean hasRoleUser(long roleId, long userId)
175         throws com.liferay.portal.SystemException;
176 
177     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178     public boolean hasRoleUser(long companyId, java.lang.String name,
179         long userId, boolean inherited)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException;
182 
183     public void setRoleUsers(long roleId, long[] userIds)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException;
186 
187     public void setUserGroupUsers(long userGroupId, long[] userIds)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException;
190 
191     public void unsetGroupUsers(long groupId, long[] userIds)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException;
194 
195     public void unsetOrganizationUsers(long organizationId, long[] userIds)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException;
198 
199     public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException;
202 
203     public void unsetRoleUsers(long roleId, long[] userIds)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException;
206 
207     public void unsetUserGroupUsers(long userGroupId, long[] userIds)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException;
210 
211     public com.liferay.portal.model.User updateActive(long userId,
212         boolean active)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException;
215 
216     public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
217         boolean agreedToTermsOfUse)
218         throws com.liferay.portal.PortalException,
219             com.liferay.portal.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.PortalException,
224             com.liferay.portal.SystemException;
225 
226     public com.liferay.portal.model.User updateLockout(long userId,
227         boolean lockout)
228         throws com.liferay.portal.PortalException,
229             com.liferay.portal.SystemException;
230 
231     public void updateOpenId(long userId, java.lang.String openId)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException;
234 
235     public void updateOrganizations(long userId, long[] organizationIds)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.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.PortalException,
243             com.liferay.portal.SystemException;
244 
245     public void updatePortrait(long userId, byte[] bytes)
246         throws com.liferay.portal.PortalException,
247             com.liferay.portal.SystemException;
248 
249     public void updateReminderQuery(long userId, java.lang.String question,
250         java.lang.String answer)
251         throws com.liferay.portal.PortalException,
252             com.liferay.portal.SystemException;
253 
254     public void updateScreenName(long userId, java.lang.String screenName)
255         throws com.liferay.portal.PortalException,
256             com.liferay.portal.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.PortalException,
280             com.liferay.portal.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.PortalException,
309             com.liferay.portal.SystemException;
310 }