@ProviderType
public class UserLocalServiceUtil
extends java.lang.Object
com.liferay.portal.service.impl.UserLocalServiceImpl and is the
primary access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.UserLocalService,
UserLocalServiceBaseImpl,
com.liferay.portal.service.impl.UserLocalServiceImpl| Constructor and Description |
|---|
UserLocalServiceUtil() |
| Modifier and Type | Method and Description |
|---|---|
static User |
addDefaultAdminUser(long companyId,
java.lang.String screenName,
java.lang.String emailAddress,
java.util.Locale locale,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName)
Adds a default admin user for the company.
|
static void |
addDefaultGroups(long userId)
Adds the user to the default groups, unless the user is already in these
groups.
|
static void |
addDefaultRoles(long userId)
Adds the user to the default roles, unless the user already has these
roles.
|
static void |
addDefaultUserGroups(long userId)
Adds the user to the default user groups, unless the user is already in
these user groups.
|
static void |
addGroupUser(long groupId,
long userId) |
static void |
addGroupUser(long groupId,
User user) |
static void |
addGroupUsers(long groupId,
java.util.List<User> Users) |
static void |
addGroupUsers(long groupId,
long[] userIds) |
static void |
addOrganizationUser(long organizationId,
long userId) |
static void |
addOrganizationUser(long organizationId,
User user) |
static void |
addOrganizationUsers(long organizationId,
java.util.List<User> Users) |
static void |
addOrganizationUsers(long organizationId,
long[] userIds) |
static void |
addPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
Assigns the password policy to the users, removing any other currently
assigned password policies.
|
static void |
addRoleUser(long roleId,
long userId) |
static void |
addRoleUser(long roleId,
User user) |
static void |
addRoleUsers(long roleId,
java.util.List<User> Users) |
static void |
addRoleUsers(long roleId,
long[] userIds) |
static void |
addTeamUser(long teamId,
long userId) |
static void |
addTeamUser(long teamId,
User user) |
static void |
addTeamUsers(long teamId,
java.util.List<User> Users) |
static void |
addTeamUsers(long teamId,
long[] userIds) |
static User |
addUser(long creatorUserId,
long companyId,
boolean autoPassword,
java.lang.String password1,
java.lang.String password2,
boolean autoScreenName,
java.lang.String screenName,
java.lang.String emailAddress,
long facebookId,
java.lang.String openId,
java.util.Locale locale,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
long[] userGroupIds,
boolean sendEmail,
ServiceContext serviceContext)
Adds a user.
|
static User |
addUser(User user)
Adds the user to the database.
|
static void |
addUserGroupUser(long userGroupId,
long userId) |
static void |
addUserGroupUser(long userGroupId,
User user) |
static void |
addUserGroupUsers(long userGroupId,
java.util.List<User> Users) |
static void |
addUserGroupUsers(long userGroupId,
long[] userIds) |
static User |
addUserWithWorkflow(long creatorUserId,
long companyId,
boolean autoPassword,
java.lang.String password1,
java.lang.String password2,
boolean autoScreenName,
java.lang.String screenName,
java.lang.String emailAddress,
long facebookId,
java.lang.String openId,
java.util.Locale locale,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
long[] userGroupIds,
boolean sendEmail,
ServiceContext serviceContext)
Adds a user with workflow.
|
static int |
authenticateByEmailAddress(long companyId,
java.lang.String emailAddress,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String[]> headerMap,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Map<java.lang.String,java.lang.Object> resultsMap)
Attempts to authenticate the user by their email address and password,
while using the AuthPipeline.
|
static int |
authenticateByScreenName(long companyId,
java.lang.String screenName,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String[]> headerMap,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Map<java.lang.String,java.lang.Object> resultsMap)
Attempts to authenticate the user by their screen name and password,
while using the AuthPipeline.
|
static int |
authenticateByUserId(long companyId,
long userId,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String[]> headerMap,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Map<java.lang.String,java.lang.Object> resultsMap)
Attempts to authenticate the user by their primary key and password,
while using the AuthPipeline.
|
static long |
authenticateForBasic(long companyId,
java.lang.String authType,
java.lang.String login,
java.lang.String password)
Attempts to authenticate the user using HTTP basic access authentication,
without using the AuthPipeline.
|
static long |
authenticateForDigest(long companyId,
java.lang.String username,
java.lang.String realm,
java.lang.String nonce,
java.lang.String method,
java.lang.String uri,
java.lang.String response)
Attempts to authenticate the user using HTTP digest access
authentication, without using the AuthPipeline.
|
static boolean |
authenticateForJAAS(long userId,
java.lang.String encPassword)
Attempts to authenticate the user using JAAS credentials, without using
the AuthPipeline.
|
static void |
checkLockout(User user)
Checks if the user is currently locked out based on the password policy,
and performs maintenance on the user's lockout and failed login data.
|
static void |
checkLoginFailure(User user)
Adds a failed login attempt to the user and updates the user's last
failed login date.
|
static void |
checkLoginFailureByEmailAddress(long companyId,
java.lang.String emailAddress)
Adds a failed login attempt to the user with the email address and
updates the user's last failed login date.
|
static void |
checkLoginFailureById(long userId)
Adds a failed login attempt to the user and updates the user's last
failed login date.
|
static void |
checkLoginFailureByScreenName(long companyId,
java.lang.String screenName)
Adds a failed login attempt to the user with the screen name and updates
the user's last failed login date.
|
static void |
checkPasswordExpired(User user)
Checks if the user's password is expired based on the password policy,
and performs maintenance on the user's grace login and password reset
data.
|
static void |
clearGroupUsers(long groupId) |
static void |
clearOrganizationUsers(long organizationId) |
static void |
clearRoleUsers(long roleId) |
static void |
clearTeamUsers(long teamId) |
static void |
clearUserGroupUsers(long userGroupId) |
static void |
completeUserRegistration(User user,
ServiceContext serviceContext)
Completes the user's registration by generating a password and sending
the confirmation email.
|
static User |
createUser(long userId)
Creates a new user with the primary key.
|
static KeyValuePair |
decryptUserId(long companyId,
java.lang.String name,
java.lang.String password)
Decrypts the user's primary key and password from their encrypted forms.
|
static void |
deleteGroupUser(long groupId,
long userId) |
static void |
deleteGroupUser(long groupId,
User user) |
static void |
deleteGroupUsers(long groupId,
java.util.List<User> Users) |
static void |
deleteGroupUsers(long groupId,
long[] userIds) |
static void |
deleteOrganizationUser(long organizationId,
long userId) |
static void |
deleteOrganizationUser(long organizationId,
User user) |
static void |
deleteOrganizationUsers(long organizationId,
java.util.List<User> Users) |
static void |
deleteOrganizationUsers(long organizationId,
long[] userIds) |
static void |
deletePortrait(long userId)
Deletes the user's portrait image.
|
static void |
deleteRoleUser(long roleId,
long userId) |
static void |
deleteRoleUser(long roleId,
User user) |
static void |
deleteRoleUsers(long roleId,
java.util.List<User> Users) |
static void |
deleteRoleUsers(long roleId,
long[] userIds) |
static void |
deleteTeamUser(long teamId,
long userId) |
static void |
deleteTeamUser(long teamId,
User user) |
static void |
deleteTeamUsers(long teamId,
java.util.List<User> Users) |
static void |
deleteTeamUsers(long teamId,
long[] userIds) |
static User |
deleteUser(long userId)
Deletes the user with the primary key from the database.
|
static User |
deleteUser(User user)
Deletes the user from the database.
|
static void |
deleteUserGroupUser(long userGroupId,
long userId) |
static void |
deleteUserGroupUser(long userGroupId,
User user) |
static void |
deleteUserGroupUsers(long userGroupId,
java.util.List<User> Users) |
static void |
deleteUserGroupUsers(long userGroupId,
long[] userIds) |
static DynamicQuery |
dynamicQuery() |
static java.util.List |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static java.util.List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
static java.util.List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows that match the dynamic query.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows that match the dynamic query.
|
static java.lang.String |
encryptUserId(java.lang.String name)
Encrypts the primary key of the user.
|
static User |
fetchUser(long userId) |
static User |
fetchUserByEmailAddress(long companyId,
java.lang.String emailAddress)
Returns the user with the email address.
|
static User |
fetchUserByFacebookId(long companyId,
long facebookId)
Returns the user with the Facebook ID.
|
static User |
fetchUserById(long userId)
Returns the user with the primary key.
|
static User |
fetchUserByOpenId(long companyId,
java.lang.String openId)
Returns the user with the OpenID.
|
static User |
fetchUserByScreenName(long companyId,
java.lang.String screenName)
Returns the user with the screen name.
|
static User |
fetchUserByUuidAndCompanyId(java.lang.String uuid,
long companyId)
Returns the user with the matching UUID and company.
|
static java.lang.String |
getBeanIdentifier()
Returns the Spring bean ID for this bean.
|
static java.util.List<User> |
getCompanyUsers(long companyId,
int start,
int end)
Returns a range of all the users belonging to the company.
|
static int |
getCompanyUsersCount(long companyId)
Returns the number of users belonging to the company.
|
static User |
getDefaultUser(long companyId)
Returns the default user for the company.
|
static long |
getDefaultUserId(long companyId)
Returns the primary key of the default user for the company.
|
static long[] |
getGroupUserIds(long groupId)
Returns the primary keys of all the users belonging to the group.
|
static java.util.List<User> |
getGroupUsers(long groupId) |
static java.util.List<User> |
getGroupUsers(long groupId,
int start,
int end) |
static java.util.List<User> |
getGroupUsers(long groupId,
int start,
int end,
OrderByComparator orderByComparator) |
static int |
getGroupUsersCount(long groupId) |
static int |
getGroupUsersCount(long groupId,
int status)
Returns the number of users with the status belonging to the group.
|
static java.util.List<User> |
getInheritedRoleUsers(long roleId,
int start,
int end,
OrderByComparator obc) |
static java.util.List<User> |
getNoAnnouncementsDeliveries(java.lang.String type)
Returns all the users who have not had any announcements of the type
delivered, excluding the default user.
|
static java.util.List<User> |
getNoContacts()
Returns all the users who do not have any contacts.
|
static java.util.List<User> |
getNoGroups()
Returns all the users who do not belong to any groups, excluding the
default user.
|
static long[] |
getOrganizationUserIds(long organizationId)
Returns the primary keys of all the users belonging to the organization.
|
static java.util.List<User> |
getOrganizationUsers(long organizationId) |
static java.util.List<User> |
getOrganizationUsers(long organizationId,
int start,
int end) |
static java.util.List<User> |
getOrganizationUsers(long organizationId,
int start,
int end,
OrderByComparator orderByComparator) |
static int |
getOrganizationUsersCount(long organizationId) |
static int |
getOrganizationUsersCount(long organizationId,
int status)
Returns the number of users with the status belonging to the
organization.
|
static PersistedModel |
getPersistedModel(java.io.Serializable primaryKeyObj) |
static long[] |
getRoleUserIds(long roleId)
Returns the primary keys of all the users belonging to the role.
|
static java.util.List<User> |
getRoleUsers(long roleId) |
static java.util.List<User> |
getRoleUsers(long roleId,
int start,
int end) |
static java.util.List<User> |
getRoleUsers(long roleId,
int start,
int end,
OrderByComparator orderByComparator) |
static int |
getRoleUsersCount(long roleId) |
static int |
getRoleUsersCount(long roleId,
int status)
Returns the number of users with the status belonging to the role.
|
static UserLocalService |
getService() |
static java.util.List<User> |
getSocialUsers(long userId,
int type,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the users with a social relation of the
type with the user.
|
static java.util.List<User> |
getSocialUsers(long userId,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the users with a social relation with the
user.
|
static java.util.List<User> |
getSocialUsers(long userId1,
long userId2,
int type,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the users with a mutual social relation
of the type with both of the given users.
|
static java.util.List<User> |
getSocialUsers(long userId1,
long userId2,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the users with a mutual social relation
with both of the given users.
|
static int |
getSocialUsersCount(long userId)
Returns the number of users with a social relation with the user.
|
static int |
getSocialUsersCount(long userId,
int type)
Returns the number of users with a social relation of the type with the
user.
|
static int |
getSocialUsersCount(long userId1,
long userId2)
Returns the number of users with a mutual social relation with both of
the given users.
|
static int |
getSocialUsersCount(long userId1,
long userId2,
int type)
Returns the number of users with a mutual social relation of the type
with both of the given users.
|
static java.util.List<User> |
getTeamUsers(long teamId) |
static java.util.List<User> |
getTeamUsers(long teamId,
int start,
int end) |
static java.util.List<User> |
getTeamUsers(long teamId,
int start,
int end,
OrderByComparator orderByComparator) |
static int |
getTeamUsersCount(long teamId) |
static User |
getUser(long userId)
Returns the user with the primary key.
|
static User |
getUserByContactId(long contactId)
Returns the user with the contact ID.
|
static User |
getUserByEmailAddress(long companyId,
java.lang.String emailAddress)
Returns the user with the email address.
|
static User |
getUserByFacebookId(long companyId,
long facebookId)
Returns the user with the Facebook ID.
|
static User |
getUserById(long userId)
Returns the user with the primary key.
|
static User |
getUserById(long companyId,
long userId)
Returns the user with the primary key from the company.
|
static User |
getUserByOpenId(long companyId,
java.lang.String openId)
Returns the user with the OpenID.
|
static User |
getUserByPortraitId(long portraitId)
Returns the user with the portrait ID.
|
static User |
getUserByScreenName(long companyId,
java.lang.String screenName)
Returns the user with the screen name.
|
static User |
getUserByUuid(java.lang.String uuid)
Deprecated.
As of 6.2.0, replaced by
getUserByUuidAndCompanyId(String, long) |
static User |
getUserByUuidAndCompanyId(java.lang.String uuid,
long companyId)
Returns the user with the matching UUID and company.
|
static java.util.List<User> |
getUserGroupUsers(long userGroupId) |
static java.util.List<User> |
getUserGroupUsers(long userGroupId,
int start,
int end) |
static java.util.List<User> |
getUserGroupUsers(long userGroupId,
int start,
int end,
OrderByComparator orderByComparator) |
static int |
getUserGroupUsersCount(long userGroupId) |
static int |
getUserGroupUsersCount(long userGroupId,
int status)
Returns the number of users with the status belonging to the user group.
|
static long |
getUserIdByEmailAddress(long companyId,
java.lang.String emailAddress)
Returns the primary key of the user with the email address.
|
static long |
getUserIdByScreenName(long companyId,
java.lang.String screenName)
Returns the primary key of the user with the screen name.
|
static java.util.List<User> |
getUsers(int start,
int end)
Returns a range of all the users.
|
static int |
getUsersCount()
Returns the number of users.
|
static boolean |
hasGroupUser(long groupId,
long userId) |
static boolean |
hasGroupUsers(long groupId) |
static boolean |
hasOrganizationUser(long organizationId,
long userId) |
static boolean |
hasOrganizationUsers(long organizationId) |
static boolean |
hasPasswordPolicyUser(long passwordPolicyId,
long userId)
Returns
true if the password policy has been assigned to the
user. |
static boolean |
hasRoleUser(long roleId,
long userId) |
static boolean |
hasRoleUser(long companyId,
java.lang.String name,
long userId,
boolean inherited)
Returns
true if the user has the role with the name,
optionally through inheritance. |
static boolean |
hasRoleUsers(long roleId) |
static boolean |
hasTeamUser(long teamId,
long userId) |
static boolean |
hasTeamUsers(long teamId) |
static boolean |
hasUserGroupUser(long userGroupId,
long userId) |
static boolean |
hasUserGroupUsers(long userGroupId) |
static boolean |
isPasswordExpired(User user)
Returns
true if the user's password is expired. |
static boolean |
isPasswordExpiringSoon(User user)
Returns
true if the password policy is configured to warn
the user that his password is expiring and the remaining time until
expiration is equal or less than the configured warning time. |
static User |
loadGetDefaultUser(long companyId)
Returns the default user for the company.
|
static java.util.List<User> |
search(long companyId,
java.lang.String keywords,
int status,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the users who match the keywords and
status, without using the indexer.
|
static Hits |
search(long companyId,
java.lang.String keywords,
int status,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
int start,
int end,
Sort sort)
Returns an ordered range of all the users who match the keywords and
status, using the indexer.
|
static java.util.List<User> |
search(long companyId,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
java.lang.String screenName,
java.lang.String emailAddress,
int status,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
boolean andSearch,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the users with the status, and whose
first name, middle name, last name, screen name, and email address match
the keywords specified for them, without using the indexer.
|
static Hits |
search(long companyId,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
java.lang.String screenName,
java.lang.String emailAddress,
int status,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
boolean andSearch,
int start,
int end,
Sort sort)
Returns an ordered range of all the users with the status, and whose
first name, middle name, last name, screen name, and email address match
the keywords specified for them, using the indexer.
|
static int |
searchCount(long companyId,
java.lang.String keywords,
int status,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
Returns the number of users who match the keywords and status.
|
static int |
searchCount(long companyId,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
java.lang.String screenName,
java.lang.String emailAddress,
int status,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
boolean andSearch)
Returns the number of users with the status, and whose first name, middle
name, last name, screen name, and email address match the keywords
specified for them.
|
static void |
sendEmailAddressVerification(User user,
java.lang.String emailAddress,
ServiceContext serviceContext)
Sends an email address verification to the user.
|
static void |
sendPassword(long companyId,
java.lang.String emailAddress,
java.lang.String fromName,
java.lang.String fromAddress,
java.lang.String subject,
java.lang.String body,
ServiceContext serviceContext)
Sends the password email to the user with the email address.
|
static void |
setBeanIdentifier(java.lang.String beanIdentifier)
Sets the Spring bean ID for this bean.
|
static void |
setGroupUsers(long groupId,
long[] userIds) |
static void |
setOrganizationUsers(long organizationId,
long[] userIds) |
static void |
setRoleUsers(long roleId,
long[] userIds) |
void |
setService(UserLocalService service)
Deprecated.
As of 6.2.0
|
static void |
setTeamUsers(long teamId,
long[] userIds) |
static void |
setUserGroupUsers(long userGroupId,
long[] userIds) |
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,
java.util.List<User> users)
Removes the users from the role.
|
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 User |
updateAgreedToTermsOfUse(long userId,
boolean agreedToTermsOfUse)
Updates whether the user has agreed to the terms of use.
|
static void |
updateAsset(long userId,
User user,
long[] assetCategoryIds,
java.lang.String[] assetTagNames)
Updates the user's asset with the new asset categories and tag names,
removing and adding asset categories and tag names as necessary.
|
static User |
updateCreateDate(long userId,
java.util.Date createDate)
Updates the user's creation date.
|
static User |
updateEmailAddress(long userId,
java.lang.String password,
java.lang.String emailAddress1,
java.lang.String emailAddress2)
Updates the user's email address.
|
static User |
updateEmailAddress(long userId,
java.lang.String password,
java.lang.String emailAddress1,
java.lang.String emailAddress2,
ServiceContext serviceContext)
Updates the user's email address or sends verification email.
|
static User |
updateEmailAddressVerified(long userId,
boolean emailAddressVerified)
Updates whether the user has verified email address.
|
static User |
updateFacebookId(long userId,
long facebookId)
Updates the user's Facebook ID.
|
static void |
updateGroups(long userId,
long[] newGroupIds,
ServiceContext serviceContext)
Sets the groups the user is in, removing and adding groups as necessary.
|
static User |
updateIncompleteUser(long creatorUserId,
long companyId,
boolean autoPassword,
java.lang.String password1,
java.lang.String password2,
boolean autoScreenName,
java.lang.String screenName,
java.lang.String emailAddress,
long facebookId,
java.lang.String openId,
java.util.Locale locale,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String jobTitle,
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 User |
updateJobTitle(long userId,
java.lang.String jobTitle)
Updates the user's job title.
|
static User |
updateLastLogin(long userId,
java.lang.String loginIP)
Updates the user's last login with the current time and the IP address.
|
static User |
updateLockout(User user,
boolean lockout)
Updates whether the user is locked out from logging in.
|
static User |
updateLockoutByEmailAddress(long companyId,
java.lang.String emailAddress,
boolean lockout)
Updates whether the user is locked out from logging in.
|
static User |
updateLockoutById(long userId,
boolean lockout)
Updates whether the user is locked out from logging in.
|
static User |
updateLockoutByScreenName(long companyId,
java.lang.String screenName,
boolean lockout)
Updates whether the user is locked out from logging in.
|
static User |
updateModifiedDate(long userId,
java.util.Date modifiedDate)
Updates the user's modified date.
|
static User |
updateOpenId(long userId,
java.lang.String openId)
Updates the user's OpenID.
|
static void |
updateOrganizations(long userId,
long[] newOrganizationIds,
ServiceContext serviceContext)
Sets the organizations that the user is in, removing and adding
organizations as necessary.
|
static User |
updatePassword(long userId,
java.lang.String password1,
java.lang.String password2,
boolean passwordReset)
Updates the user's password without tracking or validation of the change.
|
static User |
updatePassword(long userId,
java.lang.String password1,
java.lang.String password2,
boolean passwordReset,
boolean silentUpdate)
Updates the user's password, optionally with tracking and validation of
the change.
|
static User |
updatePasswordManually(long userId,
java.lang.String password,
boolean passwordEncrypted,
boolean passwordReset,
java.util.Date passwordModifiedDate)
Updates the user's password with manually input information.
|
static User |
updatePasswordReset(long userId,
boolean passwordReset)
Updates whether the user should be asked to reset their password the next
time they login.
|
static User |
updatePortrait(long userId,
byte[] bytes)
Updates the user's portrait image.
|
static User |
updateReminderQuery(long userId,
java.lang.String question,
java.lang.String answer)
Updates the user's password reset question and answer.
|
static User |
updateScreenName(long userId,
java.lang.String screenName)
Updates the user's screen name.
|
static User |
updateStatus(long userId,
int status)
Deprecated.
As of 7.0.0, replaced by
updateStatus(long, int,
ServiceContext) |
static User |
updateStatus(long userId,
int status,
ServiceContext serviceContext)
Updates the user's workflow status.
|
static User |
updateUser(long userId,
java.lang.String oldPassword,
java.lang.String newPassword1,
java.lang.String newPassword2,
boolean passwordReset,
java.lang.String reminderQueryQuestion,
java.lang.String reminderQueryAnswer,
java.lang.String screenName,
java.lang.String emailAddress,
long facebookId,
java.lang.String openId,
java.lang.String languageId,
java.lang.String timeZoneId,
java.lang.String greeting,
java.lang.String comments,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
int prefixId,
int suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
java.lang.String smsSn,
java.lang.String aimSn,
java.lang.String facebookSn,
java.lang.String icqSn,
java.lang.String jabberSn,
java.lang.String msnSn,
java.lang.String mySpaceSn,
java.lang.String skypeSn,
java.lang.String twitterSn,
java.lang.String ymSn,
java.lang.String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
java.util.List<UserGroupRole> userGroupRoles,
long[] userGroupIds,
ServiceContext serviceContext)
Updates the user.
|
static User |
updateUser(User user)
Updates the user in the database or adds it if it does not yet exist.
|
static void |
verifyEmailAddress(java.lang.String ticketKey)
Verifies the email address of the ticket.
|
public static User addUser(User user) throws SystemException
user - the userSystemException - if a system exception occurredpublic static User createUser(long userId)
userId - the primary key for the new userpublic static User deleteUser(long userId) throws PortalException, SystemException
userId - the primary key of the userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User deleteUser(User user) throws PortalException, SystemException
user - the userPortalExceptionSystemException - if a system exception occurredpublic static DynamicQuery dynamicQuery()
public static java.util.List dynamicQuery(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery - the dynamic querySystemException - if a system exception occurredpublic static java.util.List dynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)SystemException - if a system exception occurredpublic static java.util.List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)orderByComparator - the comparator to order the results by (optionally null)SystemException - if a system exception occurredpublic static long dynamicQueryCount(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery - the dynamic querySystemException - if a system exception occurredpublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) throws SystemException
dynamicQuery - the dynamic queryprojection - the projection to apply to the querySystemException - if a system exception occurredpublic static User fetchUser(long userId) throws SystemException
SystemExceptionpublic static User fetchUserByUuidAndCompanyId(java.lang.String uuid, long companyId) throws SystemException
uuid - the user's UUIDcompanyId - the primary key of the companynull if a matching user could not be foundSystemException - if a system exception occurredpublic static User getUser(long userId) throws PortalException, SystemException
userId - the primary key of the userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static PersistedModel getPersistedModel(java.io.Serializable primaryKeyObj) throws PortalException, SystemException
PortalExceptionSystemExceptionpublic static User getUserByUuidAndCompanyId(java.lang.String uuid, long companyId) throws PortalException, SystemException
uuid - the user's UUIDcompanyId - the primary key of the companyPortalException - if a matching user could not be foundSystemException - if a system exception occurredpublic static java.util.List<User> getUsers(int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from UserModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start - the lower bound of the range of usersend - the upper bound of the range of users (not inclusive)SystemException - if a system exception occurredpublic static int getUsersCount()
throws SystemException
SystemException - if a system exception occurredpublic static User updateUser(User user) throws SystemException
user - the userSystemException - if a system exception occurredpublic static void addGroupUser(long groupId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static void addGroupUser(long groupId,
User user)
throws SystemException
SystemException - if a system exception occurredpublic static void addGroupUsers(long groupId,
long[] userIds)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void addGroupUsers(long groupId,
java.util.List<User> Users)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void clearGroupUsers(long groupId)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteGroupUser(long groupId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteGroupUser(long groupId,
User user)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteGroupUsers(long groupId,
long[] userIds)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteGroupUsers(long groupId,
java.util.List<User> Users)
throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getGroupUsers(long groupId) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getGroupUsers(long groupId, int start, int end) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getGroupUsers(long groupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException - if a system exception occurredpublic static int getGroupUsersCount(long groupId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasGroupUser(long groupId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasGroupUsers(long groupId)
throws SystemException
SystemException - if a system exception occurredpublic static void setGroupUsers(long groupId,
long[] userIds)
throws SystemException
SystemException - if a system exception occurredpublic static void addOrganizationUser(long organizationId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static void addOrganizationUser(long organizationId,
User user)
throws SystemException
SystemException - if a system exception occurredpublic static void addOrganizationUsers(long organizationId,
long[] userIds)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void addOrganizationUsers(long organizationId,
java.util.List<User> Users)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void clearOrganizationUsers(long organizationId)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteOrganizationUser(long organizationId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteOrganizationUser(long organizationId,
User user)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteOrganizationUsers(long organizationId,
long[] userIds)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteOrganizationUsers(long organizationId,
java.util.List<User> Users)
throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getOrganizationUsers(long organizationId) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getOrganizationUsers(long organizationId, int start, int end) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getOrganizationUsers(long organizationId, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException - if a system exception occurredpublic static int getOrganizationUsersCount(long organizationId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasOrganizationUser(long organizationId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasOrganizationUsers(long organizationId)
throws SystemException
SystemException - if a system exception occurredpublic static void setOrganizationUsers(long organizationId,
long[] userIds)
throws SystemException
SystemException - if a system exception occurredpublic static void addRoleUser(long roleId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static void addRoleUser(long roleId,
User user)
throws SystemException
SystemException - if a system exception occurredpublic static void addRoleUsers(long roleId,
long[] userIds)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void addRoleUsers(long roleId,
java.util.List<User> Users)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void clearRoleUsers(long roleId)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteRoleUser(long roleId,
long userId)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void deleteRoleUser(long roleId,
User user)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void deleteRoleUsers(long roleId,
long[] userIds)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteRoleUsers(long roleId,
java.util.List<User> Users)
throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getRoleUsers(long roleId) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getRoleUsers(long roleId, int start, int end) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getRoleUsers(long roleId, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException - if a system exception occurredpublic static int getRoleUsersCount(long roleId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasRoleUser(long roleId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasRoleUsers(long roleId)
throws SystemException
SystemException - if a system exception occurredpublic static void setRoleUsers(long roleId,
long[] userIds)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void addTeamUser(long teamId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static void addTeamUser(long teamId,
User user)
throws SystemException
SystemException - if a system exception occurredpublic static void addTeamUsers(long teamId,
long[] userIds)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void addTeamUsers(long teamId,
java.util.List<User> Users)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void clearTeamUsers(long teamId)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteTeamUser(long teamId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteTeamUser(long teamId,
User user)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteTeamUsers(long teamId,
long[] userIds)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteTeamUsers(long teamId,
java.util.List<User> Users)
throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getTeamUsers(long teamId) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getTeamUsers(long teamId, int start, int end) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getTeamUsers(long teamId, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException - if a system exception occurredpublic static int getTeamUsersCount(long teamId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasTeamUser(long teamId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasTeamUsers(long teamId)
throws SystemException
SystemException - if a system exception occurredpublic static void setTeamUsers(long teamId,
long[] userIds)
throws SystemException
SystemException - if a system exception occurredpublic static void addUserGroupUser(long userGroupId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static void addUserGroupUser(long userGroupId,
User user)
throws SystemException
SystemException - if a system exception occurredpublic static void addUserGroupUsers(long userGroupId,
long[] userIds)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void addUserGroupUsers(long userGroupId,
java.util.List<User> Users)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void clearUserGroupUsers(long userGroupId)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteUserGroupUser(long userGroupId,
long userId)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void deleteUserGroupUser(long userGroupId,
User user)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static void deleteUserGroupUsers(long userGroupId,
long[] userIds)
throws SystemException
SystemException - if a system exception occurredpublic static void deleteUserGroupUsers(long userGroupId,
java.util.List<User> Users)
throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getUserGroupUsers(long userGroupId) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getUserGroupUsers(long userGroupId, int start, int end) throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getUserGroupUsers(long userGroupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException - if a system exception occurredpublic static int getUserGroupUsersCount(long userGroupId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasUserGroupUser(long userGroupId,
long userId)
throws SystemException
SystemException - if a system exception occurredpublic static boolean hasUserGroupUsers(long userGroupId)
throws SystemException
SystemException - if a system exception occurredpublic static void setUserGroupUsers(long userGroupId,
long[] userIds)
throws PortalException,
SystemException
PortalExceptionSystemException - if a system exception occurredpublic static java.lang.String getBeanIdentifier()
public static void setBeanIdentifier(java.lang.String beanIdentifier)
beanIdentifier - the Spring bean ID for this beanpublic static User addDefaultAdminUser(long companyId, java.lang.String screenName, java.lang.String emailAddress, java.util.Locale locale, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName) throws PortalException, SystemException
companyId - the primary key of the user's companyscreenName - the user's screen nameemailAddress - the user's email addresslocale - the user's localefirstName - the user's first namemiddleName - the user's middle namelastName - the user's last namePortalException - n if a portal exception occurredSystemException - if a system exception occurredpublic static void addDefaultGroups(long userId)
throws PortalException,
SystemException
portal.properties with the key
admin.default.group.names.userId - the primary key of the userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static void addDefaultRoles(long userId)
throws PortalException,
SystemException
portal.properties with the key
admin.default.role.names.userId - the primary key of the userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static void addDefaultUserGroups(long userId)
throws PortalException,
SystemException
portal.properties with the property
admin.default.user.group.names.userId - the primary key of the userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static void addPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
throws SystemException
passwordPolicyId - the primary key of the password policyuserIds - the primary keys of the usersSystemException - if a system exception occurredpublic static User addUser(long creatorUserId, long companyId, boolean autoPassword, java.lang.String password1, java.lang.String password2, boolean autoScreenName, java.lang.String screenName, java.lang.String emailAddress, long facebookId, java.lang.String openId, java.util.Locale locale, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, java.lang.String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext) throws PortalException, SystemException
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.
creatorUserId - the primary key of the creatorcompanyId - 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.PortalException - if the user's information was invalidSystemException - if a system exception occurredpublic static User addUserWithWorkflow(long creatorUserId, long companyId, boolean autoPassword, java.lang.String password1, java.lang.String password2, boolean autoScreenName, java.lang.String screenName, java.lang.String emailAddress, long facebookId, java.lang.String openId, java.util.Locale locale, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, java.lang.String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext) throws PortalException, SystemException
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.
creatorUserId - the primary key of the creatorcompanyId - 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.PortalException - if the user's information was invalidSystemException - if a system exception occurredpublic static int authenticateByEmailAddress(long companyId,
java.lang.String emailAddress,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String[]> headerMap,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Map<java.lang.String,java.lang.Object> resultsMap)
throws PortalException,
SystemException
companyId - the primary key of the user's companyemailAddress - the user's email addresspassword - the user's passwordheaderMap - the header map from the authentication requestparameterMap - the parameter map from the authentication requestresultsMap - the map of authentication results (may be nil). After
a succesful authentication the user's primary key will be placed
under the key userId.Authenticator.FAILURE
indicating that the user's credentials are invalid, Authenticator.SUCCESS
indicating a successful login, or Authenticator.DNE indicating
that a user with that login does not exist.PortalException - if emailAddress or
password was nullSystemException - if a system exception occurredAuthPipelinepublic static int authenticateByScreenName(long companyId,
java.lang.String screenName,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String[]> headerMap,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Map<java.lang.String,java.lang.Object> resultsMap)
throws PortalException,
SystemException
companyId - the primary key of the user's companyscreenName - the user's screen namepassword - the user's passwordheaderMap - the header map from the authentication requestparameterMap - the parameter map from the authentication requestresultsMap - the map of authentication results (may be nil). After
a succesful authentication the user's primary key will be placed
under the key userId.Authenticator.FAILURE
indicating that the user's credentials are invalid, Authenticator.SUCCESS
indicating a successful login, or Authenticator.DNE indicating
that a user with that login does not exist.PortalException - if screenName or
password was nullSystemException - if a system exception occurredAuthPipelinepublic static int authenticateByUserId(long companyId,
long userId,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String[]> headerMap,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
java.util.Map<java.lang.String,java.lang.Object> resultsMap)
throws PortalException,
SystemException
companyId - the primary key of the user's companyuserId - the user's primary keypassword - the user's passwordheaderMap - the header map from the authentication requestparameterMap - the parameter map from the authentication requestresultsMap - the map of authentication results (may be nil). After
a succesful authentication the user's primary key will be placed
under the key userId.Authenticator.FAILURE
indicating that the user's credentials are invalid, Authenticator.SUCCESS
indicating a successful login, or Authenticator.DNE indicating
that a user with that login does not exist.PortalException - if userId or password
was nullSystemException - if a system exception occurredAuthPipelinepublic static long authenticateForBasic(long companyId,
java.lang.String authType,
java.lang.String login,
java.lang.String password)
throws PortalException,
SystemException
tunnel-web.
Authentication type specifies what login contains.The valid
values are:
CompanyConstants.AUTH_TYPE_EA - login is the
user's email address
CompanyConstants.AUTH_TYPE_SN - login is the
user's screen name
CompanyConstants.AUTH_TYPE_ID - login is the
user's primary key
companyId - the primary key of the user's companyauthType - the type of authentication to performlogin - either the user's email address, screen name, or primary
key depending on the value of authTypepassword - the user's passwordAuthenticator.FAILURE
indicating that the user's credentials are invalid, Authenticator.SUCCESS
indicating a successful login, or Authenticator.DNE indicating
that a user with that login does not exist.PortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static long authenticateForDigest(long companyId,
java.lang.String username,
java.lang.String realm,
java.lang.String nonce,
java.lang.String method,
java.lang.String uri,
java.lang.String response)
throws PortalException,
SystemException
tunnel-web.companyId - the primary key of the user's companyusername - either the user's email address, screen name, or primary
keyrealm - unusednonce - the number used oncemethod - the request methoduri - the request URIresponse - the authentication response hash0 otherwisePortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static boolean authenticateForJAAS(long userId,
java.lang.String encPassword)
userId - the primary key of the userencPassword - the encrypted passwordtrue if authentication is successful;
false otherwisepublic static void checkLockout(User user) throws PortalException, SystemException
user - the userPortalException - if the user was determined to still be locked outSystemException - if a system exception occurredpublic static void checkLoginFailure(User user) throws SystemException
user - the userSystemException - if a system exception occurredpublic static void checkLoginFailureByEmailAddress(long companyId,
java.lang.String emailAddress)
throws PortalException,
SystemException
companyId - the primary key of the user's companyemailAddress - the user's email addressPortalException - if a user with the email address could not be
foundSystemException - if a system exception occurredpublic static void checkLoginFailureById(long userId)
throws PortalException,
SystemException
userId - the primary key of the userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static void checkLoginFailureByScreenName(long companyId,
java.lang.String screenName)
throws PortalException,
SystemException
companyId - the primary key of the user's companyscreenName - the user's screen namePortalException - if a user with the screen name could not be foundSystemException - if a system exception occurredpublic static void checkPasswordExpired(User user) throws PortalException, SystemException
user - the userPortalException - if the user's password has expired and the grace
login limit has been exceededSystemException - if a system exception occurredpublic static void completeUserRegistration(User user, ServiceContext serviceContext) throws PortalException, SystemException
user - the userserviceContext - the service context to be applied. You can specify
an unencrypted custom password for the user via attribute
passwordUnencrypted. You automatically generate a
password for the user by setting attribute
autoPassword to true. You can send a
confirmation email to the user by setting attribute
sendEmail to true.PortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static KeyValuePair decryptUserId(long companyId, java.lang.String name, java.lang.String password) throws PortalException, SystemException
companyId - the primary key of the user's companyname - the encrypted primary key of the userpassword - the encrypted password of the userPortalException - if a user with the primary key could not be found
or if the user's password was incorrectSystemException - if a system exception occurredpublic static void deletePortrait(long userId)
throws PortalException,
SystemException
userId - the primary key of the userPortalException - if a user with the primary key could not be found
or if the user's portrait could not be foundSystemException - if a system exception occurredpublic static java.lang.String encryptUserId(java.lang.String name)
throws PortalException,
SystemException
name - the primary key of the userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User fetchUserByEmailAddress(long companyId, java.lang.String emailAddress) throws SystemException
companyId - the primary key of the user's companyemailAddress - the user's email addressnull if a user
with the email address could not be foundSystemException - if a system exception occurredpublic static User fetchUserByFacebookId(long companyId, long facebookId) throws SystemException
companyId - the primary key of the user's companyfacebookId - the user's Facebook IDnull if a user
with the Facebook ID could not be foundSystemException - if a system exception occurredpublic static User fetchUserById(long userId) throws SystemException
userId - the primary key of the usernull if a user
with the primary key could not be foundSystemException - if a system exception occurredpublic static User fetchUserByOpenId(long companyId, java.lang.String openId) throws SystemException
companyId - the primary key of the user's companyopenId - the user's OpenIDnull if a user with the
OpenID could not be foundSystemException - if a system exception occurredpublic static User fetchUserByScreenName(long companyId, java.lang.String screenName) throws SystemException
companyId - the primary key of the user's companyscreenName - the user's screen namenull if a user
with the screen name could not be foundSystemException - if a system exception occurredpublic static java.util.List<User> getCompanyUsers(long companyId, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
companyId - the primary key of the companystart - the lower bound of the range of usersend - the upper bound of the range of users (not inclusive)SystemException - if a system exception occurredpublic static int getCompanyUsersCount(long companyId)
throws SystemException
companyId - the primary key of the companySystemException - if a system exception occurredpublic static User getDefaultUser(long companyId) throws PortalException, SystemException
companyId - the primary key of the companyPortalException - if a default user for the company could not be
foundSystemException - if a system exception occurredpublic static long getDefaultUserId(long companyId)
throws PortalException,
SystemException
companyId - the primary key of the companyPortalException - if a default user for the company could not be
foundSystemException - if a system exception occurredpublic static long[] getGroupUserIds(long groupId)
throws SystemException
groupId - the primary key of the groupSystemException - if a system exception occurredpublic static int getGroupUsersCount(long groupId,
int status)
throws PortalException,
SystemException
groupId - the primary key of the groupstatus - the workflow statusPortalException - if a group with the primary key could not be
foundSystemException - if a system exception occurredpublic static java.util.List<User> getInheritedRoleUsers(long roleId, int start, int end, OrderByComparator obc) throws PortalException, SystemException
PortalExceptionSystemExceptionpublic static java.util.List<User> getNoAnnouncementsDeliveries(java.lang.String type) throws SystemException
type - the type of announcementSystemException - if a system exception occurredpublic static java.util.List<User> getNoContacts() throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<User> getNoGroups() throws SystemException
SystemException - if a system exception occurredpublic static long[] getOrganizationUserIds(long organizationId)
throws SystemException
organizationId - the primary key of the organizationSystemException - if a system exception occurredpublic static int getOrganizationUsersCount(long organizationId,
int status)
throws PortalException,
SystemException
organizationId - the primary key of the organizationstatus - the workflow statusPortalException - if an organization with the primary key could not
be foundSystemException - if a system exception occurredpublic static long[] getRoleUserIds(long roleId)
throws SystemException
roleId - the primary key of the roleSystemException - if a system exception occurredpublic static int getRoleUsersCount(long roleId,
int status)
throws PortalException,
SystemException
roleId - the primary key of the rolestatus - the workflow statusPortalException - if an role with the primary key could not be
foundSystemException - if a system exception occurredpublic static java.util.List<User> getSocialUsers(long userId, int type, int start, int end, OrderByComparator obc) throws PortalException, SystemException
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
userId - the primary key of the usertype - the type of social relation. The possible types can be found
in SocialRelationConstants.start - 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)PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static java.util.List<User> getSocialUsers(long userId, int start, int end, OrderByComparator obc) throws PortalException, SystemException
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
userId - the primary key of the userstart - 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)PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static java.util.List<User> getSocialUsers(long userId1, long userId2, int type, int start, int end, OrderByComparator obc) throws PortalException, SystemException
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
userId1 - the primary key of the first useruserId2 - the primary key of the second usertype - the type of social relation. The possible types can be found
in SocialRelationConstants.start - 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)PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static java.util.List<User> getSocialUsers(long userId1, long userId2, int start, int end, OrderByComparator obc) throws PortalException, SystemException
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
userId1 - the primary key of the first useruserId2 - the primary key of the second userstart - 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)PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static int getSocialUsersCount(long userId)
throws PortalException,
SystemException
userId - the primary key of the userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static int getSocialUsersCount(long userId,
int type)
throws PortalException,
SystemException
userId - the primary key of the usertype - the type of social relation. The possible types can be found
in SocialRelationConstants.PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static int getSocialUsersCount(long userId1,
long userId2)
throws PortalException,
SystemException
userId1 - the primary key of the first useruserId2 - the primary key of the second userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static int getSocialUsersCount(long userId1,
long userId2,
int type)
throws PortalException,
SystemException
userId1 - the primary key of the first useruserId2 - the primary key of the second usertype - the type of social relation. The possible types can be found
in SocialRelationConstants.PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User getUserByContactId(long contactId) throws PortalException, SystemException
contactId - the user's contact IDPortalException - if a user with the contact ID could not be foundSystemException - if a system exception occurredpublic static User getUserByEmailAddress(long companyId, java.lang.String emailAddress) throws PortalException, SystemException
companyId - the primary key of the user's companyemailAddress - the user's email addressPortalException - if a user with the email address could not be
foundSystemException - if a system exception occurredpublic static User getUserByFacebookId(long companyId, long facebookId) throws PortalException, SystemException
companyId - the primary key of the user's companyfacebookId - the user's Facebook IDPortalException - if a user with the Facebook ID could not be foundSystemException - if a system exception occurredpublic static User getUserById(long userId) throws PortalException, SystemException
userId - the primary key of the userPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User getUserById(long companyId, long userId) throws PortalException, SystemException
companyId - the primary key of the user's companyuserId - the primary key of the userPortalException - if a user with the primary key from the company
could not be foundSystemException - if a system exception occurredpublic static User getUserByOpenId(long companyId, java.lang.String openId) throws PortalException, SystemException
companyId - the primary key of the user's companyopenId - the user's OpenIDPortalException - if a user with the OpenID could not be foundSystemException - if a system exception occurredpublic static User getUserByPortraitId(long portraitId) throws PortalException, SystemException
portraitId - the user's portrait IDPortalException - if a user with the portrait ID could not be foundSystemException - if a system exception occurredpublic static User getUserByScreenName(long companyId, java.lang.String screenName) throws PortalException, SystemException
companyId - the primary key of the user's companyscreenName - the user's screen namePortalException - if a user with the screen name could not be foundSystemException - if a system exception occurredpublic static User getUserByUuid(java.lang.String uuid) throws PortalException, SystemException
getUserByUuidAndCompanyId(String, long)uuid - the user's UUIDPortalException - if a user with the UUID could not be foundSystemException - if a system exception occurredpublic static int getUserGroupUsersCount(long userGroupId,
int status)
throws PortalException,
SystemException
userGroupId - the primary key of the user groupstatus - the workflow statusPortalException - if a user group with the primary key could not be
foundSystemException - if a system exception occurredpublic static long getUserIdByEmailAddress(long companyId,
java.lang.String emailAddress)
throws PortalException,
SystemException
companyId - the primary key of the user's companyemailAddress - the user's email addressPortalException - if a user with the email address could not be
foundSystemException - if a system exception occurredpublic static long getUserIdByScreenName(long companyId,
java.lang.String screenName)
throws PortalException,
SystemException
companyId - the primary key of the user's companyscreenName - the user's screen namePortalException - if a user with the screen name could not be foundSystemException - if a system exception occurredpublic static boolean hasPasswordPolicyUser(long passwordPolicyId,
long userId)
throws SystemException
true if the password policy has been assigned to the
user.passwordPolicyId - the primary key of the password policyuserId - the primary key of the usertrue if the password policy is assigned to the user;
false otherwiseSystemException - if a system exception occurredpublic static boolean hasRoleUser(long companyId,
java.lang.String name,
long userId,
boolean inherited)
throws PortalException,
SystemException
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
otherwisePortalException - if a role with the name could not be foundSystemException - if a system exception occurredpublic static boolean isPasswordExpired(User user) throws PortalException, SystemException
true if the user's password is expired.user - the usertrue if the user's password is expired;
false otherwisePortalException - if the password policy for the user could not be
foundSystemException - if a system exception occurredpublic static boolean isPasswordExpiringSoon(User user) throws PortalException, SystemException
true if the password policy is configured to warn
the user that his password is expiring and the remaining time until
expiration is equal or less than the configured warning time.user - the usertrue if the user's password is expiring soon;
false otherwisePortalException - if the password policy for the user could not be
foundSystemException - if a system exception occurredpublic static User loadGetDefaultUser(long companyId) throws PortalException, SystemException
companyId - the primary key of the companyPortalException - if the user could not be foundSystemException - if a system exception occurredpublic static java.util.List<User> search(long companyId, java.lang.String keywords, int status, java.util.LinkedHashMap<java.lang.String,java.lang.Object> params, int start, int end, OrderByComparator obc) throws SystemException
search(long, String, int, LinkedHashMap, int, int, Sort)
instead of this method wherever possible for performance reasons.
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
companyId - the primary key of the user's companykeywords - the keywords (space separated), which may occur in the
user's first name, middle name, last name, screen name, or email
addressstatus - the workflow statusparams - the finder parameters (optionally null). For
more information see UserFinder.start - 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)SystemException - if a system exception occurredUserFinderpublic static Hits search(long companyId, java.lang.String keywords, int status, java.util.LinkedHashMap<java.lang.String,java.lang.Object> params, int start, int end, Sort sort) throws SystemException
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
companyId - the primary key of the user's companykeywords - the keywords (space separated), which may occur in the
user's first name, middle name, last name, screen name, or email
addressstatus - the workflow statusparams - the indexer parameters (optionally null). For
more information see UserIndexer.start - the lower bound of the range of usersend - the upper bound of the range of users (not inclusive)sort - the field and direction to sort by (optionally
null)SystemException - if a system exception occurredUserIndexerpublic static java.util.List<User> search(long companyId, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, java.lang.String screenName, java.lang.String emailAddress, int status, java.util.LinkedHashMap<java.lang.String,java.lang.Object> params, boolean andSearch, int start, int end, OrderByComparator obc) throws SystemException
search(long, String,
String, String, String, String, int, LinkedHashMap, boolean, int, int,
Sort) instead of this method wherever possible for performance reasons.
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
companyId - the primary key of the user's companyfirstName - the first name keywords (space separated)middleName - the middle name keywordslastName - the last name keywordsscreenName - the screen name keywordsemailAddress - the email address keywordsstatus - the workflow statusparams - the finder parameters (optionally null). For
more information see UserFinder.andSearch - whether every field must match its keywords, or just
one field. For example, "users with the first name 'bob' and
last name 'smith'" vs "users with the first name 'bob'
or the last name 'smith'".start - 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)SystemException - if a system exception occurredUserFinderpublic static Hits search(long companyId, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, java.lang.String screenName, java.lang.String emailAddress, int status, java.util.LinkedHashMap<java.lang.String,java.lang.Object> params, boolean andSearch, int start, int end, Sort sort) throws SystemException
Useful when paginating results. Returns a maximum of end -
start instances. start and end are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end to QueryUtil.ALL_POS will return the full
result set.
companyId - the primary key of the user's companyfirstName - the first name keywords (space separated)middleName - the middle name keywordslastName - the last name keywordsscreenName - the screen name keywordsemailAddress - the email address keywordsstatus - the workflow statusparams - the indexer parameters (optionally null). For
more information see UserIndexer.andSearch - whether every field must match its keywords, or just
one field. For example, "users with the first name 'bob' and
last name 'smith'" vs "users with the first name 'bob'
or the last name 'smith'".start - the lower bound of the range of usersend - the upper bound of the range of users (not inclusive)sort - the field and direction to sort by (optionally
null)SystemException - if a system exception occurredUserIndexerpublic static int searchCount(long companyId,
java.lang.String keywords,
int status,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
throws SystemException
companyId - the primary key of the user's companykeywords - the keywords (space separated), which may occur in the
user's first name, middle name, last name, screen name, or email
addressstatus - the workflow statusparams - the finder parameters (optionally null). For
more information see UserFinder.SystemException - if a system exception occurredpublic static int searchCount(long companyId,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
java.lang.String screenName,
java.lang.String emailAddress,
int status,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
boolean andSearch)
throws SystemException
companyId - the primary key of the user's companyfirstName - the first name keywords (space separated)middleName - the middle name keywordslastName - the last name keywordsscreenName - the screen name keywordsemailAddress - the email address keywordsstatus - the workflow statusparams - the finder parameters (optionally null). For
more information see UserFinder.andSearch - whether every field must match its keywords, or just
one field. For example, "users with the first name 'bob' and
last name 'smith'" vs "users with the first name 'bob'
or the last name 'smith'".SystemException - if a system exception occurredpublic static void sendEmailAddressVerification(User user, java.lang.String emailAddress, ServiceContext serviceContext) throws PortalException, SystemException
user - the verification email recipientemailAddress - the recipient's email addressserviceContext - 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.PortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static void sendPassword(long companyId,
java.lang.String emailAddress,
java.lang.String fromName,
java.lang.String fromAddress,
java.lang.String subject,
java.lang.String body,
ServiceContext serviceContext)
throws PortalException,
SystemException
portal.properties with the
admin.email.password keys.companyId - the primary key of the user's companyemailAddress - the user's email addressfromName - the name of the individual that the email should be fromfromAddress - the address of the individual that the email should
be fromsubject - the email subject. If null, the subject
specified in portal.properties will be used.body - the email body. If null, the body specified in
portal.properties will be used.serviceContext - the service context to be appliedPortalException - if a user with the email address could not be
foundSystemException - if a system exception occurredpublic static void unsetGroupTeamsUsers(long groupId,
long[] userIds)
throws PortalException,
SystemException
groupId - the primary key of the groupuserIds - the primary keys of the usersPortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static void unsetGroupUsers(long groupId,
long[] userIds,
ServiceContext serviceContext)
throws PortalException,
SystemException
groupId - the primary key of the groupuserIds - the primary keys of the usersserviceContext - the service context to be applied (optionally
null)PortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static void unsetOrganizationUsers(long organizationId,
long[] userIds)
throws PortalException,
SystemException
organizationId - the primary key of the organizationuserIds - the primary keys of the usersPortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static void unsetPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
throws SystemException
passwordPolicyId - the primary key of the password policyuserIds - the primary keys of the usersSystemException - if a system exception occurredpublic static void unsetRoleUsers(long roleId,
java.util.List<User> users)
throws PortalException,
SystemException
roleId - the primary key of the roleusers - the usersPortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static void unsetRoleUsers(long roleId,
long[] userIds)
throws PortalException,
SystemException
roleId - the primary key of the roleuserIds - the primary keys of the usersPortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static void unsetTeamUsers(long teamId,
long[] userIds)
throws PortalException,
SystemException
teamId - the primary key of the teamuserIds - the primary keys of the usersPortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static void unsetUserGroupUsers(long userGroupId,
long[] userIds)
throws PortalException,
SystemException
userGroupId - the primary key of the user groupuserIds - the primary keys of the usersPortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static User updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse) throws PortalException, SystemException
userId - the primary key of the useragreedToTermsOfUse - whether the user has agreet to the terms of
usePortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static void updateAsset(long userId,
User user,
long[] assetCategoryIds,
java.lang.String[] assetTagNames)
throws PortalException,
SystemException
userId - the primary key of the useruser - ID the primary key of the userassetCategoryIds - the primary key's of the new asset categoriesassetTagNames - the new asset tag namesPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updateCreateDate(long userId, java.util.Date createDate) throws PortalException, SystemException
userId - the primary key of the usercreateDate - the new creation datePortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updateEmailAddress(long userId, java.lang.String password, java.lang.String emailAddress1, java.lang.String emailAddress2) throws PortalException, SystemException
userId - the primary key of the userpassword - the user's passwordemailAddress1 - the user's new email addressemailAddress2 - the user's new email address confirmationPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updateEmailAddress(long userId, java.lang.String password, java.lang.String emailAddress1, java.lang.String emailAddress2, ServiceContext serviceContext) throws PortalException, SystemException
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.PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updateEmailAddressVerified(long userId, boolean emailAddressVerified) throws PortalException, SystemException
userId - the primary key of the useremailAddressVerified - whether the user has verified email addressPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updateFacebookId(long userId, long facebookId) throws PortalException, SystemException
userId - the primary key of the userfacebookId - the user's new Facebook IDPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static void updateGroups(long userId,
long[] newGroupIds,
ServiceContext serviceContext)
throws PortalException,
SystemException
userId - the primary key of the usernewGroupIds - the primary keys of the groupsserviceContext - the service context to be applied (optionally
null)PortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static User updateIncompleteUser(long creatorUserId, long companyId, boolean autoPassword, java.lang.String password1, java.lang.String password2, boolean autoScreenName, java.lang.String screenName, java.lang.String emailAddress, long facebookId, java.lang.String openId, java.util.Locale locale, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, java.lang.String jobTitle, boolean updateUserInformation, boolean sendEmail, ServiceContext serviceContext) throws PortalException, SystemException
creatorUserId - the primary key of the creatorcompanyId - 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 expando bridge attributes for the
user.PortalException - if the user's information was invalidSystemException - if a system exception occurredpublic static User updateJobTitle(long userId, java.lang.String jobTitle) throws PortalException, SystemException
userId - the primary key of the userjobTitle - the user's job titlePortalException - if a user with the primary key could not be found
or if a contact could not be found matching the user's contact IDSystemException - if a system exception occurredpublic static User updateLastLogin(long userId, java.lang.String loginIP) throws PortalException, SystemException
userId - the primary key of the userloginIP - the IP address the user logged in fromPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updateLockout(User user, boolean lockout) throws PortalException, SystemException
user - the userlockout - whether the user is locked outPortalException - if a portal exception occurredSystemException - if a system exception occurredpublic static User updateLockoutByEmailAddress(long companyId, java.lang.String emailAddress, boolean lockout) throws PortalException, SystemException
companyId - the primary key of the user's companyemailAddress - the user's email addresslockout - whether the user is locked outPortalException - if a user with the email address could not be
foundSystemException - if a system exception occurredpublic static User updateLockoutById(long userId, boolean lockout) throws PortalException, SystemException
userId - the primary key of the userlockout - whether the user is locked outPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updateLockoutByScreenName(long companyId, java.lang.String screenName, boolean lockout) throws PortalException, SystemException
companyId - the primary key of the user's companyscreenName - the user's screen namelockout - whether the user is locked outPortalException - if a user with the screen name could not be foundSystemException - if a system exception occurredpublic static User updateModifiedDate(long userId, java.util.Date modifiedDate) throws PortalException, SystemException
userId - the primary key of the usermodifiedDate - the new modified datePortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updateOpenId(long userId, java.lang.String openId) throws PortalException, SystemException
userId - the primary key of the useropenId - the new OpenIDPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static void updateOrganizations(long userId,
long[] newOrganizationIds,
ServiceContext serviceContext)
throws PortalException,
SystemException
userId - the primary key of the usernewOrganizationIds - the primary keys of the organizationsserviceContext - the service context to be applied. Must set
whether user indexing is enabled.PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updatePassword(long userId, java.lang.String password1, java.lang.String password2, boolean passwordReset) throws PortalException, SystemException
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 inPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updatePassword(long userId, java.lang.String password1, java.lang.String password2, boolean passwordReset, boolean silentUpdate) throws PortalException, SystemException
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 loginsilentUpdate - whether the password should be updated without being
tracked, or validated. Primarily used for password imports.PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updatePasswordManually(long userId, java.lang.String password, boolean passwordEncrypted, boolean passwordReset, java.util.Date passwordModifiedDate) throws PortalException, SystemException
userId - the primary key of the userpassword - the user's new passwordpasswordEncrypted - the user's new encrypted passwordpasswordReset - whether the user should be asked to reset their
password the next time they loginpasswordModifiedDate - the new password modified datePortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updatePasswordReset(long userId, boolean passwordReset) throws PortalException, SystemException
userId - the primary key of the userpasswordReset - whether the user should be asked to reset their
password the next time they loginPortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updatePortrait(long userId, byte[] bytes) throws PortalException, SystemException
userId - the primary key of the userbytes - the new portrait image dataPortalException - if a user with the primary key could not be found
or if the new portrait was invalidSystemException - if a system exception occurredpublic static User updateReminderQuery(long userId, java.lang.String question, java.lang.String answer) throws PortalException, SystemException
userId - the primary key of the userquestion - the user's new password reset questionanswer - the user's new password reset answerPortalException - if a user with the primary key could not be found
or if the new question or answer were invalidSystemException - if a system exception occurredpublic static User updateScreenName(long userId, java.lang.String screenName) throws PortalException, SystemException
userId - the primary key of the userscreenName - the user's new screen namePortalException - if a user with the primary key could not be found
or if the new screen name was invalidSystemException - if a system exception occurredpublic static User updateStatus(long userId, int status) throws PortalException, SystemException
updateStatus(long, int,
ServiceContext)userId - the primary key of the userstatus - the user's new workflow statusPortalException - if a user with the primary key could not be
foundSystemException - if a system exception occurredpublic static User updateStatus(long userId, int status, ServiceContext serviceContext) throws PortalException, SystemException
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.PortalException - if a user with the primary key could not be foundSystemException - if a system exception occurredpublic static User updateUser(long userId, java.lang.String oldPassword, java.lang.String newPassword1, java.lang.String newPassword2, boolean passwordReset, java.lang.String reminderQueryQuestion, java.lang.String reminderQueryAnswer, java.lang.String screenName, java.lang.String emailAddress, long facebookId, java.lang.String openId, java.lang.String languageId, java.lang.String timeZoneId, java.lang.String greeting, java.lang.String comments, java.lang.String firstName, java.lang.String middleName, java.lang.String lastName, int prefixId, int suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, java.lang.String facebookSn, java.lang.String icqSn, java.lang.String jabberSn, java.lang.String msnSn, java.lang.String mySpaceSn, java.lang.String skypeSn, java.lang.String twitterSn, java.lang.String ymSn, java.lang.String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, java.util.List<UserGroupRole> userGroupRoles, long[] userGroupIds, ServiceContext serviceContext) throws PortalException, SystemException
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 nameaimSn - the user's new AIM screen namefacebookSn - the user's new Facebook screen nameicqSn - the user's new ICQ screen namejabberSn - the user's new Jabber screen namemsnSn - the user's new MSN screen namemySpaceSn - the user's new MySpace screen nameskypeSn - the user's new Skype screen nametwitterSn - the user's new Twitter screen nameymSn - the user's new Yahoo! Messenger 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.PortalException - if a user with the primary key could not be found
or if the new information was invalidSystemException - if a system exception occurredpublic static void verifyEmailAddress(java.lang.String ticketKey)
throws PortalException,
SystemException
ticketKey - the ticket keyPortalException - if a ticket matching the ticket key could not be
found, if the ticket has expired, if the ticket is an email
address ticket, or if the email address is invalidSystemException - if a system exception occurredpublic static UserLocalService getService()
public void setService(UserLocalService service)