@ProviderType public class UserServiceWrapper extends Object implements UserService, ServiceWrapper<UserService>
UserService
.UserService
Constructor and Description |
---|
UserServiceWrapper(UserService userService) |
Modifier and Type | Method and Description |
---|---|
void |
addGroupUsers(long groupId,
long[] userIds,
ServiceContext serviceContext)
Adds the users to the group.
|
void |
addOrganizationUsers(long organizationId,
long[] userIds)
Adds the users to the organization.
|
void |
addPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
Assigns the password policy to the users, removing any other currently
assigned password policies.
|
void |
addRoleUsers(long roleId,
long[] userIds)
Adds the users to the role.
|
void |
addTeamUsers(long teamId,
long[] userIds)
Adds the users to the team.
|
User |
addUser(long companyId,
boolean autoPassword,
String password1,
String password2,
boolean autoScreenName,
String screenName,
String emailAddress,
long facebookId,
String openId,
Locale locale,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
long[] userGroupIds,
boolean sendEmail,
ServiceContext serviceContext)
Adds a user.
|
User |
addUser(long companyId,
boolean autoPassword,
String password1,
String password2,
boolean autoScreenName,
String screenName,
String emailAddress,
long facebookId,
String openId,
Locale locale,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
long[] userGroupIds,
List<Address> addresses,
List<EmailAddress> emailAddresses,
List<Phone> phones,
List<Website> websites,
List<AnnouncementsDelivery> announcementsDelivers,
boolean sendEmail,
ServiceContext serviceContext)
Adds a user with additional parameters.
|
void |
addUserGroupUsers(long userGroupId,
long[] userIds)
Adds the users to the user group.
|
User |
addUserWithWorkflow(long companyId,
boolean autoPassword,
String password1,
String password2,
boolean autoScreenName,
String screenName,
String emailAddress,
long facebookId,
String openId,
Locale locale,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
long[] userGroupIds,
boolean sendEmail,
ServiceContext serviceContext)
Adds a user with workflow.
|
User |
addUserWithWorkflow(long companyId,
boolean autoPassword,
String password1,
String password2,
boolean autoScreenName,
String screenName,
String emailAddress,
long facebookId,
String openId,
Locale locale,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
long[] userGroupIds,
List<Address> addresses,
List<EmailAddress> emailAddresses,
List<Phone> phones,
List<Website> websites,
List<AnnouncementsDelivery> announcementsDelivers,
boolean sendEmail,
ServiceContext serviceContext)
Adds a user with workflow and additional parameters.
|
void |
deletePortrait(long userId)
Deletes the user's portrait image.
|
void |
deleteRoleUser(long roleId,
long userId)
Removes the user from the role.
|
void |
deleteUser(long userId)
Deletes the user.
|
List<User> |
getCompanyUsers(long companyId,
int start,
int end) |
int |
getCompanyUsersCount(long companyId) |
User |
getCurrentUser() |
long[] |
getGroupUserIds(long groupId)
Returns the primary keys of all the users belonging to the group.
|
List<User> |
getGroupUsers(long groupId)
Returns all the users belonging to the group.
|
List<User> |
getGroupUsers(long groupId,
int status,
int start,
int end,
OrderByComparator<User> obc)
Returns the users belonging to a group.
|
List<User> |
getGroupUsers(long groupId,
int status,
OrderByComparator<User> obc)
Returns the users belonging to a group.
|
int |
getGroupUsersCount(long groupId,
int status)
Returns the number of users with the status belonging to the group.
|
List<User> |
getGtCompanyUsers(long gtUserId,
long companyId,
int size) |
List<User> |
getGtOrganizationUsers(long gtUserId,
long organizationId,
int size) |
List<User> |
getGtUserGroupUsers(long gtUserId,
long userGroupId,
int size) |
int |
getOrganizationsAndUserGroupsUsersCount(long[] organizationIds,
long[] userGroupIds) |
long[] |
getOrganizationUserIds(long organizationId)
Returns the primary keys of all the users belonging to the organization.
|
List<User> |
getOrganizationUsers(long organizationId)
Returns all the users belonging to the organization.
|
List<User> |
getOrganizationUsers(long organizationId,
int status,
int start,
int end,
OrderByComparator<User> obc)
Returns the users belonging to the organization with the status.
|
List<User> |
getOrganizationUsers(long organizationId,
int status,
OrderByComparator<User> obc)
Returns the users belonging to the organization with the status.
|
int |
getOrganizationUsersCount(long organizationId,
int status)
Returns the number of users with the status belonging to the
organization.
|
String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
long[] |
getRoleUserIds(long roleId)
Returns the primary keys of all the users belonging to the role.
|
User |
getUserByEmailAddress(long companyId,
String emailAddress)
Returns the user with the email address.
|
User |
getUserById(long userId)
Returns the user with the primary key.
|
User |
getUserByScreenName(long companyId,
String screenName)
Returns the user with the screen name.
|
List<User> |
getUserGroupUsers(long userGroupId) |
List<User> |
getUserGroupUsers(long userGroupId,
int start,
int end) |
long |
getUserIdByEmailAddress(long companyId,
String emailAddress)
Returns the primary key of the user with the email address.
|
long |
getUserIdByScreenName(long companyId,
String screenName)
Returns the primary key of the user with the screen name.
|
UserService |
getWrappedService() |
boolean |
hasGroupUser(long groupId,
long userId)
Returns
true if the user is a member of the group. |
boolean |
hasRoleUser(long roleId,
long userId)
Returns
true if the user is a member of the role. |
boolean |
hasRoleUser(long companyId,
String name,
long userId,
boolean inherited)
Returns
true if the user has the role with the name,
optionally through inheritance. |
boolean |
sendPasswordByEmailAddress(long companyId,
String emailAddress)
Sends a password notification email to the user matching the email
address.
|
boolean |
sendPasswordByScreenName(long companyId,
String screenName)
Sends a password notification email to the user matching the screen name.
|
boolean |
sendPasswordByUserId(long userId)
Sends a password notification email to the user matching the ID.
|
void |
setRoleUsers(long roleId,
long[] userIds)
Sets the users in the role, removing and adding users to the role as
necessary.
|
void |
setUserGroupUsers(long userGroupId,
long[] userIds)
Sets the users in the user group, removing and adding users to the user
group as necessary.
|
void |
setWrappedService(UserService userService) |
void |
unsetGroupTeamsUsers(long groupId,
long[] userIds)
Removes the users from the teams of a group.
|
void |
unsetGroupUsers(long groupId,
long[] userIds,
ServiceContext serviceContext)
Removes the users from the group.
|
void |
unsetOrganizationUsers(long organizationId,
long[] userIds)
Removes the users from the organization.
|
void |
unsetPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
Removes the users from the password policy.
|
void |
unsetRoleUsers(long roleId,
long[] userIds)
Removes the users from the role.
|
void |
unsetTeamUsers(long teamId,
long[] userIds)
Removes the users from the team.
|
void |
unsetUserGroupUsers(long userGroupId,
long[] userIds)
Removes the users from the user group.
|
User |
updateAgreedToTermsOfUse(long userId,
boolean agreedToTermsOfUse)
Updates the user's response to the terms of use agreement.
|
User |
updateEmailAddress(long userId,
String password,
String emailAddress1,
String emailAddress2,
ServiceContext serviceContext)
Updates the user's email address.
|
User |
updateIncompleteUser(long companyId,
boolean autoPassword,
String password1,
String password2,
boolean autoScreenName,
String screenName,
String emailAddress,
long facebookId,
String openId,
Locale locale,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String jobTitle,
boolean updateUserInformation,
boolean sendEmail,
ServiceContext serviceContext)
Updates a user account that was automatically created when a guest user
participated in an action (e.g. posting a comment) and only provided his
name and email address.
|
User |
updateLockoutById(long userId,
boolean lockout)
Updates whether the user is locked out from logging in.
|
User |
updateOpenId(long userId,
String openId)
Updates the user's OpenID.
|
void |
updateOrganizations(long userId,
long[] organizationIds,
ServiceContext serviceContext)
Sets the organizations that the user is in, removing and adding
organizations as necessary.
|
User |
updatePassword(long userId,
String password1,
String password2,
boolean passwordReset)
Updates the user's password without tracking or validation of the change.
|
User |
updatePortrait(long userId,
byte[] bytes)
Updates the user's portrait image.
|
User |
updateReminderQuery(long userId,
String question,
String answer)
Updates the user's password reset question and answer.
|
User |
updateScreenName(long userId,
String screenName)
Updates the user's screen name.
|
User |
updateStatus(long userId,
int status)
Deprecated.
As of Wilberforce (7.0.x), replaced by
updateStatus(long, int, ServiceContext) |
User |
updateStatus(long userId,
int status,
ServiceContext serviceContext)
Updates the user's workflow status.
|
User |
updateUser(long userId,
String oldPassword,
String newPassword1,
String newPassword2,
boolean passwordReset,
String reminderQueryQuestion,
String reminderQueryAnswer,
String screenName,
String emailAddress,
long facebookId,
String openId,
boolean portrait,
byte[] portraitBytes,
String languageId,
String timeZoneId,
String greeting,
String comments,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String smsSn,
String facebookSn,
String jabberSn,
String skypeSn,
String twitterSn,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
List<UserGroupRole> userGroupRoles,
long[] userGroupIds,
List<Address> addresses,
List<EmailAddress> emailAddresses,
List<Phone> phones,
List<Website> websites,
List<AnnouncementsDelivery> announcementsDelivers,
ServiceContext serviceContext)
Updates the user with additional parameters.
|
User |
updateUser(long userId,
String oldPassword,
String newPassword1,
String newPassword2,
boolean passwordReset,
String reminderQueryQuestion,
String reminderQueryAnswer,
String screenName,
String emailAddress,
long facebookId,
String openId,
String languageId,
String timeZoneId,
String greeting,
String comments,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String smsSn,
String facebookSn,
String jabberSn,
String skypeSn,
String twitterSn,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
List<UserGroupRole> userGroupRoles,
long[] userGroupIds,
List<Address> addresses,
List<EmailAddress> emailAddresses,
List<Phone> phones,
List<Website> websites,
List<AnnouncementsDelivery> announcementsDelivers,
ServiceContext serviceContext)
Deprecated.
As of Wilberforce (7.0.x), replaced by
updateUser(long, String, String, String, boolean, String,
String, String, String, long, String, boolean, byte[],
String, String, String, String, String, String, String, long,
long, boolean, int, int, int, String, String, String, String,
String, String, long[], long[], long[], List, long[], List,
List, List, List, List, ServiceContext) |
User |
updateUser(long userId,
String oldPassword,
String newPassword1,
String newPassword2,
boolean passwordReset,
String reminderQueryQuestion,
String reminderQueryAnswer,
String screenName,
String emailAddress,
long facebookId,
String openId,
String languageId,
String timeZoneId,
String greeting,
String comments,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String smsSn,
String facebookSn,
String jabberSn,
String skypeSn,
String twitterSn,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
List<UserGroupRole> userGroupRoles,
long[] userGroupIds,
ServiceContext serviceContext)
Updates the user.
|
public UserServiceWrapper(UserService userService)
public void addGroupUsers(long groupId, long[] userIds, ServiceContext serviceContext) throws PortalException
addGroupUsers
in interface UserService
groupId
- the primary key of the groupuserIds
- the primary keys of the usersserviceContext
- the service context to be applied (optionally
null
)PortalException
public void addOrganizationUsers(long organizationId, long[] userIds) throws PortalException
addOrganizationUsers
in interface UserService
organizationId
- the primary key of the organizationuserIds
- the primary keys of the usersPortalException
public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds) throws PortalException
addPasswordPolicyUsers
in interface UserService
passwordPolicyId
- the primary key of the password policyuserIds
- the primary keys of the usersPortalException
public void addRoleUsers(long roleId, long[] userIds) throws PortalException
addRoleUsers
in interface UserService
roleId
- the primary key of the roleuserIds
- the primary keys of the usersPortalException
public void addTeamUsers(long teamId, long[] userIds) throws PortalException
addTeamUsers
in interface UserService
teamId
- the primary key of the teamuserIds
- the primary keys of the usersPortalException
public User addUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext) throws PortalException
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.
addUser
in interface UserService
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupssendEmail
- whether to send the user an email notification about
their new accountserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the uuid
attribute), asset category IDs, asset tag names, and expando
bridge attributes for the user.PortalException
public User addUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, boolean sendEmail, ServiceContext serviceContext) throws PortalException
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.
addUser
in interface UserService
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupsaddresses
- the user's addressesemailAddresses
- the user's email addressesphones
- the user's phone numberswebsites
- the user's websitesannouncementsDelivers
- the announcements deliveriessendEmail
- whether to send the user an email notification about
their new accountserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the uuid
attribute), asset category IDs, asset tag names, and expando
bridge attributes for the user.PortalException
public void addUserGroupUsers(long userGroupId, long[] userIds) throws PortalException
addUserGroupUsers
in interface UserService
userGroupId
- the primary key of the user groupuserIds
- the primary keys of the usersPortalException
public User addUserWithWorkflow(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, ServiceContext serviceContext) throws PortalException
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.
addUserWithWorkflow
in interface UserService
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupssendEmail
- whether to send the user an email notification about
their new accountserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the uuid
attribute), asset category IDs, asset tag names, and expando
bridge attributes for the user.PortalException
public User addUserWithWorkflow(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, boolean sendEmail, ServiceContext serviceContext) throws PortalException
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.
addUserWithWorkflow
in interface UserService
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupsaddresses
- the user's addressesemailAddresses
- the user's email addressesphones
- the user's phone numberswebsites
- the user's websitesannouncementsDelivers
- the announcements deliveriessendEmail
- whether to send the user an email notification about
their new accountserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the uuid
attribute), asset category IDs, asset tag names, and expando
bridge attributes for the user.PortalException
public void deletePortrait(long userId) throws PortalException
deletePortrait
in interface UserService
userId
- the primary key of the userPortalException
public void deleteRoleUser(long roleId, long userId) throws PortalException
deleteRoleUser
in interface UserService
roleId
- the primary key of the roleuserId
- the primary key of the userPortalException
public void deleteUser(long userId) throws PortalException
deleteUser
in interface UserService
userId
- the primary key of the userPortalException
public List<User> getCompanyUsers(long companyId, int start, int end) throws PortalException
getCompanyUsers
in interface UserService
PortalException
public int getCompanyUsersCount(long companyId) throws PortalException
getCompanyUsersCount
in interface UserService
PortalException
public User getCurrentUser() throws PortalException
getCurrentUser
in interface UserService
PortalException
public long[] getGroupUserIds(long groupId) throws PortalException
getGroupUserIds
in interface UserService
groupId
- the primary key of the groupPortalException
public List<User> getGroupUsers(long groupId) throws PortalException
getGroupUsers
in interface UserService
groupId
- the primary key of the groupPortalException
public List<User> getGroupUsers(long groupId, int status, int start, int end, OrderByComparator<User> obc) throws PortalException
getGroupUsers
in interface UserService
groupId
- the primary key of the groupstatus
- the workflow statusstart
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)PortalException
public List<User> getGroupUsers(long groupId, int status, OrderByComparator<User> obc) throws PortalException
getGroupUsers
in interface UserService
groupId
- the primary key of the groupstatus
- the workflow statusobc
- the comparator to order the users by (optionally
null
)PortalException
public int getGroupUsersCount(long groupId, int status) throws PortalException
getGroupUsersCount
in interface UserService
groupId
- the primary key of the groupstatus
- the workflow statusPortalException
public List<User> getGtCompanyUsers(long gtUserId, long companyId, int size) throws PortalException
getGtCompanyUsers
in interface UserService
PortalException
public List<User> getGtOrganizationUsers(long gtUserId, long organizationId, int size) throws PortalException
getGtOrganizationUsers
in interface UserService
PortalException
public List<User> getGtUserGroupUsers(long gtUserId, long userGroupId, int size) throws PortalException
getGtUserGroupUsers
in interface UserService
PortalException
public int getOrganizationsAndUserGroupsUsersCount(long[] organizationIds, long[] userGroupIds) throws PrincipalException
getOrganizationsAndUserGroupsUsersCount
in interface UserService
PrincipalException
public long[] getOrganizationUserIds(long organizationId) throws PortalException
getOrganizationUserIds
in interface UserService
organizationId
- the primary key of the organizationPortalException
public List<User> getOrganizationUsers(long organizationId) throws PortalException
getOrganizationUsers
in interface UserService
organizationId
- the primary key of the organizationPortalException
public List<User> getOrganizationUsers(long organizationId, int status, int start, int end, OrderByComparator<User> obc) throws PortalException
getOrganizationUsers
in interface UserService
organizationId
- the primary key of the organizationstatus
- the workflow statusstart
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)PortalException
public List<User> getOrganizationUsers(long organizationId, int status, OrderByComparator<User> obc) throws PortalException
getOrganizationUsers
in interface UserService
organizationId
- the primary key of the organizationstatus
- the workflow statusobc
- the comparator to order the users by (optionally
null
)PortalException
public int getOrganizationUsersCount(long organizationId, int status) throws PortalException
getOrganizationUsersCount
in interface UserService
organizationId
- the primary key of the organizationstatus
- the workflow statusPortalException
public String getOSGiServiceIdentifier()
getOSGiServiceIdentifier
in interface UserService
public long[] getRoleUserIds(long roleId) throws PortalException
getRoleUserIds
in interface UserService
roleId
- the primary key of the rolePortalException
public User getUserByEmailAddress(long companyId, String emailAddress) throws PortalException
getUserByEmailAddress
in interface UserService
companyId
- the primary key of the user's companyemailAddress
- the user's email addressPortalException
public User getUserById(long userId) throws PortalException
getUserById
in interface UserService
userId
- the primary key of the userPortalException
public User getUserByScreenName(long companyId, String screenName) throws PortalException
getUserByScreenName
in interface UserService
companyId
- the primary key of the user's companyscreenName
- the user's screen namePortalException
public List<User> getUserGroupUsers(long userGroupId) throws PortalException
getUserGroupUsers
in interface UserService
PortalException
public List<User> getUserGroupUsers(long userGroupId, int start, int end) throws PortalException
getUserGroupUsers
in interface UserService
PortalException
public long getUserIdByEmailAddress(long companyId, String emailAddress) throws PortalException
getUserIdByEmailAddress
in interface UserService
companyId
- the primary key of the user's companyemailAddress
- the user's email addressPortalException
public long getUserIdByScreenName(long companyId, String screenName) throws PortalException
getUserIdByScreenName
in interface UserService
companyId
- the primary key of the user's companyscreenName
- the user's screen namePortalException
public boolean hasGroupUser(long groupId, long userId) throws PortalException
true
if the user is a member of the group.hasGroupUser
in interface UserService
groupId
- the primary key of the groupuserId
- the primary key of the usertrue
if the user is a member of the group;
false
otherwisePortalException
public boolean hasRoleUser(long roleId, long userId) throws PortalException
true
if the user is a member of the role.hasRoleUser
in interface UserService
roleId
- the primary key of the roleuserId
- the primary key of the usertrue
if the user is a member of the role;
false
otherwisePortalException
public boolean hasRoleUser(long companyId, String name, long userId, boolean inherited) throws PortalException
true
if the user has the role with the name,
optionally through inheritance.hasRoleUser
in interface UserService
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
public boolean sendPasswordByEmailAddress(long companyId, String emailAddress) throws PortalException
The content of the notification email is specified with the
admin.email.password
portal property keys. They can be
overridden via a portal-ext.properties
file or modified
through the Portal Settings UI.
sendPasswordByEmailAddress
in interface UserService
companyId
- the primary key of the user's companyemailAddress
- the user's email addresstrue
if the notification email includes a new
password; false
if the notification email only
contains a reset linkPortalException
public boolean sendPasswordByScreenName(long companyId, String screenName) throws PortalException
The content of the notification email is specified with the
admin.email.password
portal property keys. They can be
overridden via a portal-ext.properties
file or modified
through the Portal Settings UI.
sendPasswordByScreenName
in interface UserService
companyId
- the primary key of the user's companyscreenName
- the user's screen nametrue
if the notification email includes a new
password; false
if the notification email only
contains a reset linkPortalException
public boolean sendPasswordByUserId(long userId) throws PortalException
The content of the notification email is specified with the
admin.email.password
portal property keys. They can be
overridden via a portal-ext.properties
file or modified
through the Portal Settings UI.
sendPasswordByUserId
in interface UserService
userId
- the user's primary keytrue
if the notification email includes a new
password; false
if the notification email only
contains a reset linkPortalException
public void setRoleUsers(long roleId, long[] userIds) throws PortalException
setRoleUsers
in interface UserService
roleId
- the primary key of the roleuserIds
- the primary keys of the usersPortalException
public void setUserGroupUsers(long userGroupId, long[] userIds) throws PortalException
setUserGroupUsers
in interface UserService
userGroupId
- the primary key of the user groupuserIds
- the primary keys of the usersPortalException
public void unsetGroupTeamsUsers(long groupId, long[] userIds) throws PortalException
unsetGroupTeamsUsers
in interface UserService
groupId
- the primary key of the groupuserIds
- the primary keys of the usersPortalException
public void unsetGroupUsers(long groupId, long[] userIds, ServiceContext serviceContext) throws PortalException
unsetGroupUsers
in interface UserService
groupId
- the primary key of the groupuserIds
- the primary keys of the usersserviceContext
- the service context to be applied (optionally
null
)PortalException
public void unsetOrganizationUsers(long organizationId, long[] userIds) throws PortalException
unsetOrganizationUsers
in interface UserService
organizationId
- the primary key of the organizationuserIds
- the primary keys of the usersPortalException
public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds) throws PortalException
unsetPasswordPolicyUsers
in interface UserService
passwordPolicyId
- the primary key of the password policyuserIds
- the primary keys of the usersPortalException
public void unsetRoleUsers(long roleId, long[] userIds) throws PortalException
unsetRoleUsers
in interface UserService
roleId
- the primary key of the roleuserIds
- the primary keys of the usersPortalException
public void unsetTeamUsers(long teamId, long[] userIds) throws PortalException
unsetTeamUsers
in interface UserService
teamId
- the primary key of the teamuserIds
- the primary keys of the usersPortalException
public void unsetUserGroupUsers(long userGroupId, long[] userIds) throws PortalException
unsetUserGroupUsers
in interface UserService
userGroupId
- the primary key of the user groupuserIds
- the primary keys of the usersPortalException
public User updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse) throws PortalException
updateAgreedToTermsOfUse
in interface UserService
userId
- the primary key of the useragreedToTermsOfUse
- whether the user has agree to the terms of usePortalException
public User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2, ServiceContext serviceContext) throws PortalException
updateEmailAddress
in interface UserService
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
public User updateIncompleteUser(long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, boolean updateUserInformation, boolean sendEmail, ServiceContext serviceContext) throws PortalException
updateIncompleteUser
in interface UserService
companyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titleupdateUserInformation
- whether to update the user's informationsendEmail
- whether to send the user an email notification about
their new accountserviceContext
- the service context to be applied (optionally
null
). Can set the expando bridge attributes for the
user.PortalException
public User updateLockoutById(long userId, boolean lockout) throws PortalException
updateLockoutById
in interface UserService
userId
- the primary key of the userlockout
- whether the user is locked outPortalException
public User updateOpenId(long userId, String openId) throws PortalException
updateOpenId
in interface UserService
userId
- the primary key of the useropenId
- the new OpenIDPortalException
public void updateOrganizations(long userId, long[] organizationIds, ServiceContext serviceContext) throws PortalException
updateOrganizations
in interface UserService
userId
- the primary key of the userorganizationIds
- the primary keys of the organizationsserviceContext
- the service context to be applied. Must set whether
user indexing is enabled.PortalException
public User updatePassword(long userId, String password1, String password2, boolean passwordReset) throws PortalException
updatePassword
in interface UserService
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
public User updatePortrait(long userId, byte[] bytes) throws PortalException
updatePortrait
in interface UserService
userId
- the primary key of the userbytes
- the new portrait image dataPortalException
public User updateReminderQuery(long userId, String question, String answer) throws PortalException
updateReminderQuery
in interface UserService
userId
- the primary key of the userquestion
- the user's new password reset questionanswer
- the user's new password reset answerPortalException
public User updateScreenName(long userId, String screenName) throws PortalException
updateScreenName
in interface UserService
userId
- the primary key of the userscreenName
- the user's new screen namePortalException
@Deprecated public User updateStatus(long userId, int status) throws PortalException
updateStatus(long, int, ServiceContext)
updateStatus
in interface UserService
userId
- the primary key of the userstatus
- the user's new workflow statusPortalException
public User updateStatus(long userId, int status, ServiceContext serviceContext) throws PortalException
updateStatus
in interface UserService
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
public User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, boolean portrait, byte[] portraitBytes, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<UserGroupRole> userGroupRoles, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, ServiceContext serviceContext) throws PortalException
updateUser
in interface UserService
userId
- the primary key of the useroldPassword
- the user's old passwordnewPassword1
- the user's new password (optionally
null
)newPassword2
- the user's new password confirmation (optionally
null
)passwordReset
- whether the user should be asked to reset their
password the next time they loginreminderQueryQuestion
- the user's new password reset questionreminderQueryAnswer
- the user's new password reset answerscreenName
- the user's new screen nameemailAddress
- the user's new email addressfacebookId
- the user's new Facebook IDopenId
- the user's new OpenIDportrait
- whether to update the user's portrait imageportraitBytes
- the new portrait image datalanguageId
- the user's new language IDtimeZoneId
- the user's new time zone IDgreeting
- the user's new greetingcomments
- the user's new commentsfirstName
- the user's new first namemiddleName
- the user's new middle namelastName
- the user's new last nameprefixId
- the user's new name prefix IDsuffixId
- the user's new name suffix IDmale
- whether user is malebirthdayMonth
- the user's new birthday month (0-based, meaning 0
for January)birthdayDay
- the user's new birthday daybirthdayYear
- the user's birthday yearsmsSn
- the user's new SMS screen namefacebookSn
- the user's new Facebook screen namejabberSn
- the user's new Jabber screen nameskypeSn
- the user's new Skype screen nametwitterSn
- the user's new Twitter screen namejobTitle
- the user's new job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the user's rolesuserGroupRoles
- the user user's group rolesuserGroupIds
- the primary keys of the user's user groupsaddresses
- the user's addressesemailAddresses
- the user's email addressesphones
- the user's phone numberswebsites
- the user's websitesannouncementsDelivers
- the announcements deliveriesserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the uuid
attribute), asset category IDs, asset tag names, and expando
bridge attributes for the user.PortalException
@Deprecated public User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<UserGroupRole> userGroupRoles, long[] userGroupIds, List<Address> addresses, List<EmailAddress> emailAddresses, List<Phone> phones, List<Website> websites, List<AnnouncementsDelivery> announcementsDelivers, ServiceContext serviceContext) throws PortalException
updateUser(long, String, String, String, boolean, String,
String, String, String, long, String, boolean, byte[],
String, String, String, String, String, String, String, long,
long, boolean, int, int, int, String, String, String, String,
String, String, long[], long[], long[], List, long[], List,
List, List, List, List, ServiceContext)
updateUser
in interface UserService
userId
- the primary key of the useroldPassword
- the user's old passwordnewPassword1
- the user's new password (optionally
null
)newPassword2
- the user's new password confirmation (optionally
null
)passwordReset
- whether the user should be asked to reset their
password the next time they loginreminderQueryQuestion
- the user's new password reset questionreminderQueryAnswer
- the user's new password reset answerscreenName
- the user's new screen nameemailAddress
- the user's new email addressfacebookId
- the user's new Facebook IDopenId
- the user's new OpenIDlanguageId
- the user's new language IDtimeZoneId
- the user's new time zone IDgreeting
- the user's new greetingcomments
- the user's new commentsfirstName
- the user's new first namemiddleName
- the user's new middle namelastName
- the user's new last nameprefixId
- the user's new name prefix IDsuffixId
- the user's new name suffix IDmale
- whether user is malebirthdayMonth
- the user's new birthday month (0-based, meaning
0 for January)birthdayDay
- the user's new birthday daybirthdayYear
- the user's birthday yearsmsSn
- the user's new SMS screen namefacebookSn
- the user's new Facebook screen namejabberSn
- the user's new Jabber screen nameskypeSn
- the user's new Skype screen nametwitterSn
- the user's new Twitter screen namejobTitle
- the user's new job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the user's rolesuserGroupRoles
- the user user's group rolesuserGroupIds
- the primary keys of the user's user groupsaddresses
- the user's addressesemailAddresses
- the user's email addressesphones
- the user's phone numberswebsites
- the user's websitesannouncementsDelivers
- the announcements deliveriesserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the
uuid
attribute), asset category IDs, asset tag
names, and expando bridge attributes for the user.PortalException
public User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<UserGroupRole> userGroupRoles, long[] userGroupIds, ServiceContext serviceContext) throws PortalException
updateUser
in interface UserService
userId
- the primary key of the useroldPassword
- the user's old passwordnewPassword1
- the user's new password (optionally
null
)newPassword2
- the user's new password confirmation (optionally
null
)passwordReset
- whether the user should be asked to reset their
password the next time they loginreminderQueryQuestion
- the user's new password reset questionreminderQueryAnswer
- the user's new password reset answerscreenName
- the user's new screen nameemailAddress
- the user's new email addressfacebookId
- the user's new Facebook IDopenId
- the user's new OpenIDlanguageId
- the user's new language IDtimeZoneId
- the user's new time zone IDgreeting
- the user's new greetingcomments
- the user's new commentsfirstName
- the user's new first namemiddleName
- the user's new middle namelastName
- the user's new last nameprefixId
- the user's new name prefix IDsuffixId
- the user's new name suffix IDmale
- whether user is malebirthdayMonth
- the user's new birthday month (0-based, meaning 0
for January)birthdayDay
- the user's new birthday daybirthdayYear
- the user's birthday yearsmsSn
- the user's new SMS screen namefacebookSn
- the user's new Facebook screen namejabberSn
- the user's new Jabber screen nameskypeSn
- the user's new Skype screen nametwitterSn
- the user's new Twitter screen namejobTitle
- the user's new job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the user's rolesuserGroupRoles
- the user user's group rolesuserGroupIds
- the primary keys of the user's user groupsserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the uuid
attribute), asset category IDs, asset tag names, and expando
bridge attributes for the user.PortalException
public UserService getWrappedService()
getWrappedService
in interface ServiceWrapper<UserService>
public void setWrappedService(UserService userService)
setWrappedService
in interface ServiceWrapper<UserService>