Liferay 7.0-ce-b4

com.liferay.portal.service.http
Class UserServiceSoap

java.lang.Object
  extended by com.liferay.portal.service.http.UserServiceSoap

@ProviderType
public class UserServiceSoap
extends Object

Provides the SOAP utility for the UserServiceUtil service utility. The static methods of this class calls the same methods of the service utility. However, the signatures are different because it is difficult for SOAP to support certain types.

ServiceBuilder follows certain rules in translating the methods. For example, if the method in the service utility returns a List, that is translated to an array of UserSoap. If the method in the service utility returns a User, that is translated to a UserSoap. Methods that SOAP cannot safely wire are skipped.

The benefits of using the SOAP utility is that it is cross platform compatible. SOAP allows different languages like Java, .NET, C++, PHP, and even Perl, to call the generated services. One drawback of SOAP is that it is slow because it needs to serialize all calls into a text format (XML).

You can see a list of services at http://localhost:8080/api/axis. Set the property axis.servlet.hosts.allowed in portal.properties to configure security.

The SOAP utility is only generated for remote services.

See Also:
UserServiceHttp, UserSoap, UserServiceUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
UserServiceSoap()
           
 
Method Summary
static void addGroupUsers(long groupId, long[] userIds, ServiceContext serviceContext)
          Adds the users to the group.
static void addOrganizationUsers(long organizationId, long[] userIds)
          Adds the users to the organization.
static void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
          Assigns the password policy to the users, removing any other currently assigned password policies.
static void addRoleUsers(long roleId, long[] userIds)
          Adds the users to the role.
static void addTeamUsers(long teamId, long[] userIds)
          Adds the users to the team.
static UserSoap addUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, String locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, AddressSoap[] addresses, EmailAddressSoap[] emailAddresses, PhoneSoap[] phones, WebsiteSoap[] websites, AnnouncementsDeliverySoap[] announcementsDelivers, boolean sendEmail, ServiceContext serviceContext)
          Adds a user with additional parameters.
static UserSoap addUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, String locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext)
          Adds a user.
static void addUserGroupUsers(long userGroupId, long[] userIds)
          Adds the users to the user group.
static UserSoap addUserWithWorkflow(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, String locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, AddressSoap[] addresses, EmailAddressSoap[] emailAddresses, PhoneSoap[] phones, WebsiteSoap[] websites, AnnouncementsDeliverySoap[] announcementsDelivers, boolean sendEmail, ServiceContext serviceContext)
          Adds a user with workflow and additional parameters.
static UserSoap addUserWithWorkflow(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, String locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext)
          Adds a user with workflow.
static void deletePortrait(long userId)
          Deletes the user's portrait image.
static void deleteRoleUser(long roleId, long userId)
          Removes the user from the role.
static void deleteUser(long userId)
          Deletes the user.
static UserSoap[] getCompanyUsers(long companyId, int start, int end)
           
static int getCompanyUsersCount(long companyId)
           
static UserSoap getCurrentUser()
           
static long[] getGroupUserIds(long groupId)
          Returns the primary keys of all the users belonging to the group.
static UserSoap[] getGroupUsers(long groupId)
          Returns all the users belonging to the group.
static long[] getOrganizationUserIds(long organizationId)
          Returns the primary keys of all the users belonging to the organization.
static UserSoap[] getOrganizationUsers(long organizationId)
          Returns all the users belonging to the organization.
static long[] getRoleUserIds(long roleId)
          Returns the primary keys of all the users belonging to the role.
static UserSoap getUserByEmailAddress(long companyId, String emailAddress)
          Returns the user with the email address.
static UserSoap getUserById(long userId)
          Returns the user with the primary key.
static UserSoap getUserByScreenName(long companyId, String screenName)
          Returns the user with the screen name.
static UserSoap[] getUserGroupUsers(long userGroupId)
           
static long getUserIdByEmailAddress(long companyId, String emailAddress)
          Returns the primary key of the user with the email address.
static long getUserIdByScreenName(long companyId, String screenName)
          Returns the primary key of the user with the screen name.
static boolean hasGroupUser(long groupId, long userId)
          Returns true if the user is a member of the group.
static boolean hasRoleUser(long roleId, long userId)
          Returns true if the user is a member of the role.
static boolean hasRoleUser(long companyId, String name, long userId, boolean inherited)
          Returns true if the user has the role with the name, optionally through inheritance.
static boolean sendPasswordByEmailAddress(long companyId, String emailAddress)
          Sends a password notification email to the user matching the email address.
static boolean sendPasswordByScreenName(long companyId, String screenName)
          Sends a password notification email to the user matching the screen name.
static boolean sendPasswordByUserId(long userId)
          Sends a password notification email to the user matching the ID.
static void setRoleUsers(long roleId, long[] userIds)
          Sets the users in the role, removing and adding users to the role as necessary.
static void setUserGroupUsers(long userGroupId, long[] userIds)
          Sets the users in the user group, removing and adding users to the user group as necessary.
static void unsetGroupTeamsUsers(long groupId, long[] userIds)
          Removes the users from the teams of a group.
static void unsetGroupUsers(long groupId, long[] userIds, ServiceContext serviceContext)
          Removes the users from the group.
static void unsetOrganizationUsers(long organizationId, long[] userIds)
          Removes the users from the organization.
static void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
          Removes the users from the password policy.
static void unsetRoleUsers(long roleId, long[] userIds)
          Removes the users from the role.
static void unsetTeamUsers(long teamId, long[] userIds)
          Removes the users from the team.
static void unsetUserGroupUsers(long userGroupId, long[] userIds)
          Removes the users from the user group.
static UserSoap updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse)
          Updates the user's response to the terms of use agreement.
static UserSoap updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2, ServiceContext serviceContext)
          Updates the user's email address.
static UserSoap updateIncompleteUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, String locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, boolean updateUserInformation, boolean sendEmail, ServiceContext 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.
static UserSoap updateLockoutById(long userId, boolean lockout)
          Updates whether the user is locked out from logging in.
static UserSoap updateOpenId(long userId, String openId)
          Updates the user's OpenID.
static void updateOrganizations(long userId, long[] organizationIds, ServiceContext serviceContext)
          Sets the organizations that the user is in, removing and adding organizations as necessary.
static UserSoap updatePassword(long userId, String password1, String password2, boolean passwordReset)
          Updates the user's password without tracking or validation of the change.
static UserSoap updatePortrait(long userId, byte[] bytes)
          Updates the user's portrait image.
static UserSoap updateReminderQuery(long userId, String question, String answer)
          Updates the user's password reset question and answer.
static UserSoap updateScreenName(long userId, String screenName)
          Updates the user's screen name.
static UserSoap updateStatus(long userId, int status)
          Deprecated. As of 7.0.0, replaced by updateStatus(long, int, ServiceContext)
static UserSoap updateStatus(long userId, int status, ServiceContext serviceContext)
          Updates the user's workflow status.
static UserSoap updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, boolean portrait, byte[] portraitBytes, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixId, long suffixId, 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, UserGroupRoleSoap[] userGroupRoles, long[] userGroupIds, AddressSoap[] addresses, EmailAddressSoap[] emailAddresses, PhoneSoap[] phones, WebsiteSoap[] websites, AnnouncementsDeliverySoap[] announcementsDelivers, ServiceContext serviceContext)
          Updates the user with additional parameters.
static UserSoap 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 prefixId, long suffixId, 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, UserGroupRoleSoap[] userGroupRoles, long[] userGroupIds, AddressSoap[] addresses, EmailAddressSoap[] emailAddresses, PhoneSoap[] phones, WebsiteSoap[] websites, AnnouncementsDeliverySoap[] announcementsDelivers, ServiceContext serviceContext)
          Deprecated. As of 7.0.0, replaced by #updateUser(long, String, String, String, boolean, String, String, String, String, long, String, boolean, byte[], String, String, String, String, String, String, String, int, int, boolean, int, int, int, String, String, String, String, String, String, String, String, String, String, String, long[], long[], long[], List, long[], List, List, List, List, List, ServiceContext)
static UserSoap 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 prefixId, long suffixId, 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, UserGroupRoleSoap[] userGroupRoles, long[] userGroupIds, ServiceContext serviceContext)
          Updates the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserServiceSoap

public UserServiceSoap()
Method Detail

addGroupUsers

public static void addGroupUsers(long groupId,
                                 long[] userIds,
                                 ServiceContext serviceContext)
                          throws RemoteException
Adds the users to the group.

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:
RemoteException

addOrganizationUsers

public static void addOrganizationUsers(long organizationId,
                                        long[] userIds)
                                 throws RemoteException
Adds the users to the organization.

Parameters:
organizationId - the primary key of the organization
userIds - the primary keys of the users
Throws:
RemoteException

addPasswordPolicyUsers

public static void addPasswordPolicyUsers(long passwordPolicyId,
                                          long[] userIds)
                                   throws RemoteException
Assigns the password policy to the users, removing any other currently assigned password policies.

Parameters:
passwordPolicyId - the primary key of the password policy
userIds - the primary keys of the users
Throws:
RemoteException

addRoleUsers

public static void addRoleUsers(long roleId,
                                long[] userIds)
                         throws RemoteException
Adds the users to the role.

Parameters:
roleId - the primary key of the role
userIds - the primary keys of the users
Throws:
RemoteException

addTeamUsers

public static void addTeamUsers(long teamId,
                                long[] userIds)
                         throws RemoteException
Adds the users to the team.

Parameters:
teamId - the primary key of the team
userIds - the primary keys of the users
Throws:
RemoteException

addUser

public static UserSoap addUser(long companyId,
                               boolean autoPassword,
                               String password1,
                               String password2,
                               boolean autoScreenName,
                               String screenName,
                               String emailAddress,
                               long facebookId,
                               String openId,
                               String locale,
                               String firstName,
                               String middleName,
                               String lastName,
                               long prefixId,
                               long suffixId,
                               boolean male,
                               int birthdayMonth,
                               int birthdayDay,
                               int birthdayYear,
                               String jobTitle,
                               long[] groupIds,
                               long[] organizationIds,
                               long[] roleIds,
                               long[] userGroupIds,
                               boolean sendEmail,
                               ServiceContext serviceContext)
                        throws RemoteException
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.

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
prefixId - the user's name prefix ID
suffixId - 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:
RemoteException

addUser

public static UserSoap addUser(long companyId,
                               boolean autoPassword,
                               String password1,
                               String password2,
                               boolean autoScreenName,
                               String screenName,
                               String emailAddress,
                               long facebookId,
                               String openId,
                               String locale,
                               String firstName,
                               String middleName,
                               String lastName,
                               long prefixId,
                               long suffixId,
                               boolean male,
                               int birthdayMonth,
                               int birthdayDay,
                               int birthdayYear,
                               String jobTitle,
                               long[] groupIds,
                               long[] organizationIds,
                               long[] roleIds,
                               long[] userGroupIds,
                               AddressSoap[] addresses,
                               EmailAddressSoap[] emailAddresses,
                               PhoneSoap[] phones,
                               WebsiteSoap[] websites,
                               AnnouncementsDeliverySoap[] announcementsDelivers,
                               boolean sendEmail,
                               ServiceContext serviceContext)
                        throws RemoteException
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.

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
prefixId - the user's name prefix ID
suffixId - 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:
RemoteException

addUserGroupUsers

public static void addUserGroupUsers(long userGroupId,
                                     long[] userIds)
                              throws RemoteException
Adds the users to the user group.

Parameters:
userGroupId - the primary key of the user group
userIds - the primary keys of the users
Throws:
RemoteException

addUserWithWorkflow

public static UserSoap addUserWithWorkflow(long companyId,
                                           boolean autoPassword,
                                           String password1,
                                           String password2,
                                           boolean autoScreenName,
                                           String screenName,
                                           String emailAddress,
                                           long facebookId,
                                           String openId,
                                           String locale,
                                           String firstName,
                                           String middleName,
                                           String lastName,
                                           long prefixId,
                                           long suffixId,
                                           boolean male,
                                           int birthdayMonth,
                                           int birthdayDay,
                                           int birthdayYear,
                                           String jobTitle,
                                           long[] groupIds,
                                           long[] organizationIds,
                                           long[] roleIds,
                                           long[] userGroupIds,
                                           boolean sendEmail,
                                           ServiceContext serviceContext)
                                    throws RemoteException
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.

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
prefixId - the user's name prefix ID
suffixId - 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:
RemoteException

addUserWithWorkflow

public static UserSoap addUserWithWorkflow(long companyId,
                                           boolean autoPassword,
                                           String password1,
                                           String password2,
                                           boolean autoScreenName,
                                           String screenName,
                                           String emailAddress,
                                           long facebookId,
                                           String openId,
                                           String locale,
                                           String firstName,
                                           String middleName,
                                           String lastName,
                                           long prefixId,
                                           long suffixId,
                                           boolean male,
                                           int birthdayMonth,
                                           int birthdayDay,
                                           int birthdayYear,
                                           String jobTitle,
                                           long[] groupIds,
                                           long[] organizationIds,
                                           long[] roleIds,
                                           long[] userGroupIds,
                                           AddressSoap[] addresses,
                                           EmailAddressSoap[] emailAddresses,
                                           PhoneSoap[] phones,
                                           WebsiteSoap[] websites,
                                           AnnouncementsDeliverySoap[] announcementsDelivers,
                                           boolean sendEmail,
                                           ServiceContext serviceContext)
                                    throws RemoteException
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.

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
prefixId - the user's name prefix ID
suffixId - 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:
RemoteException

deletePortrait

public static void deletePortrait(long userId)
                           throws RemoteException
Deletes the user's portrait image.

Parameters:
userId - the primary key of the user
Throws:
RemoteException

deleteRoleUser

public static void deleteRoleUser(long roleId,
                                  long userId)
                           throws RemoteException
Removes the user from the role.

Parameters:
roleId - the primary key of the role
userId - the primary key of the user
Throws:
RemoteException

deleteUser

public static void deleteUser(long userId)
                       throws RemoteException
Deletes the user.

Parameters:
userId - the primary key of the user
Throws:
RemoteException

getCompanyUsers

public static UserSoap[] getCompanyUsers(long companyId,
                                         int start,
                                         int end)
                                  throws RemoteException
Throws:
RemoteException

getCompanyUsersCount

public static int getCompanyUsersCount(long companyId)
                                throws RemoteException
Throws:
RemoteException

getCurrentUser

public static UserSoap getCurrentUser()
                               throws RemoteException
Throws:
RemoteException

getGroupUserIds

public static long[] getGroupUserIds(long groupId)
                              throws RemoteException
Returns the primary keys of all the users belonging to the group.

Parameters:
groupId - the primary key of the group
Returns:
the primary keys of the users belonging to the group
Throws:
RemoteException

getGroupUsers

public static UserSoap[] getGroupUsers(long groupId)
                                throws RemoteException
Returns all the users belonging to the group.

Parameters:
groupId - the primary key of the group
Returns:
the users belonging to the group
Throws:
RemoteException

getOrganizationUserIds

public static long[] getOrganizationUserIds(long organizationId)
                                     throws RemoteException
Returns the primary keys of all the users belonging to the organization.

Parameters:
organizationId - the primary key of the organization
Returns:
the primary keys of the users belonging to the organization
Throws:
RemoteException

getOrganizationUsers

public static UserSoap[] getOrganizationUsers(long organizationId)
                                       throws RemoteException
Returns all the users belonging to the organization.

Parameters:
organizationId - the primary key of the organization
Returns:
users belonging to the organization
Throws:
RemoteException

getRoleUserIds

public static long[] getRoleUserIds(long roleId)
                             throws RemoteException
Returns the primary keys of all the users belonging to the role.

Parameters:
roleId - the primary key of the role
Returns:
the primary keys of the users belonging to the role
Throws:
RemoteException

getUserByEmailAddress

public static UserSoap getUserByEmailAddress(long companyId,
                                             String emailAddress)
                                      throws RemoteException
Returns the user with the email address.

Parameters:
companyId - the primary key of the user's company
emailAddress - the user's email address
Returns:
the user with the email address
Throws:
RemoteException

getUserById

public static UserSoap getUserById(long userId)
                            throws RemoteException
Returns the user with the primary key.

Parameters:
userId - the primary key of the user
Returns:
the user with the primary key
Throws:
RemoteException

getUserByScreenName

public static UserSoap getUserByScreenName(long companyId,
                                           String screenName)
                                    throws RemoteException
Returns the user with the screen name.

Parameters:
companyId - the primary key of the user's company
screenName - the user's screen name
Returns:
the user with the screen name
Throws:
RemoteException

getUserGroupUsers

public static UserSoap[] getUserGroupUsers(long userGroupId)
                                    throws RemoteException
Throws:
RemoteException

getUserIdByEmailAddress

public static long getUserIdByEmailAddress(long companyId,
                                           String emailAddress)
                                    throws RemoteException
Returns the primary key of the user with the email address.

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:
RemoteException

getUserIdByScreenName

public static long getUserIdByScreenName(long companyId,
                                         String screenName)
                                  throws RemoteException
Returns the primary key of the user with the screen name.

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:
RemoteException

hasGroupUser

public static boolean hasGroupUser(long groupId,
                                   long userId)
                            throws RemoteException
Returns true if the user is a member of the group.

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:
RemoteException

hasRoleUser

public static boolean hasRoleUser(long roleId,
                                  long userId)
                           throws RemoteException
Returns true if the user is a member of the role.

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:
RemoteException

hasRoleUser

public static boolean hasRoleUser(long companyId,
                                  String name,
                                  long userId,
                                  boolean inherited)
                           throws RemoteException
Returns true if the user has the role with the name, optionally through inheritance.

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:
RemoteException

sendPasswordByEmailAddress

public static boolean sendPasswordByEmailAddress(long companyId,
                                                 String emailAddress)
                                          throws RemoteException
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.

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:
RemoteException

sendPasswordByScreenName

public static boolean sendPasswordByScreenName(long companyId,
                                               String screenName)
                                        throws RemoteException
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.

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:
RemoteException

sendPasswordByUserId

public static boolean sendPasswordByUserId(long userId)
                                    throws RemoteException
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.

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:
RemoteException

setRoleUsers

public static void setRoleUsers(long roleId,
                                long[] userIds)
                         throws RemoteException
Sets the users in the role, removing and adding users to the role as necessary.

Parameters:
roleId - the primary key of the role
userIds - the primary keys of the users
Throws:
RemoteException

setUserGroupUsers

public static void setUserGroupUsers(long userGroupId,
                                     long[] userIds)
                              throws RemoteException
Sets the users in the user group, removing and adding users to the user group as necessary.

Parameters:
userGroupId - the primary key of the user group
userIds - the primary keys of the users
Throws:
RemoteException

unsetGroupTeamsUsers

public static void unsetGroupTeamsUsers(long groupId,
                                        long[] userIds)
                                 throws RemoteException
Removes the users from the teams of a group.

Parameters:
groupId - the primary key of the group
userIds - the primary keys of the users
Throws:
RemoteException

unsetGroupUsers

public static void unsetGroupUsers(long groupId,
                                   long[] userIds,
                                   ServiceContext serviceContext)
                            throws RemoteException
Removes the users from the group.

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:
RemoteException

unsetOrganizationUsers

public static void unsetOrganizationUsers(long organizationId,
                                          long[] userIds)
                                   throws RemoteException
Removes the users from the organization.

Parameters:
organizationId - the primary key of the organization
userIds - the primary keys of the users
Throws:
RemoteException

unsetPasswordPolicyUsers

public static void unsetPasswordPolicyUsers(long passwordPolicyId,
                                            long[] userIds)
                                     throws RemoteException
Removes the users from the password policy.

Parameters:
passwordPolicyId - the primary key of the password policy
userIds - the primary keys of the users
Throws:
RemoteException

unsetRoleUsers

public static void unsetRoleUsers(long roleId,
                                  long[] userIds)
                           throws RemoteException
Removes the users from the role.

Parameters:
roleId - the primary key of the role
userIds - the primary keys of the users
Throws:
RemoteException

unsetTeamUsers

public static void unsetTeamUsers(long teamId,
                                  long[] userIds)
                           throws RemoteException
Removes the users from the team.

Parameters:
teamId - the primary key of the team
userIds - the primary keys of the users
Throws:
RemoteException

unsetUserGroupUsers

public static void unsetUserGroupUsers(long userGroupId,
                                       long[] userIds)
                                throws RemoteException
Removes the users from the user group.

Parameters:
userGroupId - the primary key of the user group
userIds - the primary keys of the users
Throws:
RemoteException

updateAgreedToTermsOfUse

public static UserSoap updateAgreedToTermsOfUse(long userId,
                                                boolean agreedToTermsOfUse)
                                         throws RemoteException
Updates the user's response to the terms of use agreement.

Parameters:
userId - the primary key of the user
agreedToTermsOfUse - whether the user has agree to the terms of use
Returns:
the user
Throws:
RemoteException

updateEmailAddress

public static UserSoap updateEmailAddress(long userId,
                                          String password,
                                          String emailAddress1,
                                          String emailAddress2,
                                          ServiceContext serviceContext)
                                   throws RemoteException
Updates the user's email address.

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:
RemoteException

updateIncompleteUser

public static UserSoap updateIncompleteUser(long companyId,
                                            boolean autoPassword,
                                            String password1,
                                            String password2,
                                            boolean autoScreenName,
                                            String screenName,
                                            String emailAddress,
                                            long facebookId,
                                            String openId,
                                            String locale,
                                            String firstName,
                                            String middleName,
                                            String lastName,
                                            long prefixId,
                                            long suffixId,
                                            boolean male,
                                            int birthdayMonth,
                                            int birthdayDay,
                                            int birthdayYear,
                                            String jobTitle,
                                            boolean updateUserInformation,
                                            boolean sendEmail,
                                            ServiceContext serviceContext)
                                     throws RemoteException
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.

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
prefixId - the user's name prefix ID
suffixId - 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:
RemoteException

updateLockoutById

public static UserSoap updateLockoutById(long userId,
                                         boolean lockout)
                                  throws RemoteException
Updates whether the user is locked out from logging in.

Parameters:
userId - the primary key of the user
lockout - whether the user is locked out
Returns:
the user
Throws:
RemoteException

updateOpenId

public static UserSoap updateOpenId(long userId,
                                    String openId)
                             throws RemoteException
Updates the user's OpenID.

Parameters:
userId - the primary key of the user
openId - the new OpenID
Returns:
the user
Throws:
RemoteException

updateOrganizations

public static void updateOrganizations(long userId,
                                       long[] organizationIds,
                                       ServiceContext serviceContext)
                                throws RemoteException
Sets the organizations that the user is in, removing and adding organizations as necessary.

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:
RemoteException

updatePassword

public static UserSoap updatePassword(long userId,
                                      String password1,
                                      String password2,
                                      boolean passwordReset)
                               throws RemoteException
Updates the user's password without tracking or validation of the change.

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:
RemoteException

updatePortrait

public static UserSoap updatePortrait(long userId,
                                      byte[] bytes)
                               throws RemoteException
Updates the user's portrait image.

Parameters:
userId - the primary key of the user
bytes - the new portrait image data
Returns:
the user
Throws:
RemoteException

updateReminderQuery

public static UserSoap updateReminderQuery(long userId,
                                           String question,
                                           String answer)
                                    throws RemoteException
Updates the user's password reset question and answer.

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:
RemoteException

updateScreenName

public static UserSoap updateScreenName(long userId,
                                        String screenName)
                                 throws RemoteException
Updates the user's screen name.

Parameters:
userId - the primary key of the user
screenName - the user's new screen name
Returns:
the user
Throws:
RemoteException

updateStatus

@Deprecated
public static UserSoap updateStatus(long userId,
                                               int status)
                             throws RemoteException
Deprecated. As of 7.0.0, replaced by updateStatus(long, int, ServiceContext)

Updates the user's workflow status.

Parameters:
userId - the primary key of the user
status - the user's new workflow status
Returns:
the user
Throws:
RemoteException

updateStatus

public static UserSoap updateStatus(long userId,
                                    int status,
                                    ServiceContext serviceContext)
                             throws RemoteException
Updates the user's workflow status.

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:
RemoteException

updateUser

public static UserSoap updateUser(long userId,
                                  String oldPassword,
                                  String newPassword1,
                                  String newPassword2,
                                  boolean passwordReset,
                                  String reminderQueryQuestion,
                                  String reminderQueryAnswer,
                                  String screenName,
                                  String emailAddress,
                                  long facebookId,
                                  String openId,
                                  boolean portrait,
                                  byte[] portraitBytes,
                                  String languageId,
                                  String timeZoneId,
                                  String greeting,
                                  String comments,
                                  String firstName,
                                  String middleName,
                                  String lastName,
                                  long prefixId,
                                  long suffixId,
                                  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,
                                  UserGroupRoleSoap[] userGroupRoles,
                                  long[] userGroupIds,
                                  AddressSoap[] addresses,
                                  EmailAddressSoap[] emailAddresses,
                                  PhoneSoap[] phones,
                                  WebsiteSoap[] websites,
                                  AnnouncementsDeliverySoap[] announcementsDelivers,
                                  ServiceContext serviceContext)
                           throws RemoteException
Updates the user with additional parameters.

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
facebookId - the user's new Facebook ID
openId - the user's new OpenID
portrait - whether to update the user's 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
prefixId - the user's new name prefix ID
suffixId - 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:
RemoteException

updateUser

@Deprecated
public static UserSoap 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 prefixId,
                                             long suffixId,
                                             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,
                                             UserGroupRoleSoap[] userGroupRoles,
                                             long[] userGroupIds,
                                             AddressSoap[] addresses,
                                             EmailAddressSoap[] emailAddresses,
                                             PhoneSoap[] phones,
                                             WebsiteSoap[] websites,
                                             AnnouncementsDeliverySoap[] announcementsDelivers,
                                             ServiceContext serviceContext)
                           throws RemoteException
Deprecated. As of 7.0.0, replaced by #updateUser(long, String, String, String, boolean, String, String, String, String, long, String, boolean, byte[], String, String, String, String, String, String, String, int, int, boolean, int, int, int, String, String, String, String, String, String, String, String, String, String, String, long[], long[], long[], List, long[], List, List, List, List, List, ServiceContext)

Updates the user with additional parameters.

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
facebookId - the user's new Facebook ID
openId - the user's new OpenID
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
prefixId - the user's new name prefix ID
suffixId - 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:
RemoteException

updateUser

public static UserSoap 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 prefixId,
                                  long suffixId,
                                  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,
                                  UserGroupRoleSoap[] userGroupRoles,
                                  long[] userGroupIds,
                                  ServiceContext serviceContext)
                           throws RemoteException
Updates the user.

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
facebookId - the user's new Facebook ID
openId - the user's new OpenID
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
prefixId - the user's new name prefix ID
suffixId - 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:
RemoteException

Liferay 7.0-ce-b4