@ProviderType
public class UserServiceSoap
extends Object
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.
UserServiceHttp
,
UserSoap
,
UserServiceUtil
Constructor and Description |
---|
UserServiceSoap() |
Modifier and Type | Method and Description |
---|---|
static void |
addGroupUsers(long groupId,
long[] userIds,
com.liferay.portal.kernel.service.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 com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.model.AddressSoap[] addresses,
com.liferay.portal.kernel.model.EmailAddressSoap[] emailAddresses,
com.liferay.portal.kernel.model.PhoneSoap[] phones,
com.liferay.portal.kernel.model.WebsiteSoap[] websites,
com.liferay.announcements.kernel.model.AnnouncementsDeliverySoap[] announcementsDelivers,
boolean sendEmail,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a user with additional parameters.
|
static com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a user.
|
static void |
addUserGroupUsers(long userGroupId,
long[] userIds)
Adds the users to the user group.
|
static com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.model.AddressSoap[] addresses,
com.liferay.portal.kernel.model.EmailAddressSoap[] emailAddresses,
com.liferay.portal.kernel.model.PhoneSoap[] phones,
com.liferay.portal.kernel.model.WebsiteSoap[] websites,
com.liferay.announcements.kernel.model.AnnouncementsDeliverySoap[] announcementsDelivers,
boolean sendEmail,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a user with workflow and additional parameters.
|
static com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.service.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 com.liferay.portal.kernel.model.UserSoap[] |
getCompanyUsers(long companyId,
int start,
int end) |
static int |
getCompanyUsersCount(long companyId) |
static com.liferay.portal.kernel.model.UserSoap |
getCurrentUser() |
static long[] |
getGroupUserIds(long groupId)
Returns the primary keys of all the users belonging to the group.
|
static com.liferay.portal.kernel.model.UserSoap[] |
getGroupUsers(long groupId)
Returns all the users belonging to the group.
|
static com.liferay.portal.kernel.model.UserSoap[] |
getGroupUsers(long groupId,
int status,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns the users belonging to a group.
|
static com.liferay.portal.kernel.model.UserSoap[] |
getGroupUsers(long groupId,
int status,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns the users belonging to a group.
|
static int |
getGroupUsersCount(long groupId,
int status)
Returns the number of users with the status belonging to the group.
|
static com.liferay.portal.kernel.model.UserSoap[] |
getGtCompanyUsers(long gtUserId,
long companyId,
int size) |
static com.liferay.portal.kernel.model.UserSoap[] |
getGtOrganizationUsers(long gtUserId,
long organizationId,
int size) |
static com.liferay.portal.kernel.model.UserSoap[] |
getGtUserGroupUsers(long gtUserId,
long userGroupId,
int size) |
static int |
getOrganizationsAndUserGroupsUsersCount(long[] organizationIds,
long[] userGroupIds) |
static long[] |
getOrganizationUserIds(long organizationId)
Returns the primary keys of all the users belonging to the organization.
|
static com.liferay.portal.kernel.model.UserSoap[] |
getOrganizationUsers(long organizationId)
Returns all the users belonging to the organization.
|
static com.liferay.portal.kernel.model.UserSoap[] |
getOrganizationUsers(long organizationId,
int status,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns the users belonging to the organization with the status.
|
static com.liferay.portal.kernel.model.UserSoap[] |
getOrganizationUsers(long organizationId,
int status,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns the users belonging to the organization with the status.
|
static int |
getOrganizationUsersCount(long organizationId,
int status)
Returns the number of users with the status belonging to the
organization.
|
static long[] |
getRoleUserIds(long roleId)
Returns the primary keys of all the users belonging to the role.
|
static com.liferay.portal.kernel.model.UserSoap |
getUserByEmailAddress(long companyId,
String emailAddress)
Returns the user with the email address.
|
static com.liferay.portal.kernel.model.UserSoap |
getUserById(long userId)
Returns the user with the primary key.
|
static com.liferay.portal.kernel.model.UserSoap |
getUserByScreenName(long companyId,
String screenName)
Returns the user with the screen name.
|
static com.liferay.portal.kernel.model.UserSoap[] |
getUserGroupUsers(long userGroupId) |
static com.liferay.portal.kernel.model.UserSoap[] |
getUserGroupUsers(long userGroupId,
int start,
int end) |
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,
com.liferay.portal.kernel.service.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 com.liferay.portal.kernel.model.UserSoap |
updateAgreedToTermsOfUse(long userId,
boolean agreedToTermsOfUse)
Updates the user's response to the terms of use agreement.
|
static com.liferay.portal.kernel.model.UserSoap |
updateEmailAddress(long userId,
String password,
String emailAddress1,
String emailAddress2,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the user's email address.
|
static com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.service.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 com.liferay.portal.kernel.model.UserSoap |
updateLockoutById(long userId,
boolean lockout)
Updates whether the user is locked out from logging in.
|
static com.liferay.portal.kernel.model.UserSoap |
updateOpenId(long userId,
String openId)
Updates the user's OpenID.
|
static void |
updateOrganizations(long userId,
long[] organizationIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Sets the organizations that the user is in, removing and adding
organizations as necessary.
|
static com.liferay.portal.kernel.model.UserSoap |
updatePassword(long userId,
String password1,
String password2,
boolean passwordReset)
Updates the user's password without tracking or validation of the change.
|
static com.liferay.portal.kernel.model.UserSoap |
updatePortrait(long userId,
byte[] bytes)
Updates the user's portrait image.
|
static com.liferay.portal.kernel.model.UserSoap |
updateReminderQuery(long userId,
String question,
String answer)
Updates the user's password reset question and answer.
|
static com.liferay.portal.kernel.model.UserSoap |
updateScreenName(long userId,
String screenName)
Updates the user's screen name.
|
static com.liferay.portal.kernel.model.UserSoap |
updateStatus(long userId,
int status)
Deprecated.
As of Wilberforce (7.0.x), replaced by
updateStatus(long, int, ServiceContext) |
static com.liferay.portal.kernel.model.UserSoap |
updateStatus(long userId,
int status,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the user's workflow status.
|
static com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.model.UserGroupRoleSoap[] userGroupRoles,
long[] userGroupIds,
com.liferay.portal.kernel.model.AddressSoap[] addresses,
com.liferay.portal.kernel.model.EmailAddressSoap[] emailAddresses,
com.liferay.portal.kernel.model.PhoneSoap[] phones,
com.liferay.portal.kernel.model.WebsiteSoap[] websites,
com.liferay.announcements.kernel.model.AnnouncementsDeliverySoap[] announcementsDelivers,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the user with additional parameters.
|
static com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.model.UserGroupRoleSoap[] userGroupRoles,
long[] userGroupIds,
com.liferay.portal.kernel.model.AddressSoap[] addresses,
com.liferay.portal.kernel.model.EmailAddressSoap[] emailAddresses,
com.liferay.portal.kernel.model.PhoneSoap[] phones,
com.liferay.portal.kernel.model.WebsiteSoap[] websites,
com.liferay.announcements.kernel.model.AnnouncementsDeliverySoap[] announcementsDelivers,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Deprecated.
As of Wilberforce (7.0.x), replaced by
#updateUser(long, String, String, String, boolean, String,
String, String, String, long, String, boolean, byte[],
String, String, String, String, String, String, String, long,
long, boolean, int, int, int, String, String, String, String,
String, String, long[], long[], long[], List, long[], List,
List, List, List, List, ServiceContext) |
static com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.model.UserGroupRoleSoap[] userGroupRoles,
long[] userGroupIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the user.
|
public static void addGroupUsers(long groupId, long[] userIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
groupId
- the primary key of the groupuserIds
- the primary keys of the usersserviceContext
- the service context to be applied (optionally
null
)RemoteException
public static void addOrganizationUsers(long organizationId, long[] userIds) throws RemoteException
organizationId
- the primary key of the organizationuserIds
- the primary keys of the usersRemoteException
public static void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds) throws RemoteException
passwordPolicyId
- the primary key of the password policyuserIds
- the primary keys of the usersRemoteException
public static void addRoleUsers(long roleId, long[] userIds) throws RemoteException
roleId
- the primary key of the roleuserIds
- the primary keys of the usersRemoteException
public static void addTeamUsers(long teamId, long[] userIds) throws RemoteException
teamId
- the primary key of the teamuserIds
- the primary keys of the usersRemoteException
public static com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
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.
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupssendEmail
- whether to send the user an email notification about
their new accountserviceContext
- 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.RemoteException
public static com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.model.AddressSoap[] addresses, com.liferay.portal.kernel.model.EmailAddressSoap[] emailAddresses, com.liferay.portal.kernel.model.PhoneSoap[] phones, com.liferay.portal.kernel.model.WebsiteSoap[] websites, com.liferay.announcements.kernel.model.AnnouncementsDeliverySoap[] announcementsDelivers, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
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.
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupsaddresses
- the user's addressesemailAddresses
- the user's email addressesphones
- the user's phone numberswebsites
- the user's websitesannouncementsDelivers
- the announcements deliveriessendEmail
- whether to send the user an email notification about
their new accountserviceContext
- 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.RemoteException
public static void addUserGroupUsers(long userGroupId, long[] userIds) throws RemoteException
userGroupId
- the primary key of the user groupuserIds
- the primary keys of the usersRemoteException
public static com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
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.
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupssendEmail
- whether to send the user an email notification about
their new accountserviceContext
- 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.RemoteException
public static com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.model.AddressSoap[] addresses, com.liferay.portal.kernel.model.EmailAddressSoap[] emailAddresses, com.liferay.portal.kernel.model.PhoneSoap[] phones, com.liferay.portal.kernel.model.WebsiteSoap[] websites, com.liferay.announcements.kernel.model.AnnouncementsDeliverySoap[] announcementsDelivers, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
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.
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupsaddresses
- the user's addressesemailAddresses
- the user's email addressesphones
- the user's phone numberswebsites
- the user's websitesannouncementsDelivers
- the announcements deliveriessendEmail
- whether to send the user an email notification about
their new accountserviceContext
- 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.RemoteException
public static void deletePortrait(long userId) throws RemoteException
userId
- the primary key of the userRemoteException
public static void deleteRoleUser(long roleId, long userId) throws RemoteException
roleId
- the primary key of the roleuserId
- the primary key of the userRemoteException
public static void deleteUser(long userId) throws RemoteException
userId
- the primary key of the userRemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getCompanyUsers(long companyId, int start, int end) throws RemoteException
RemoteException
public static int getCompanyUsersCount(long companyId) throws RemoteException
RemoteException
public static com.liferay.portal.kernel.model.UserSoap getCurrentUser() throws RemoteException
RemoteException
public static long[] getGroupUserIds(long groupId) throws RemoteException
groupId
- the primary key of the groupRemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getGroupUsers(long groupId) throws RemoteException
groupId
- the primary key of the groupRemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getGroupUsers(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws RemoteException
groupId
- the primary key of the groupstatus
- the workflow statusstart
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)RemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getGroupUsers(long groupId, int status, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws RemoteException
groupId
- the primary key of the groupstatus
- the workflow statusobc
- the comparator to order the users by (optionally
null
)RemoteException
public static int getGroupUsersCount(long groupId, int status) throws RemoteException
groupId
- the primary key of the groupstatus
- the workflow statusRemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getGtCompanyUsers(long gtUserId, long companyId, int size) throws RemoteException
RemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getGtOrganizationUsers(long gtUserId, long organizationId, int size) throws RemoteException
RemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getGtUserGroupUsers(long gtUserId, long userGroupId, int size) throws RemoteException
RemoteException
public static int getOrganizationsAndUserGroupsUsersCount(long[] organizationIds, long[] userGroupIds) throws RemoteException
RemoteException
public static long[] getOrganizationUserIds(long organizationId) throws RemoteException
organizationId
- the primary key of the organizationRemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getOrganizationUsers(long organizationId) throws RemoteException
organizationId
- the primary key of the organizationRemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getOrganizationUsers(long organizationId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws RemoteException
organizationId
- the primary key of the organizationstatus
- the workflow statusstart
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)RemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getOrganizationUsers(long organizationId, int status, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws RemoteException
organizationId
- the primary key of the organizationstatus
- the workflow statusobc
- the comparator to order the users by (optionally
null
)RemoteException
public static int getOrganizationUsersCount(long organizationId, int status) throws RemoteException
organizationId
- the primary key of the organizationstatus
- the workflow statusRemoteException
public static long[] getRoleUserIds(long roleId) throws RemoteException
roleId
- the primary key of the roleRemoteException
public static com.liferay.portal.kernel.model.UserSoap getUserByEmailAddress(long companyId, String emailAddress) throws RemoteException
companyId
- the primary key of the user's companyemailAddress
- the user's email addressRemoteException
public static com.liferay.portal.kernel.model.UserSoap getUserById(long userId) throws RemoteException
userId
- the primary key of the userRemoteException
public static com.liferay.portal.kernel.model.UserSoap getUserByScreenName(long companyId, String screenName) throws RemoteException
companyId
- the primary key of the user's companyscreenName
- the user's screen nameRemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getUserGroupUsers(long userGroupId) throws RemoteException
RemoteException
public static com.liferay.portal.kernel.model.UserSoap[] getUserGroupUsers(long userGroupId, int start, int end) throws RemoteException
RemoteException
public static long getUserIdByEmailAddress(long companyId, String emailAddress) throws RemoteException
companyId
- the primary key of the user's companyemailAddress
- the user's email addressRemoteException
public static long getUserIdByScreenName(long companyId, String screenName) throws RemoteException
companyId
- the primary key of the user's companyscreenName
- the user's screen nameRemoteException
public static boolean hasGroupUser(long groupId, long userId) throws RemoteException
true
if the user is a member of the group.groupId
- the primary key of the groupuserId
- the primary key of the usertrue
if the user is a member of the group;
false
otherwiseRemoteException
public static boolean hasRoleUser(long roleId, long userId) throws RemoteException
true
if the user is a member of the role.roleId
- the primary key of the roleuserId
- the primary key of the usertrue
if the user is a member of the role;
false
otherwiseRemoteException
public static boolean hasRoleUser(long companyId, String name, long userId, boolean inherited) throws RemoteException
true
if the user has the role with the name,
optionally through inheritance.companyId
- the primary key of the role's companyname
- the name of the role (must be a regular role, not an
organization, site or provider role)userId
- the primary key of the userinherited
- whether to include roles inherited from organizations,
sites, etc.true
if the user has the role; false
otherwiseRemoteException
public static boolean sendPasswordByEmailAddress(long companyId, String emailAddress) throws RemoteException
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.
companyId
- the primary key of the user's companyemailAddress
- the user's email addresstrue
if the notification email includes a new
password; false
if the notification email only
contains a reset linkRemoteException
public static boolean sendPasswordByScreenName(long companyId, String screenName) throws RemoteException
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.
companyId
- the primary key of the user's companyscreenName
- the user's screen nametrue
if the notification email includes a new
password; false
if the notification email only
contains a reset linkRemoteException
public static boolean sendPasswordByUserId(long userId) throws RemoteException
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.
userId
- the user's primary keytrue
if the notification email includes a new
password; false
if the notification email only
contains a reset linkRemoteException
public static void setRoleUsers(long roleId, long[] userIds) throws RemoteException
roleId
- the primary key of the roleuserIds
- the primary keys of the usersRemoteException
public static void setUserGroupUsers(long userGroupId, long[] userIds) throws RemoteException
userGroupId
- the primary key of the user groupuserIds
- the primary keys of the usersRemoteException
public static void unsetGroupTeamsUsers(long groupId, long[] userIds) throws RemoteException
groupId
- the primary key of the groupuserIds
- the primary keys of the usersRemoteException
public static void unsetGroupUsers(long groupId, long[] userIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
groupId
- the primary key of the groupuserIds
- the primary keys of the usersserviceContext
- the service context to be applied (optionally
null
)RemoteException
public static void unsetOrganizationUsers(long organizationId, long[] userIds) throws RemoteException
organizationId
- the primary key of the organizationuserIds
- the primary keys of the usersRemoteException
public static void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds) throws RemoteException
passwordPolicyId
- the primary key of the password policyuserIds
- the primary keys of the usersRemoteException
public static void unsetRoleUsers(long roleId, long[] userIds) throws RemoteException
roleId
- the primary key of the roleuserIds
- the primary keys of the usersRemoteException
public static void unsetTeamUsers(long teamId, long[] userIds) throws RemoteException
teamId
- the primary key of the teamuserIds
- the primary keys of the usersRemoteException
public static void unsetUserGroupUsers(long userGroupId, long[] userIds) throws RemoteException
userGroupId
- the primary key of the user groupuserIds
- the primary keys of the usersRemoteException
public static com.liferay.portal.kernel.model.UserSoap updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse) throws RemoteException
userId
- the primary key of the useragreedToTermsOfUse
- whether the user has agree to the terms of useRemoteException
public static com.liferay.portal.kernel.model.UserSoap updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
userId
- the primary key of the userpassword
- the user's passwordemailAddress1
- the user's new email addressemailAddress2
- the user's new email address confirmationserviceContext
- 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.RemoteException
public static com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titleupdateUserInformation
- whether to update the user's informationsendEmail
- whether to send the user an email notification about
their new accountserviceContext
- the service context to be applied (optionally
null
). Can set the expando bridge attributes for the
user.RemoteException
public static com.liferay.portal.kernel.model.UserSoap updateLockoutById(long userId, boolean lockout) throws RemoteException
userId
- the primary key of the userlockout
- whether the user is locked outRemoteException
public static com.liferay.portal.kernel.model.UserSoap updateOpenId(long userId, String openId) throws RemoteException
userId
- the primary key of the useropenId
- the new OpenIDRemoteException
public static void updateOrganizations(long userId, long[] organizationIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
userId
- the primary key of the userorganizationIds
- the primary keys of the organizationsserviceContext
- the service context to be applied. Must set whether
user indexing is enabled.RemoteException
public static com.liferay.portal.kernel.model.UserSoap updatePassword(long userId, String password1, String password2, boolean passwordReset) throws RemoteException
userId
- the primary key of the userpassword1
- the user's new passwordpassword2
- the user's new password confirmationpasswordReset
- whether the user should be asked to reset their
password the next time they log inRemoteException
public static com.liferay.portal.kernel.model.UserSoap updatePortrait(long userId, byte[] bytes) throws RemoteException
userId
- the primary key of the userbytes
- the new portrait image dataRemoteException
public static com.liferay.portal.kernel.model.UserSoap updateReminderQuery(long userId, String question, String answer) throws RemoteException
userId
- the primary key of the userquestion
- the user's new password reset questionanswer
- the user's new password reset answerRemoteException
public static com.liferay.portal.kernel.model.UserSoap updateScreenName(long userId, String screenName) throws RemoteException
userId
- the primary key of the userscreenName
- the user's new screen nameRemoteException
@Deprecated public static com.liferay.portal.kernel.model.UserSoap updateStatus(long userId, int status) throws RemoteException
updateStatus(long, int, ServiceContext)
userId
- the primary key of the userstatus
- the user's new workflow statusRemoteException
public static com.liferay.portal.kernel.model.UserSoap updateStatus(long userId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
userId
- the primary key of the userstatus
- the user's new workflow statusserviceContext
- the service context to be applied. You can specify
an unencrypted custom password (used by an LDAP listener) for the
user via attribute passwordUnencrypted
.RemoteException
public static com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.model.UserGroupRoleSoap[] userGroupRoles, long[] userGroupIds, com.liferay.portal.kernel.model.AddressSoap[] addresses, com.liferay.portal.kernel.model.EmailAddressSoap[] emailAddresses, com.liferay.portal.kernel.model.PhoneSoap[] phones, com.liferay.portal.kernel.model.WebsiteSoap[] websites, com.liferay.announcements.kernel.model.AnnouncementsDeliverySoap[] announcementsDelivers, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
userId
- the primary key of the useroldPassword
- the user's old passwordnewPassword1
- 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 loginreminderQueryQuestion
- the user's new password reset questionreminderQueryAnswer
- the user's new password reset answerscreenName
- the user's new screen nameemailAddress
- the user's new email addressfacebookId
- the user's new Facebook IDopenId
- the user's new OpenIDportrait
- whether to update the user's portrait imageportraitBytes
- the new portrait image datalanguageId
- the user's new language IDtimeZoneId
- the user's new time zone IDgreeting
- the user's new greetingcomments
- the user's new commentsfirstName
- the user's new first namemiddleName
- the user's new middle namelastName
- the user's new last nameprefixId
- the user's new name prefix IDsuffixId
- the user's new name suffix IDmale
- whether user is malebirthdayMonth
- the user's new birthday month (0-based, meaning 0
for January)birthdayDay
- the user's new birthday daybirthdayYear
- the user's birthday yearsmsSn
- the user's new SMS screen namefacebookSn
- the user's new Facebook screen namejabberSn
- the user's new Jabber screen nameskypeSn
- the user's new Skype screen nametwitterSn
- the user's new Twitter screen namejobTitle
- the user's new job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the user's rolesuserGroupRoles
- the user user's group rolesuserGroupIds
- the primary keys of the user's user groupsaddresses
- the user's addressesemailAddresses
- the user's email addressesphones
- the user's phone numberswebsites
- the user's websitesannouncementsDelivers
- the announcements deliveriesserviceContext
- 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.RemoteException
@Deprecated public static com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.model.UserGroupRoleSoap[] userGroupRoles, long[] userGroupIds, com.liferay.portal.kernel.model.AddressSoap[] addresses, com.liferay.portal.kernel.model.EmailAddressSoap[] emailAddresses, com.liferay.portal.kernel.model.PhoneSoap[] phones, com.liferay.portal.kernel.model.WebsiteSoap[] websites, com.liferay.announcements.kernel.model.AnnouncementsDeliverySoap[] announcementsDelivers, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
#updateUser(long, String, String, String, boolean, String,
String, String, String, long, String, boolean, byte[],
String, String, String, String, String, String, String, long,
long, boolean, int, int, int, String, String, String, String,
String, String, long[], long[], long[], List, long[], List,
List, List, List, List, ServiceContext)
userId
- the primary key of the useroldPassword
- the user's old passwordnewPassword1
- 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 loginreminderQueryQuestion
- the user's new password reset questionreminderQueryAnswer
- the user's new password reset answerscreenName
- the user's new screen nameemailAddress
- the user's new email addressfacebookId
- the user's new Facebook IDopenId
- the user's new OpenIDlanguageId
- the user's new language IDtimeZoneId
- the user's new time zone IDgreeting
- the user's new greetingcomments
- the user's new commentsfirstName
- the user's new first namemiddleName
- the user's new middle namelastName
- the user's new last nameprefixId
- the user's new name prefix IDsuffixId
- the user's new name suffix IDmale
- whether user is malebirthdayMonth
- the user's new birthday month (0-based, meaning
0 for January)birthdayDay
- the user's new birthday daybirthdayYear
- the user's birthday yearsmsSn
- the user's new SMS screen namefacebookSn
- the user's new Facebook screen namejabberSn
- the user's new Jabber screen nameskypeSn
- the user's new Skype screen nametwitterSn
- the user's new Twitter screen namejobTitle
- the user's new job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the user's rolesuserGroupRoles
- the user user's group rolesuserGroupIds
- the primary keys of the user's user groupsaddresses
- the user's addressesemailAddresses
- the user's email addressesphones
- the user's phone numberswebsites
- the user's websitesannouncementsDelivers
- the announcements deliveriesserviceContext
- 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.RemoteException
public static com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.model.UserGroupRoleSoap[] userGroupRoles, long[] userGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws RemoteException
userId
- the primary key of the useroldPassword
- the user's old passwordnewPassword1
- 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 loginreminderQueryQuestion
- the user's new password reset questionreminderQueryAnswer
- the user's new password reset answerscreenName
- the user's new screen nameemailAddress
- the user's new email addressfacebookId
- the user's new Facebook IDopenId
- the user's new OpenIDlanguageId
- the user's new language IDtimeZoneId
- the user's new time zone IDgreeting
- the user's new greetingcomments
- the user's new commentsfirstName
- the user's new first namemiddleName
- the user's new middle namelastName
- the user's new last nameprefixId
- the user's new name prefix IDsuffixId
- the user's new name suffix IDmale
- whether user is malebirthdayMonth
- the user's new birthday month (0-based, meaning 0
for January)birthdayDay
- the user's new birthday daybirthdayYear
- the user's birthday yearsmsSn
- the user's new SMS screen namefacebookSn
- the user's new Facebook screen namejabberSn
- the user's new Jabber screen nameskypeSn
- the user's new Skype screen nametwitterSn
- the user's new Twitter screen namejobTitle
- the user's new job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the user's rolesuserGroupRoles
- the user user's group rolesuserGroupIds
- the primary keys of the user's user groupsserviceContext
- 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.RemoteException