com.liferay.portal.service
Interface UserService


@Transactional(rollbackFor={com.liferay.portal.PortalException.class,com.liferay.portal.SystemException.class})
public interface UserService

View Source

ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

This interface defines the service. The default implementation is com.liferay.portal.service.impl.UserServiceImpl. Modify methods in that class and rerun ServiceBuilder to populate this class and all other generated classes.

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.

Author:
Brian Wing Shun Chan
See Also:
UserServiceUtil

Method Summary
 void addGroupUsers(long groupId, long[] userIds)
           
 void addOrganizationUsers(long organizationId, long[] userIds)
           
 void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
           
 void addRoleUsers(long roleId, long[] userIds)
           
 User addUser(long companyId, boolean autoPassword, java.lang.String password1, java.lang.String password2, boolean autoScreenName, java.lang.String screenName, java.lang.String emailAddress, java.lang.String openId, java.util.Locale locale, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, java.lang.String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, java.util.List<Address> addresses, java.util.List<EmailAddress> emailAddresses, java.util.List<Phone> phones, java.util.List<Website> websites, java.util.List<AnnouncementsDelivery> announcementsDelivers, ServiceContext serviceContext)
           
 User addUser(long companyId, boolean autoPassword, java.lang.String password1, java.lang.String password2, boolean autoScreenName, java.lang.String screenName, java.lang.String emailAddress, java.lang.String openId, java.util.Locale locale, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, java.lang.String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext)
           
 void addUserGroupUsers(long userGroupId, long[] userIds)
           
 void deletePortrait(long userId)
           
 void deleteRoleUser(long roleId, long userId)
           
 void deleteUser(long userId)
           
 long getDefaultUserId(long companyId)
           
 long[] getGroupUserIds(long groupId)
           
 long[] getOrganizationUserIds(long organizationId)
           
 long[] getRoleUserIds(long roleId)
           
 User getUserByEmailAddress(long companyId, java.lang.String emailAddress)
           
 User getUserById(long userId)
           
 User getUserByScreenName(long companyId, java.lang.String screenName)
           
 long getUserIdByEmailAddress(long companyId, java.lang.String emailAddress)
           
 long getUserIdByScreenName(long companyId, java.lang.String screenName)
           
 boolean hasGroupUser(long groupId, long userId)
           
 boolean hasRoleUser(long roleId, long userId)
           
 void setRoleUsers(long roleId, long[] userIds)
           
 void setUserGroupUsers(long userGroupId, long[] userIds)
           
 void unsetGroupUsers(long groupId, long[] userIds)
           
 void unsetOrganizationUsers(long organizationId, long[] userIds)
           
 void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
           
 void unsetRoleUsers(long roleId, long[] userIds)
           
 void unsetUserGroupUsers(long userGroupId, long[] userIds)
           
 User updateActive(long userId, boolean active)
           
 User updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse)
           
 void updateEmailAddress(long userId, java.lang.String password, java.lang.String emailAddress1, java.lang.String emailAddress2)
           
 User updateLockout(long userId, boolean lockout)
           
 void updateOpenId(long userId, java.lang.String openId)
           
 void updateOrganizations(long userId, long[] organizationIds)
           
 User updatePassword(long userId, java.lang.String password1, java.lang.String password2, boolean passwordReset)
           
 void updatePortrait(long userId, byte[] bytes)
           
 void updateReminderQuery(long userId, java.lang.String question, java.lang.String answer)
           
 void updateScreenName(long userId, java.lang.String screenName)
           
 User updateUser(long userId, java.lang.String oldPassword, java.lang.String newPassword1, java.lang.String newPassword2, boolean passwordReset, java.lang.String reminderQueryQuestion, java.lang.String reminderQueryAnswer, java.lang.String screenName, java.lang.String emailAddress, java.lang.String openId, java.lang.String languageId, java.lang.String timeZoneId, java.lang.String greeting, java.lang.String comments, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, java.lang.String facebookSn, java.lang.String icqSn, java.lang.String jabberSn, java.lang.String msnSn, java.lang.String mySpaceSn, java.lang.String skypeSn, java.lang.String twitterSn, java.lang.String ymSn, java.lang.String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, java.util.List<UserGroupRole> userGroupRoles, long[] userGroupIds, java.util.List<Address> addresses, java.util.List<EmailAddress> emailAddresses, java.util.List<Phone> phones, java.util.List<Website> websites, java.util.List<AnnouncementsDelivery> announcementsDelivers, ServiceContext serviceContext)
           
 User updateUser(long userId, java.lang.String oldPassword, java.lang.String newPassword1, java.lang.String newPassword2, boolean passwordReset, java.lang.String reminderQueryQuestion, java.lang.String reminderQueryAnswer, java.lang.String screenName, java.lang.String emailAddress, java.lang.String openId, java.lang.String languageId, java.lang.String timeZoneId, java.lang.String greeting, java.lang.String comments, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, java.lang.String facebookSn, java.lang.String icqSn, java.lang.String jabberSn, java.lang.String msnSn, java.lang.String mySpaceSn, java.lang.String skypeSn, java.lang.String twitterSn, java.lang.String ymSn, java.lang.String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, java.util.List<UserGroupRole> userGroupRoles, long[] userGroupIds, ServiceContext serviceContext)
           
 

Method Detail

addGroupUsers

void addGroupUsers(long groupId,
                   long[] userIds)
                   throws com.liferay.portal.PortalException,
                          com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addOrganizationUsers

void addOrganizationUsers(long organizationId,
                          long[] userIds)
                          throws com.liferay.portal.PortalException,
                                 com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addPasswordPolicyUsers

void addPasswordPolicyUsers(long passwordPolicyId,
                            long[] userIds)
                            throws com.liferay.portal.PortalException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addRoleUsers

void addRoleUsers(long roleId,
                  long[] userIds)
                  throws com.liferay.portal.PortalException,
                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addUserGroupUsers

void addUserGroupUsers(long userGroupId,
                       long[] userIds)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addUser

User addUser(long companyId,
             boolean autoPassword,
             java.lang.String password1,
             java.lang.String password2,
             boolean autoScreenName,
             java.lang.String screenName,
             java.lang.String emailAddress,
             java.lang.String openId,
             java.util.Locale locale,
             java.lang.String firstName,
             java.lang.String middleName,
             java.lang.String lastName,
             int prefixId,
             int suffixId,
             boolean male,
             int birthdayMonth,
             int birthdayDay,
             int birthdayYear,
             java.lang.String jobTitle,
             long[] groupIds,
             long[] organizationIds,
             long[] roleIds,
             long[] userGroupIds,
             boolean sendEmail,
             ServiceContext serviceContext)
             throws com.liferay.portal.PortalException,
                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addUser

User addUser(long companyId,
             boolean autoPassword,
             java.lang.String password1,
             java.lang.String password2,
             boolean autoScreenName,
             java.lang.String screenName,
             java.lang.String emailAddress,
             java.lang.String openId,
             java.util.Locale locale,
             java.lang.String firstName,
             java.lang.String middleName,
             java.lang.String lastName,
             int prefixId,
             int suffixId,
             boolean male,
             int birthdayMonth,
             int birthdayDay,
             int birthdayYear,
             java.lang.String jobTitle,
             long[] groupIds,
             long[] organizationIds,
             long[] roleIds,
             long[] userGroupIds,
             boolean sendEmail,
             java.util.List<Address> addresses,
             java.util.List<EmailAddress> emailAddresses,
             java.util.List<Phone> phones,
             java.util.List<Website> websites,
             java.util.List<AnnouncementsDelivery> announcementsDelivers,
             ServiceContext serviceContext)
             throws com.liferay.portal.PortalException,
                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deletePortrait

void deletePortrait(long userId)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deleteRoleUser

void deleteRoleUser(long roleId,
                    long userId)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

deleteUser

void deleteUser(long userId)
                throws com.liferay.portal.PortalException,
                       com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getDefaultUserId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long getDefaultUserId(long companyId)
                      throws com.liferay.portal.PortalException,
                             com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getGroupUserIds

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long[] getGroupUserIds(long groupId)
                       throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getOrganizationUserIds

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long[] getOrganizationUserIds(long organizationId)
                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getRoleUserIds

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long[] getRoleUserIds(long roleId)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUserByEmailAddress

@Transactional(propagation=SUPPORTS,
               readOnly=true)
User getUserByEmailAddress(long companyId,
                                         java.lang.String emailAddress)
                           throws com.liferay.portal.PortalException,
                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getUserById

@Transactional(propagation=SUPPORTS,
               readOnly=true)
User getUserById(long userId)
                 throws com.liferay.portal.PortalException,
                        com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getUserByScreenName

@Transactional(propagation=SUPPORTS,
               readOnly=true)
User getUserByScreenName(long companyId,
                                       java.lang.String screenName)
                         throws com.liferay.portal.PortalException,
                                com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getUserIdByEmailAddress

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long getUserIdByEmailAddress(long companyId,
                                           java.lang.String emailAddress)
                             throws com.liferay.portal.PortalException,
                                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getUserIdByScreenName

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long getUserIdByScreenName(long companyId,
                                         java.lang.String screenName)
                           throws com.liferay.portal.PortalException,
                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

hasGroupUser

boolean hasGroupUser(long groupId,
                     long userId)
                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

hasRoleUser

boolean hasRoleUser(long roleId,
                    long userId)
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

setRoleUsers

void setRoleUsers(long roleId,
                  long[] userIds)
                  throws com.liferay.portal.PortalException,
                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

setUserGroupUsers

void setUserGroupUsers(long userGroupId,
                       long[] userIds)
                       throws com.liferay.portal.PortalException,
                              com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

unsetGroupUsers

void unsetGroupUsers(long groupId,
                     long[] userIds)
                     throws com.liferay.portal.PortalException,
                            com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

unsetOrganizationUsers

void unsetOrganizationUsers(long organizationId,
                            long[] userIds)
                            throws com.liferay.portal.PortalException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

unsetPasswordPolicyUsers

void unsetPasswordPolicyUsers(long passwordPolicyId,
                              long[] userIds)
                              throws com.liferay.portal.PortalException,
                                     com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

unsetRoleUsers

void unsetRoleUsers(long roleId,
                    long[] userIds)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

unsetUserGroupUsers

void unsetUserGroupUsers(long userGroupId,
                         long[] userIds)
                         throws com.liferay.portal.PortalException,
                                com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateActive

User updateActive(long userId,
                  boolean active)
                  throws com.liferay.portal.PortalException,
                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateAgreedToTermsOfUse

User updateAgreedToTermsOfUse(long userId,
                              boolean agreedToTermsOfUse)
                              throws com.liferay.portal.PortalException,
                                     com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateEmailAddress

void updateEmailAddress(long userId,
                        java.lang.String password,
                        java.lang.String emailAddress1,
                        java.lang.String emailAddress2)
                        throws com.liferay.portal.PortalException,
                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateLockout

User updateLockout(long userId,
                   boolean lockout)
                   throws com.liferay.portal.PortalException,
                          com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateOpenId

void updateOpenId(long userId,
                  java.lang.String openId)
                  throws com.liferay.portal.PortalException,
                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateOrganizations

void updateOrganizations(long userId,
                         long[] organizationIds)
                         throws com.liferay.portal.PortalException,
                                com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updatePassword

User updatePassword(long userId,
                    java.lang.String password1,
                    java.lang.String password2,
                    boolean passwordReset)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updatePortrait

void updatePortrait(long userId,
                    byte[] bytes)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateReminderQuery

void updateReminderQuery(long userId,
                         java.lang.String question,
                         java.lang.String answer)
                         throws com.liferay.portal.PortalException,
                                com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateScreenName

void updateScreenName(long userId,
                      java.lang.String screenName)
                      throws com.liferay.portal.PortalException,
                             com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateUser

User updateUser(long userId,
                java.lang.String oldPassword,
                java.lang.String newPassword1,
                java.lang.String newPassword2,
                boolean passwordReset,
                java.lang.String reminderQueryQuestion,
                java.lang.String reminderQueryAnswer,
                java.lang.String screenName,
                java.lang.String emailAddress,
                java.lang.String openId,
                java.lang.String languageId,
                java.lang.String timeZoneId,
                java.lang.String greeting,
                java.lang.String comments,
                java.lang.String firstName,
                java.lang.String middleName,
                java.lang.String lastName,
                int prefixId,
                int suffixId,
                boolean male,
                int birthdayMonth,
                int birthdayDay,
                int birthdayYear,
                java.lang.String smsSn,
                java.lang.String aimSn,
                java.lang.String facebookSn,
                java.lang.String icqSn,
                java.lang.String jabberSn,
                java.lang.String msnSn,
                java.lang.String mySpaceSn,
                java.lang.String skypeSn,
                java.lang.String twitterSn,
                java.lang.String ymSn,
                java.lang.String jobTitle,
                long[] groupIds,
                long[] organizationIds,
                long[] roleIds,
                java.util.List<UserGroupRole> userGroupRoles,
                long[] userGroupIds,
                ServiceContext serviceContext)
                throws com.liferay.portal.PortalException,
                       com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

updateUser

User updateUser(long userId,
                java.lang.String oldPassword,
                java.lang.String newPassword1,
                java.lang.String newPassword2,
                boolean passwordReset,
                java.lang.String reminderQueryQuestion,
                java.lang.String reminderQueryAnswer,
                java.lang.String screenName,
                java.lang.String emailAddress,
                java.lang.String openId,
                java.lang.String languageId,
                java.lang.String timeZoneId,
                java.lang.String greeting,
                java.lang.String comments,
                java.lang.String firstName,
                java.lang.String middleName,
                java.lang.String lastName,
                int prefixId,
                int suffixId,
                boolean male,
                int birthdayMonth,
                int birthdayDay,
                int birthdayYear,
                java.lang.String smsSn,
                java.lang.String aimSn,
                java.lang.String facebookSn,
                java.lang.String icqSn,
                java.lang.String jabberSn,
                java.lang.String msnSn,
                java.lang.String mySpaceSn,
                java.lang.String skypeSn,
                java.lang.String twitterSn,
                java.lang.String ymSn,
                java.lang.String jobTitle,
                long[] groupIds,
                long[] organizationIds,
                long[] roleIds,
                java.util.List<UserGroupRole> userGroupRoles,
                long[] userGroupIds,
                java.util.List<Address> addresses,
                java.util.List<EmailAddress> emailAddresses,
                java.util.List<Phone> phones,
                java.util.List<Website> websites,
                java.util.List<AnnouncementsDelivery> announcementsDelivers,
                ServiceContext serviceContext)
                throws com.liferay.portal.PortalException,
                       com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException