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