Class UserServiceWrapper

Object
com.liferay.portal.kernel.service.UserServiceWrapper
All Implemented Interfaces:
BaseService, ServiceWrapper<UserService>, UserService

public class UserServiceWrapper extends Object implements ServiceWrapper<UserService>, UserService
Provides a wrapper for UserService.
Author:
Brian Wing Shun Chan
See Also:
{$generated.description}
  • Constructor Details

    • UserServiceWrapper

      public UserServiceWrapper()
    • UserServiceWrapper

      public UserServiceWrapper(UserService userService)
  • Method Details

    • addGroupUsers

      public void addGroupUsers(long groupId, long[] userIds, ServiceContext serviceContext) throws PortalException
      Adds the users to the group.
      Specified by:
      addGroupUsers in interface UserService
      Parameters:
      groupId - the primary key of the group
      userIds - the primary keys of the users
      serviceContext - the service context to be applied (optionally null)
      Throws:
      PortalException
    • addOrganizationUsers

      public void addOrganizationUsers(long organizationId, long[] userIds) throws PortalException
      Adds the users to the organization.
      Specified by:
      addOrganizationUsers in interface UserService
      Parameters:
      organizationId - the primary key of the organization
      userIds - the primary keys of the users
      Throws:
      PortalException
    • addOrUpdateUser

      public User addOrUpdateUser(String externalReferenceCode, long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Specified by:
      addOrUpdateUser in interface UserService
      Throws:
      PortalException
    • addPasswordPolicyUsers

      public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds) throws PortalException
      Assigns the password policy to the users, removing any other currently assigned password policies.
      Specified by:
      addPasswordPolicyUsers in interface UserService
      Parameters:
      passwordPolicyId - the primary key of the password policy
      userIds - the primary keys of the users
      Throws:
      PortalException
    • addRoleUsers

      public void addRoleUsers(long roleId, long[] userIds) throws PortalException
      Adds the users to the role.
      Specified by:
      addRoleUsers in interface UserService
      Parameters:
      roleId - the primary key of the role
      userIds - the primary keys of the users
      Throws:
      PortalException
    • addTeamUsers

      public void addTeamUsers(long teamId, long[] userIds) throws PortalException
      Adds the users to the team.
      Specified by:
      addTeamUsers in interface UserService
      Parameters:
      teamId - the primary key of the team
      userIds - the primary keys of the users
      Throws:
      PortalException
    • addUser

      public User addUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Adds a user.

      This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

      Specified by:
      addUser in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the roles this user possesses
      userGroupIds - the primary keys of the user's user groups
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the new user
      Throws:
      PortalException
    • addUser

      public User addUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Adds a user with additional parameters.

      This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

      Specified by:
      addUser in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the roles this user possesses
      userGroupIds - the primary keys of the user's user groups
      addresses - the user's addresses
      emailAddresses - the user's email addresses
      phones - the user's phone numbers
      websites - the user's websites
      announcementsDelivers - the announcements deliveries
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the new user
      Throws:
      PortalException
    • addUser

      @Deprecated public User addUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Adds a user.

      This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

      Specified by:
      addUser in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      facebookId - the user's facebook ID
      openId - the user's OpenID
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the roles this user possesses
      userGroupIds - the primary keys of the user's user groups
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the new user
      Throws:
      PortalException
    • addUser

      @Deprecated public User addUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Adds a user with additional parameters.

      This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

      Specified by:
      addUser in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      facebookId - the user's facebook ID
      openId - the user's OpenID
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the roles this user possesses
      userGroupIds - the primary keys of the user's user groups
      addresses - the user's addresses
      emailAddresses - the user's email addresses
      phones - the user's phone numbers
      websites - the user's websites
      announcementsDelivers - the announcements deliveries
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the new user
      Throws:
      PortalException
    • addUserGroupUsers

      public void addUserGroupUsers(long userGroupId, long[] userIds) throws PortalException
      Adds the users to the user group.
      Specified by:
      addUserGroupUsers in interface UserService
      Parameters:
      userGroupId - the primary key of the user group
      userIds - the primary keys of the users
      Throws:
      PortalException
    • addUserWithWorkflow

      public User addUserWithWorkflow(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Adds a user with workflow.

      This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

      Specified by:
      addUserWithWorkflow in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the roles this user possesses
      userGroupIds - the primary keys of the user's user groups
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the new user
      Throws:
      PortalException
    • addUserWithWorkflow

      public User addUserWithWorkflow(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Adds a user with workflow and additional parameters.

      This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

      Specified by:
      addUserWithWorkflow in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the roles this user possesses
      userGroupIds - the primary keys of the user's user groups
      addresses - the user's addresses
      emailAddresses - the user's email addresses
      phones - the user's phone numbers
      websites - the user's websites
      announcementsDelivers - the announcements deliveries
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the new user
      Throws:
      PortalException
    • addUserWithWorkflow

      @Deprecated public User addUserWithWorkflow(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Adds a user with workflow.

      This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

      Specified by:
      addUserWithWorkflow in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      facebookId - the user's facebook ID
      openId - the user's OpenID
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the roles this user possesses
      userGroupIds - the primary keys of the user's user groups
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the new user
      Throws:
      PortalException
    • addUserWithWorkflow

      @Deprecated public User addUserWithWorkflow(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Adds a user with workflow and additional parameters.

      This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

      Specified by:
      addUserWithWorkflow in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      facebookId - the user's facebook ID
      openId - the user's OpenID
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the roles this user possesses
      userGroupIds - the primary keys of the user's user groups
      addresses - the user's addresses
      emailAddresses - the user's email addresses
      phones - the user's phone numbers
      websites - the user's websites
      announcementsDelivers - the announcements deliveries
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the new user
      Throws:
      PortalException
    • deletePortrait

      public void deletePortrait(long userId) throws PortalException
      Deletes the user's portrait image.
      Specified by:
      deletePortrait in interface UserService
      Parameters:
      userId - the primary key of the user
      Throws:
      PortalException
    • deleteRoleUser

      public void deleteRoleUser(long roleId, long userId) throws PortalException
      Removes the user from the role.
      Specified by:
      deleteRoleUser in interface UserService
      Parameters:
      roleId - the primary key of the role
      userId - the primary key of the user
      Throws:
      PortalException
    • deleteUser

      public void deleteUser(long userId) throws PortalException
      Deletes the user.
      Specified by:
      deleteUser in interface UserService
      Parameters:
      userId - the primary key of the user
      Throws:
      PortalException
    • fetchUserByExternalReferenceCode

      public User fetchUserByExternalReferenceCode(String externalReferenceCode, long companyId) throws PortalException
      Specified by:
      fetchUserByExternalReferenceCode in interface UserService
      Throws:
      PortalException
    • getCompanyUsers

      public List<User> getCompanyUsers(long companyId, int start, int end) throws PortalException
      Specified by:
      getCompanyUsers in interface UserService
      Throws:
      PortalException
    • getCompanyUsersCount

      public int getCompanyUsersCount(long companyId) throws PortalException
      Specified by:
      getCompanyUsersCount in interface UserService
      Throws:
      PortalException
    • getCurrentUser

      public User getCurrentUser() throws PortalException
      Specified by:
      getCurrentUser in interface UserService
      Throws:
      PortalException
    • getGroupUserIds

      public long[] getGroupUserIds(long groupId) throws PortalException
      Returns the primary keys of all the users belonging to the group.
      Specified by:
      getGroupUserIds in interface UserService
      Parameters:
      groupId - the primary key of the group
      Returns:
      the primary keys of the users belonging to the group
      Throws:
      PortalException
    • getGroupUsers

      public List<User> getGroupUsers(long groupId) throws PortalException
      Returns all the users belonging to the group.
      Specified by:
      getGroupUsers in interface UserService
      Parameters:
      groupId - the primary key of the group
      Returns:
      the users belonging to the group
      Throws:
      PortalException
    • getGroupUsers

      public List<User> getGroupUsers(long groupId, int status, int start, int end, OrderByComparator<User> orderByComparator) throws PortalException
      Returns the users belonging to a group.
      Specified by:
      getGroupUsers in interface UserService
      Parameters:
      groupId - the primary key of the group
      status - the workflow status
      start - the lower bound of the range of users
      end - the upper bound of the range of users (not inclusive)
      orderByComparator - the comparator to order the users by (optionally null)
      Returns:
      the matching users
      Throws:
      PortalException
    • getGroupUsers

      public List<User> getGroupUsers(long groupId, int status, OrderByComparator<User> orderByComparator) throws PortalException
      Returns the users belonging to a group.
      Specified by:
      getGroupUsers in interface UserService
      Parameters:
      groupId - the primary key of the group
      status - the workflow status
      orderByComparator - the comparator to order the users by (optionally null)
      Returns:
      the matching users
      Throws:
      PortalException
    • getGroupUsersCount

      public int getGroupUsersCount(long groupId, int status) throws PortalException
      Returns the number of users with the status belonging to the group.
      Specified by:
      getGroupUsersCount in interface UserService
      Parameters:
      groupId - the primary key of the group
      status - the workflow status
      Returns:
      the number of users with the status belonging to the group
      Throws:
      PortalException
    • getGtCompanyUsers

      public List<User> getGtCompanyUsers(long gtUserId, long companyId, int size) throws PortalException
      Specified by:
      getGtCompanyUsers in interface UserService
      Throws:
      PortalException
    • getGtOrganizationUsers

      public List<User> getGtOrganizationUsers(long gtUserId, long organizationId, int size) throws PortalException
      Specified by:
      getGtOrganizationUsers in interface UserService
      Throws:
      PortalException
    • getGtUserGroupUsers

      public List<User> getGtUserGroupUsers(long gtUserId, long userGroupId, int size) throws PortalException
      Specified by:
      getGtUserGroupUsers in interface UserService
      Throws:
      PortalException
    • getOrganizationsAndUserGroupsUsersCount

      public int getOrganizationsAndUserGroupsUsersCount(long[] organizationIds, long[] userGroupIds) throws PrincipalException
      Specified by:
      getOrganizationsAndUserGroupsUsersCount in interface UserService
      Throws:
      PrincipalException
    • getOrganizationUserIds

      public long[] getOrganizationUserIds(long organizationId) throws PortalException
      Returns the primary keys of all the users belonging to the organization.
      Specified by:
      getOrganizationUserIds in interface UserService
      Parameters:
      organizationId - the primary key of the organization
      Returns:
      the primary keys of the users belonging to the organization
      Throws:
      PortalException
    • getOrganizationUsers

      public List<User> getOrganizationUsers(long organizationId) throws PortalException
      Returns all the users belonging to the organization.
      Specified by:
      getOrganizationUsers in interface UserService
      Parameters:
      organizationId - the primary key of the organization
      Returns:
      users belonging to the organization
      Throws:
      PortalException
    • getOrganizationUsers

      public List<User> getOrganizationUsers(long organizationId, int status, int start, int end, OrderByComparator<User> orderByComparator) throws PortalException
      Returns the users belonging to the organization with the status.
      Specified by:
      getOrganizationUsers in interface UserService
      Parameters:
      organizationId - the primary key of the organization
      status - the workflow status
      start - the lower bound of the range of users
      end - the upper bound of the range of users (not inclusive)
      orderByComparator - the comparator to order the users by (optionally null)
      Returns:
      the matching users
      Throws:
      PortalException
    • getOrganizationUsers

      public List<User> getOrganizationUsers(long organizationId, int status, OrderByComparator<User> orderByComparator) throws PortalException
      Returns the users belonging to the organization with the status.
      Specified by:
      getOrganizationUsers in interface UserService
      Parameters:
      organizationId - the primary key of the organization
      status - the workflow status
      orderByComparator - the comparator to order the users by (optionally null)
      Returns:
      the matching users
      Throws:
      PortalException
    • getOrganizationUsersCount

      public int getOrganizationUsersCount(long organizationId, int status) throws PortalException
      Returns the number of users with the status belonging to the organization.
      Specified by:
      getOrganizationUsersCount in interface UserService
      Parameters:
      organizationId - the primary key of the organization
      status - the workflow status
      Returns:
      the number of users with the status belonging to the organization
      Throws:
      PortalException
    • getOSGiServiceIdentifier

      public String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Specified by:
      getOSGiServiceIdentifier in interface UserService
      Returns:
      the OSGi service identifier
    • getRoleUserIds

      public long[] getRoleUserIds(long roleId) throws PortalException
      Returns the primary keys of all the users belonging to the role.
      Specified by:
      getRoleUserIds in interface UserService
      Parameters:
      roleId - the primary key of the role
      Returns:
      the primary keys of the users belonging to the role
      Throws:
      PortalException
    • getUserByEmailAddress

      public User getUserByEmailAddress(long companyId, String emailAddress) throws PortalException
      Returns the user with the email address.
      Specified by:
      getUserByEmailAddress in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      emailAddress - the user's email address
      Returns:
      the user with the email address
      Throws:
      PortalException
    • getUserByExternalReferenceCode

      public User getUserByExternalReferenceCode(long companyId, String externalReferenceCode) throws PortalException
      Returns the user with the external reference code.
      Specified by:
      getUserByExternalReferenceCode in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      externalReferenceCode - the user's external reference code
      Returns:
      the user with the external reference code
      Throws:
      PortalException
    • getUserByExternalReferenceCode

      public User getUserByExternalReferenceCode(String externalReferenceCode, long companyId) throws PortalException
      Specified by:
      getUserByExternalReferenceCode in interface UserService
      Throws:
      PortalException
    • getUserById

      public User getUserById(long userId) throws PortalException
      Returns the user with the primary key.
      Specified by:
      getUserById in interface UserService
      Parameters:
      userId - the primary key of the user
      Returns:
      the user with the primary key
      Throws:
      PortalException
    • getUserByScreenName

      public User getUserByScreenName(long companyId, String screenName) throws PortalException
      Returns the user with the screen name.
      Specified by:
      getUserByScreenName in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      screenName - the user's screen name
      Returns:
      the user with the screen name
      Throws:
      PortalException
    • getUserGroupUsers

      public List<User> getUserGroupUsers(long userGroupId) throws PortalException
      Specified by:
      getUserGroupUsers in interface UserService
      Throws:
      PortalException
    • getUserGroupUsers

      public List<User> getUserGroupUsers(long userGroupId, int start, int end) throws PortalException
      Specified by:
      getUserGroupUsers in interface UserService
      Throws:
      PortalException
    • getUserIdByEmailAddress

      public long getUserIdByEmailAddress(long companyId, String emailAddress) throws PortalException
      Returns the primary key of the user with the email address.
      Specified by:
      getUserIdByEmailAddress in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      emailAddress - the user's email address
      Returns:
      the primary key of the user with the email address
      Throws:
      PortalException
    • getUserIdByScreenName

      public long getUserIdByScreenName(long companyId, String screenName) throws PortalException
      Returns the primary key of the user with the screen name.
      Specified by:
      getUserIdByScreenName in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      screenName - the user's screen name
      Returns:
      the primary key of the user with the screen name
      Throws:
      PortalException
    • hasGroupUser

      public boolean hasGroupUser(long groupId, long userId) throws PortalException
      Returns true if the user is a member of the group.
      Specified by:
      hasGroupUser in interface UserService
      Parameters:
      groupId - the primary key of the group
      userId - the primary key of the user
      Returns:
      true if the user is a member of the group; false otherwise
      Throws:
      PortalException
    • hasRoleUser

      public boolean hasRoleUser(long roleId, long userId) throws PortalException
      Returns true if the user is a member of the role.
      Specified by:
      hasRoleUser in interface UserService
      Parameters:
      roleId - the primary key of the role
      userId - the primary key of the user
      Returns:
      true if the user is a member of the role; false otherwise
      Throws:
      PortalException
    • hasRoleUser

      public boolean hasRoleUser(long companyId, String name, long userId, boolean inherited) throws PortalException
      Returns true if the user has the role with the name, optionally through inheritance.
      Specified by:
      hasRoleUser in interface UserService
      Parameters:
      companyId - the primary key of the role's company
      name - the name of the role (must be a regular role, not an organization, site or provider role)
      userId - the primary key of the user
      inherited - whether to include roles inherited from organizations, sites, etc.
      Returns:
      true if the user has the role; false otherwise
      Throws:
      PortalException
    • sendPasswordByEmailAddress

      public boolean sendPasswordByEmailAddress(long companyId, String emailAddress) throws PortalException
      Sends a password notification email to the user matching the email address. The portal's settings determine whether a password is sent explicitly or whether a link for resetting the user's password is sent. The method sends the email asynchronously and returns before the email is sent.

      The content of the notification email is specified with the admin.email.password portal property keys. They can be overridden via a portal-ext.properties file or modified through the Portal Settings UI.

      Specified by:
      sendPasswordByEmailAddress in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      emailAddress - the user's email address
      Returns:
      true if the notification email includes a new password; false if the notification email only contains a reset link
      Throws:
      PortalException
    • sendPasswordByScreenName

      public boolean sendPasswordByScreenName(long companyId, String screenName) throws PortalException
      Sends a password notification email to the user matching the screen name. The portal's settings determine whether a password is sent explicitly or whether a link for resetting the user's password is sent. The method sends the email asynchronously and returns before the email is sent.

      The content of the notification email is specified with the admin.email.password portal property keys. They can be overridden via a portal-ext.properties file or modified through the Portal Settings UI.

      Specified by:
      sendPasswordByScreenName in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      screenName - the user's screen name
      Returns:
      true if the notification email includes a new password; false if the notification email only contains a reset link
      Throws:
      PortalException
    • sendPasswordByUserId

      public boolean sendPasswordByUserId(long userId) throws PortalException
      Sends a password notification email to the user matching the ID. The portal's settings determine whether a password is sent explicitly or whether a link for resetting the user's password is sent. The method sends the email asynchronously and returns before the email is sent.

      The content of the notification email is specified with the admin.email.password portal property keys. They can be overridden via a portal-ext.properties file or modified through the Portal Settings UI.

      Specified by:
      sendPasswordByUserId in interface UserService
      Parameters:
      userId - the user's primary key
      Returns:
      true if the notification email includes a new password; false if the notification email only contains a reset link
      Throws:
      PortalException
    • setRoleUsers

      public void setRoleUsers(long roleId, long[] userIds) throws PortalException
      Sets the users in the role, removing and adding users to the role as necessary.
      Specified by:
      setRoleUsers in interface UserService
      Parameters:
      roleId - the primary key of the role
      userIds - the primary keys of the users
      Throws:
      PortalException
    • setUserGroupUsers

      public void setUserGroupUsers(long userGroupId, long[] userIds) throws PortalException
      Sets the users in the user group, removing and adding users to the user group as necessary.
      Specified by:
      setUserGroupUsers in interface UserService
      Parameters:
      userGroupId - the primary key of the user group
      userIds - the primary keys of the users
      Throws:
      PortalException
    • unsetGroupTeamsUsers

      public void unsetGroupTeamsUsers(long groupId, long[] userIds) throws PortalException
      Removes the users from the teams of a group.
      Specified by:
      unsetGroupTeamsUsers in interface UserService
      Parameters:
      groupId - the primary key of the group
      userIds - the primary keys of the users
      Throws:
      PortalException
    • unsetGroupUsers

      public void unsetGroupUsers(long groupId, long[] userIds, ServiceContext serviceContext) throws PortalException
      Removes the users from the group.
      Specified by:
      unsetGroupUsers in interface UserService
      Parameters:
      groupId - the primary key of the group
      userIds - the primary keys of the users
      serviceContext - the service context to be applied (optionally null)
      Throws:
      PortalException
    • unsetOrganizationUsers

      public void unsetOrganizationUsers(long organizationId, long[] userIds) throws PortalException
      Removes the users from the organization.
      Specified by:
      unsetOrganizationUsers in interface UserService
      Parameters:
      organizationId - the primary key of the organization
      userIds - the primary keys of the users
      Throws:
      PortalException
    • unsetPasswordPolicyUsers

      public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds) throws PortalException
      Removes the users from the password policy.
      Specified by:
      unsetPasswordPolicyUsers in interface UserService
      Parameters:
      passwordPolicyId - the primary key of the password policy
      userIds - the primary keys of the users
      Throws:
      PortalException
    • unsetRoleUsers

      public void unsetRoleUsers(long roleId, long[] userIds) throws PortalException
      Removes the users from the role.
      Specified by:
      unsetRoleUsers in interface UserService
      Parameters:
      roleId - the primary key of the role
      userIds - the primary keys of the users
      Throws:
      PortalException
    • unsetTeamUsers

      public void unsetTeamUsers(long teamId, long[] userIds) throws PortalException
      Removes the users from the team.
      Specified by:
      unsetTeamUsers in interface UserService
      Parameters:
      teamId - the primary key of the team
      userIds - the primary keys of the users
      Throws:
      PortalException
    • unsetUserGroupUsers

      public void unsetUserGroupUsers(long userGroupId, long[] userIds) throws PortalException
      Removes the users from the user group.
      Specified by:
      unsetUserGroupUsers in interface UserService
      Parameters:
      userGroupId - the primary key of the user group
      userIds - the primary keys of the users
      Throws:
      PortalException
    • updateAgreedToTermsOfUse

      public User updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse) throws PortalException
      Updates the user's response to the terms of use agreement.
      Specified by:
      updateAgreedToTermsOfUse in interface UserService
      Parameters:
      userId - the primary key of the user
      agreedToTermsOfUse - whether the user has agree to the terms of use
      Returns:
      the user
      Throws:
      PortalException
    • updateEmailAddress

      public User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2, ServiceContext serviceContext) throws PortalException
      Updates the user's email address.
      Specified by:
      updateEmailAddress in interface UserService
      Parameters:
      userId - the primary key of the user
      password - the user's password
      emailAddress1 - the user's new email address
      emailAddress2 - the user's new email address confirmation
      serviceContext - the service context to be applied. Must set the portal URL, main path, primary key of the layout, remote address, remote host, and agent for the user.
      Returns:
      the user
      Throws:
      PortalException
    • updateExternalReferenceCode

      public User updateExternalReferenceCode(long userId, String externalReferenceCode) throws PortalException
      Specified by:
      updateExternalReferenceCode in interface UserService
      Throws:
      PortalException
    • updateExternalReferenceCode

      public User updateExternalReferenceCode(User user, String externalReferenceCode) throws PortalException
      Specified by:
      updateExternalReferenceCode in interface UserService
      Throws:
      PortalException
    • updateIncompleteUser

      public User updateIncompleteUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, boolean updateUserInformation, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Updates a user account that was automatically created when a guest user participated in an action (e.g. posting a comment) and only provided his name and email address.
      Specified by:
      updateIncompleteUser in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      updateUserInformation - whether to update the user's information
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the expando bridge attributes for the user.
      Returns:
      the user
      Throws:
      PortalException
    • updateIncompleteUser

      @Deprecated public User updateIncompleteUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, boolean updateUserInformation, boolean sendEmail, ServiceContext serviceContext) throws PortalException
      Deprecated.
      As of Athanasius (7.3.x), replaced by #updateIncompleteUser(long, long, boolean, String, String, boolean, String, String, Locale, String, String, String, long, long, boolean, int, int, int, String, boolean, boolean, ServiceContext)
      Updates a user account that was automatically created when a guest user participated in an action (e.g. posting a comment) and only provided his name and email address.
      Specified by:
      updateIncompleteUser in interface UserService
      Parameters:
      companyId - the primary key of the user's company
      autoPassword - whether a password should be automatically generated for the user
      password1 - the user's password
      password2 - the user's password confirmation
      autoScreenName - whether a screen name should be automatically generated for the user
      screenName - the user's screen name
      emailAddress - the user's email address
      facebookId - the user's facebook ID
      openId - the user's OpenID
      locale - the user's locale
      firstName - the user's first name
      middleName - the user's middle name
      lastName - the user's last name
      prefixListTypeId - the user's name prefix ID
      suffixListTypeId - the user's name suffix ID
      male - whether the user is male
      birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's birthday day
      birthdayYear - the user's birthday year
      jobTitle - the user's job title
      updateUserInformation - whether to update the user's information
      sendEmail - whether to send the user an email notification about their new account
      serviceContext - the service context to be applied (optionally null). Can set the expando bridge attributes for the user.
      Returns:
      the user
      Throws:
      PortalException
    • updateLanguageId

      public User updateLanguageId(long userId, String languageId) throws PortalException
      Specified by:
      updateLanguageId in interface UserService
      Throws:
      PortalException
    • updateLockoutById

      public User updateLockoutById(long userId, boolean lockout) throws PortalException
      Updates whether the user is locked out from logging in.
      Specified by:
      updateLockoutById in interface UserService
      Parameters:
      userId - the primary key of the user
      lockout - whether the user is locked out
      Returns:
      the user
      Throws:
      PortalException
    • updateOpenId

      @Deprecated public User updateOpenId(long userId, String openId) throws PortalException
      Deprecated.
      As of Athanasius (7.3.x), with no direct replacement
      Updates the user's OpenID.
      Specified by:
      updateOpenId in interface UserService
      Parameters:
      userId - the primary key of the user
      openId - the new OpenID
      Returns:
      the user
      Throws:
      PortalException
    • updateOrganizations

      public void updateOrganizations(long userId, long[] organizationIds, ServiceContext serviceContext) throws PortalException
      Sets the organizations that the user is in, removing and adding organizations as necessary.
      Specified by:
      updateOrganizations in interface UserService
      Parameters:
      userId - the primary key of the user
      organizationIds - the primary keys of the organizations
      serviceContext - the service context to be applied. Must set whether user indexing is enabled.
      Throws:
      PortalException
    • updatePassword

      public User updatePassword(long userId, String password1, String password2, boolean passwordReset) throws PortalException
      Updates the user's password without tracking or validation of the change.
      Specified by:
      updatePassword in interface UserService
      Parameters:
      userId - the primary key of the user
      password1 - the user's new password
      password2 - the user's new password confirmation
      passwordReset - whether the user should be asked to reset their password the next time they log in
      Returns:
      the user
      Throws:
      PortalException
    • updatePortrait

      public User updatePortrait(long userId, byte[] bytes) throws PortalException
      Updates the user's portrait image.
      Specified by:
      updatePortrait in interface UserService
      Parameters:
      userId - the primary key of the user
      bytes - the new portrait image data
      Returns:
      the user
      Throws:
      PortalException
    • updateReminderQuery

      public User updateReminderQuery(long userId, String question, String answer) throws PortalException
      Updates the user's password reset question and answer.
      Specified by:
      updateReminderQuery in interface UserService
      Parameters:
      userId - the primary key of the user
      question - the user's new password reset question
      answer - the user's new password reset answer
      Returns:
      the user
      Throws:
      PortalException
    • updateScreenName

      public User updateScreenName(long userId, String screenName) throws PortalException
      Updates the user's screen name.
      Specified by:
      updateScreenName in interface UserService
      Parameters:
      userId - the primary key of the user
      screenName - the user's new screen name
      Returns:
      the user
      Throws:
      PortalException
    • updateStatus

      public User updateStatus(long userId, int status, ServiceContext serviceContext) throws PortalException
      Updates the user's workflow status.
      Specified by:
      updateStatus in interface UserService
      Parameters:
      userId - the primary key of the user
      status - the user's new workflow status
      serviceContext - the service context to be applied. You can specify an unencrypted custom password (used by an LDAP listener) for the user via attribute passwordUnencrypted.
      Returns:
      the user
      Throws:
      PortalException
    • updateStatus

      public User updateStatus(User user, int status, ServiceContext serviceContext) throws PortalException
      Specified by:
      updateStatus in interface UserService
      Throws:
      PortalException
    • updateUser

      public User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, boolean hasPortrait, byte[] portraitBytes, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<UserGroupRole> userGroupRoles, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, ServiceContext serviceContext) throws PortalException
      Updates the user with additional parameters.
      Specified by:
      updateUser in interface UserService
      Parameters:
      userId - the primary key of the user
      oldPassword - the user's old password
      newPassword1 - the user's new password (optionally null)
      newPassword2 - the user's new password confirmation (optionally null)
      passwordReset - whether the user should be asked to reset their password the next time they login
      reminderQueryQuestion - the user's new password reset question
      reminderQueryAnswer - the user's new password reset answer
      screenName - the user's new screen name
      emailAddress - the user's new email address
      hasPortrait - if the user has a custom portrait image
      portraitBytes - the new portrait image data
      languageId - the user's new language ID
      timeZoneId - the user's new time zone ID
      greeting - the user's new greeting
      comments - the user's new comments
      firstName - the user's new first name
      middleName - the user's new middle name
      lastName - the user's new last name
      prefixListTypeId - the user's new name prefix ID
      suffixListTypeId - the user's new name suffix ID
      male - whether user is male
      birthdayMonth - the user's new birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's new birthday day
      birthdayYear - the user's birthday year
      smsSn - the user's new SMS screen name
      facebookSn - the user's new Facebook screen name
      jabberSn - the user's new Jabber screen name
      skypeSn - the user's new Skype screen name
      twitterSn - the user's new Twitter screen name
      jobTitle - the user's new job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the user's roles
      userGroupRoles - the user user's group roles
      userGroupIds - the primary keys of the user's user groups
      addresses - the user's addresses
      emailAddresses - the user's email addresses
      phones - the user's phone numbers
      websites - the user's websites
      announcementsDelivers - the announcements deliveries
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the user
      Throws:
      PortalException
    • updateUser

      @Deprecated public User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, boolean hasPortrait, byte[] portraitBytes, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<UserGroupRole> userGroupRoles, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, ServiceContext serviceContext) throws PortalException
      Updates the user with additional parameters.
      Specified by:
      updateUser in interface UserService
      Parameters:
      userId - the primary key of the user
      oldPassword - the user's old password
      newPassword1 - the user's new password (optionally null)
      newPassword2 - the user's new password confirmation (optionally null)
      passwordReset - whether the user should be asked to reset their password the next time they login
      reminderQueryQuestion - the user's new password reset question
      reminderQueryAnswer - the user's new password reset answer
      screenName - the user's new screen name
      emailAddress - the user's new email address
      hasPortrait - if the user has a custom portrait image
      portraitBytes - the new portrait image data
      languageId - the user's new language ID
      timeZoneId - the user's new time zone ID
      greeting - the user's new greeting
      comments - the user's new comments
      firstName - the user's new first name
      middleName - the user's new middle name
      lastName - the user's new last name
      prefixListTypeId - the user's new name prefix ID
      suffixListTypeId - the user's new name suffix ID
      male - whether user is male
      birthdayMonth - the user's new birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's new birthday day
      birthdayYear - the user's birthday year
      smsSn - the user's new SMS screen name
      facebookSn - the user's new Facebook screen name
      jabberSn - the user's new Jabber screen name
      skypeSn - the user's new Skype screen name
      twitterSn - the user's new Twitter screen name
      jobTitle - the user's new job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the user's roles
      userGroupRoles - the user user's group roles
      userGroupIds - the primary keys of the user's user groups
      addresses - the user's addresses
      emailAddresses - the user's email addresses
      phones - the user's phone numbers
      websites - the user's websites
      announcementsDelivers - the announcements deliveries
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the user
      Throws:
      PortalException
    • updateUser

      @Deprecated public User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<UserGroupRole> userGroupRoles, long[] userGroupIds, ServiceContext serviceContext) throws PortalException
      Updates the user.
      Specified by:
      updateUser in interface UserService
      Parameters:
      userId - the primary key of the user
      oldPassword - the user's old password
      newPassword1 - the user's new password (optionally null)
      newPassword2 - the user's new password confirmation (optionally null)
      passwordReset - whether the user should be asked to reset their password the next time they login
      reminderQueryQuestion - the user's new password reset question
      reminderQueryAnswer - the user's new password reset answer
      screenName - the user's new screen name
      emailAddress - the user's new email address
      languageId - the user's new language ID
      timeZoneId - the user's new time zone ID
      greeting - the user's new greeting
      comments - the user's new comments
      firstName - the user's new first name
      middleName - the user's new middle name
      lastName - the user's new last name
      prefixListTypeId - the user's new name prefix ID
      suffixListTypeId - the user's new name suffix ID
      male - whether user is male
      birthdayMonth - the user's new birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's new birthday day
      birthdayYear - the user's birthday year
      smsSn - the user's new SMS screen name
      facebookSn - the user's new Facebook screen name
      jabberSn - the user's new Jabber screen name
      skypeSn - the user's new Skype screen name
      twitterSn - the user's new Twitter screen name
      jobTitle - the user's new job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the user's roles
      userGroupRoles - the user user's group roles
      userGroupIds - the primary keys of the user's user groups
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the user
      Throws:
      PortalException
    • updateUser

      public User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<UserGroupRole> userGroupRoles, long[] userGroupIds, ServiceContext serviceContext) throws PortalException
      Updates the user.
      Specified by:
      updateUser in interface UserService
      Parameters:
      userId - the primary key of the user
      oldPassword - the user's old password
      newPassword1 - the user's new password (optionally null)
      newPassword2 - the user's new password confirmation (optionally null)
      passwordReset - whether the user should be asked to reset their password the next time they login
      reminderQueryQuestion - the user's new password reset question
      reminderQueryAnswer - the user's new password reset answer
      screenName - the user's new screen name
      emailAddress - the user's new email address
      languageId - the user's new language ID
      timeZoneId - the user's new time zone ID
      greeting - the user's new greeting
      comments - the user's new comments
      firstName - the user's new first name
      middleName - the user's new middle name
      lastName - the user's new last name
      prefixListTypeId - the user's new name prefix ID
      suffixListTypeId - the user's new name suffix ID
      male - whether user is male
      birthdayMonth - the user's new birthday month (0-based, meaning 0 for January)
      birthdayDay - the user's new birthday day
      birthdayYear - the user's birthday year
      smsSn - the user's new SMS screen name
      facebookSn - the user's new Facebook screen name
      jabberSn - the user's new Jabber screen name
      skypeSn - the user's new Skype screen name
      twitterSn - the user's new Twitter screen name
      jobTitle - the user's new job title
      groupIds - the primary keys of the user's groups
      organizationIds - the primary keys of the user's organizations
      roleIds - the primary keys of the user's roles
      userGroupRoles - the user user's group roles
      userGroupIds - the primary keys of the user's user groups
      serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
      Returns:
      the user
      Throws:
      PortalException
    • getWrappedService

      public UserService getWrappedService()
      Specified by:
      getWrappedService in interface ServiceWrapper<UserService>
    • setWrappedService

      public void setWrappedService(UserService userService)
      Specified by:
      setWrappedService in interface ServiceWrapper<UserService>