001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * The interface for the user remote service.
025     *
026     * <p>
027     * Never modify or reference this interface directly. Always use {@link UserServiceUtil} to access the user remote service. Add custom service methods to {@link com.liferay.portal.service.impl.UserServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
028     * </p>
029     *
030     * <p>
031     * 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.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see UserServiceUtil
036     * @see com.liferay.portal.service.base.UserServiceBaseImpl
037     * @see com.liferay.portal.service.impl.UserServiceImpl
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface UserService {
043            public void addGroupUsers(long groupId, long[] userIds)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException;
046    
047            public void addOrganizationUsers(long organizationId, long[] userIds)
048                    throws com.liferay.portal.kernel.exception.PortalException,
049                            com.liferay.portal.kernel.exception.SystemException;
050    
051            public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
052                    throws com.liferay.portal.kernel.exception.PortalException,
053                            com.liferay.portal.kernel.exception.SystemException;
054    
055            public void addRoleUsers(long roleId, long[] userIds)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException;
058    
059            public void addTeamUsers(long teamId, long[] userIds)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException;
062    
063            public void addUserGroupUsers(long userGroupId, long[] userIds)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException;
066    
067            public com.liferay.portal.model.User addUser(long companyId,
068                    boolean autoPassword, java.lang.String password1,
069                    java.lang.String password2, boolean autoScreenName,
070                    java.lang.String screenName, java.lang.String emailAddress,
071                    long facebookId, java.lang.String openId, java.util.Locale locale,
072                    java.lang.String firstName, java.lang.String middleName,
073                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
074                    int birthdayMonth, int birthdayDay, int birthdayYear,
075                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
076                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException;
080    
081            public com.liferay.portal.model.User addUser(long companyId,
082                    boolean autoPassword, java.lang.String password1,
083                    java.lang.String password2, boolean autoScreenName,
084                    java.lang.String screenName, java.lang.String emailAddress,
085                    long facebookId, java.lang.String openId, java.util.Locale locale,
086                    java.lang.String firstName, java.lang.String middleName,
087                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
088                    int birthdayMonth, int birthdayDay, int birthdayYear,
089                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
090                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
091                    java.util.List<com.liferay.portal.model.Address> addresses,
092                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
093                    java.util.List<com.liferay.portal.model.Phone> phones,
094                    java.util.List<com.liferay.portal.model.Website> websites,
095                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException;
099    
100            public void deletePortrait(long userId)
101                    throws com.liferay.portal.kernel.exception.PortalException,
102                            com.liferay.portal.kernel.exception.SystemException;
103    
104            public void deleteRoleUser(long roleId, long userId)
105                    throws com.liferay.portal.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.SystemException;
107    
108            public void deleteUser(long userId)
109                    throws com.liferay.portal.kernel.exception.PortalException,
110                            com.liferay.portal.kernel.exception.SystemException;
111    
112            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113            public long getDefaultUserId(long companyId)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException;
116    
117            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118            public long[] getGroupUserIds(long groupId)
119                    throws com.liferay.portal.kernel.exception.SystemException;
120    
121            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122            public long[] getOrganizationUserIds(long organizationId)
123                    throws com.liferay.portal.kernel.exception.SystemException;
124    
125            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126            public long[] getRoleUserIds(long roleId)
127                    throws com.liferay.portal.kernel.exception.SystemException;
128    
129            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130            public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
131                    java.lang.String emailAddress)
132                    throws com.liferay.portal.kernel.exception.PortalException,
133                            com.liferay.portal.kernel.exception.SystemException;
134    
135            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136            public com.liferay.portal.model.User getUserById(long userId)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException;
139    
140            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141            public com.liferay.portal.model.User getUserByScreenName(long companyId,
142                    java.lang.String screenName)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException;
145    
146            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147            public long getUserIdByEmailAddress(long companyId,
148                    java.lang.String emailAddress)
149                    throws com.liferay.portal.kernel.exception.PortalException,
150                            com.liferay.portal.kernel.exception.SystemException;
151    
152            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153            public long getUserIdByScreenName(long companyId,
154                    java.lang.String screenName)
155                    throws com.liferay.portal.kernel.exception.PortalException,
156                            com.liferay.portal.kernel.exception.SystemException;
157    
158            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159            public boolean hasGroupUser(long groupId, long userId)
160                    throws com.liferay.portal.kernel.exception.SystemException;
161    
162            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163            public boolean hasRoleUser(long roleId, long userId)
164                    throws com.liferay.portal.kernel.exception.SystemException;
165    
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public boolean hasRoleUser(long companyId, java.lang.String name,
168                    long userId, boolean inherited)
169                    throws com.liferay.portal.kernel.exception.PortalException,
170                            com.liferay.portal.kernel.exception.SystemException;
171    
172            public void setRoleUsers(long roleId, long[] userIds)
173                    throws com.liferay.portal.kernel.exception.PortalException,
174                            com.liferay.portal.kernel.exception.SystemException;
175    
176            public void setUserGroupUsers(long userGroupId, long[] userIds)
177                    throws com.liferay.portal.kernel.exception.PortalException,
178                            com.liferay.portal.kernel.exception.SystemException;
179    
180            public void unsetGroupUsers(long groupId, long[] userIds)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException;
183    
184            public void unsetOrganizationUsers(long organizationId, long[] userIds)
185                    throws com.liferay.portal.kernel.exception.PortalException,
186                            com.liferay.portal.kernel.exception.SystemException;
187    
188            public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException;
191    
192            public void unsetRoleUsers(long roleId, long[] userIds)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException;
195    
196            public void unsetTeamUsers(long teamId, long[] userIds)
197                    throws com.liferay.portal.kernel.exception.PortalException,
198                            com.liferay.portal.kernel.exception.SystemException;
199    
200            public void unsetUserGroupUsers(long userGroupId, long[] userIds)
201                    throws com.liferay.portal.kernel.exception.PortalException,
202                            com.liferay.portal.kernel.exception.SystemException;
203    
204            public com.liferay.portal.model.User updateActive(long userId,
205                    boolean active)
206                    throws com.liferay.portal.kernel.exception.PortalException,
207                            com.liferay.portal.kernel.exception.SystemException;
208    
209            public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
210                    boolean agreedToTermsOfUse)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException;
213    
214            public void updateEmailAddress(long userId, java.lang.String password,
215                    java.lang.String emailAddress1, java.lang.String emailAddress2)
216                    throws com.liferay.portal.kernel.exception.PortalException,
217                            com.liferay.portal.kernel.exception.SystemException;
218    
219            public com.liferay.portal.model.User updateLockout(long userId,
220                    boolean lockout)
221                    throws com.liferay.portal.kernel.exception.PortalException,
222                            com.liferay.portal.kernel.exception.SystemException;
223    
224            public void updateOpenId(long userId, java.lang.String openId)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException;
227    
228            public void updateOrganizations(long userId, long[] organizationIds)
229                    throws com.liferay.portal.kernel.exception.PortalException,
230                            com.liferay.portal.kernel.exception.SystemException;
231    
232            public com.liferay.portal.model.User updatePassword(long userId,
233                    java.lang.String password1, java.lang.String password2,
234                    boolean passwordReset)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException;
237    
238            public void updatePortrait(long userId, byte[] bytes)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException;
241    
242            public void updateReminderQuery(long userId, java.lang.String question,
243                    java.lang.String answer)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException;
246    
247            public void updateScreenName(long userId, java.lang.String screenName)
248                    throws com.liferay.portal.kernel.exception.PortalException,
249                            com.liferay.portal.kernel.exception.SystemException;
250    
251            public com.liferay.portal.model.User updateUser(long userId,
252                    java.lang.String oldPassword, java.lang.String newPassword1,
253                    java.lang.String newPassword2, boolean passwordReset,
254                    java.lang.String reminderQueryQuestion,
255                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
256                    java.lang.String emailAddress, long facebookId,
257                    java.lang.String openId, java.lang.String languageId,
258                    java.lang.String timeZoneId, java.lang.String greeting,
259                    java.lang.String comments, java.lang.String firstName,
260                    java.lang.String middleName, java.lang.String lastName, int prefixId,
261                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
262                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
263                    java.lang.String facebookSn, java.lang.String icqSn,
264                    java.lang.String jabberSn, java.lang.String msnSn,
265                    java.lang.String mySpaceSn, java.lang.String skypeSn,
266                    java.lang.String twitterSn, java.lang.String ymSn,
267                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
268                    long[] roleIds,
269                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
270                    long[] userGroupIds,
271                    com.liferay.portal.service.ServiceContext serviceContext)
272                    throws com.liferay.portal.kernel.exception.PortalException,
273                            com.liferay.portal.kernel.exception.SystemException;
274    
275            public com.liferay.portal.model.User updateUser(long userId,
276                    java.lang.String oldPassword, java.lang.String newPassword1,
277                    java.lang.String newPassword2, boolean passwordReset,
278                    java.lang.String reminderQueryQuestion,
279                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
280                    java.lang.String emailAddress, long facebookId,
281                    java.lang.String openId, java.lang.String languageId,
282                    java.lang.String timeZoneId, java.lang.String greeting,
283                    java.lang.String comments, java.lang.String firstName,
284                    java.lang.String middleName, java.lang.String lastName, int prefixId,
285                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
286                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
287                    java.lang.String facebookSn, java.lang.String icqSn,
288                    java.lang.String jabberSn, java.lang.String msnSn,
289                    java.lang.String mySpaceSn, java.lang.String skypeSn,
290                    java.lang.String twitterSn, java.lang.String ymSn,
291                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
292                    long[] roleIds,
293                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
294                    long[] userGroupIds,
295                    java.util.List<com.liferay.portal.model.Address> addresses,
296                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
297                    java.util.List<com.liferay.portal.model.Phone> phones,
298                    java.util.List<com.liferay.portal.model.Website> websites,
299                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
300                    com.liferay.portal.service.ServiceContext serviceContext)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException;
303    }