public class IdentityServiceImpl extends java.lang.Object implements IdentityService
CUSTOM_USER_INFO_DEFINITION, CUSTOM_USER_INFO_VALUE, GROUP, ICON, ROLE, USER, USER_CONTACT_INFO, USER_LOGIN, USERMEMBERSHIP
Constructor and Description |
---|
IdentityServiceImpl(ReadPersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService,
CredentialsEncrypter encrypter) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkCredentials(SUser user,
java.lang.String password)
Checks whether the couple user/password is valid.
|
SCustomUserInfoDefinition |
createCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo)
Create custom user info definition in DB for a server given custom user info definition
|
SCustomUserInfoValue |
createCustomUserInfoValue(SCustomUserInfoValue customUserInfo)
Create profileMetadataValue in DB for give profileMetadataValue object
|
void |
createGroup(SGroup group,
java.lang.String iconFileName,
byte[] iconContent)
Create group in DB for the given group object
|
void |
createRole(SRole role,
java.lang.String iconFilename,
byte[] iconContent)
Create role in DB for the given role
|
SUser |
createUser(SUser user)
Create
SUser and store it to persistence layer |
SUser |
createUser(SUser sUser,
SContactInfo personalContactInfo,
SContactInfo proContactInfo,
java.lang.String iconFilename,
byte[] iconContent)
create a new user in database along with its contact data
|
SContactInfo |
createUserContactInfo(SContactInfo contactInfo)
Create user contact information for given data
|
void |
createUserMembership(SUserMembership userMembership)
Create userMembership in DB for the given userMembership object
|
SUser |
createUserWithoutEncryptingPassword(SUser user)
Deprecated.
|
void |
deleteAllGroups()
Delete all groups for the connected tenant
|
void |
deleteAllRoles()
Delete all roles for the connected tenant
|
void |
deleteAllUserMemberships()
Delete all user memberships for the connected tenant
|
void |
deleteAllUsers()
Delete all users for the connected tenant
|
java.util.List<java.lang.Long> |
deleteChildrenGroup(long groupId)
delete children groups of the given group if there is some
|
void |
deleteCustomUserInfoDefinition(long customUserInfoDefinitionId)
Delete the id specified custom user info
|
void |
deleteCustomUserInfoDefinition(SCustomUserInfoDefinition info)
Delete the specific custom user info
|
void |
deleteCustomUserInfoValue(long customUserInfoValueId)
Delete the id specified profileMetadataValue
|
void |
deleteCustomUserInfoValue(SCustomUserInfoValue customUserInfo)
Delete the specific profileMetadataValue
|
void |
deleteGroup(long groupId)
Delete the id specified group
|
void |
deleteGroup(SGroup group)
Delete the specific group
|
void |
deleteLightUserMembership(SUserMembership userMembership)
Delete the specific light userMembership
|
void |
deleteRole(long roleId)
Delete the id specified role
|
void |
deleteRole(SRole role)
Delete the specific role
|
void |
deleteUser(long userId)
Delete user by its id
|
void |
deleteUser(SUser user)
Delete the specific user
|
void |
deleteUserMembership(long id)
Delete the id specified userMembership
|
void |
deleteUserMembership(SUserMembership userMembership)
Delete the specific userMembership
|
java.util.List<SUser> |
getActiveUsersInGroup(long groupId,
int fromIndex,
int numberOfUsers,
java.lang.String field,
OrderByType order)
Get a
List of Active SUser for given SGroup from specific interval, sorted by
field attribute in the given
OrderByType
order order. |
java.util.List<SUser> |
getActiveUsersWithManager(long managerId,
int fromIndex,
int numberMaxOfUsers,
java.lang.String field,
OrderByType order)
Get all active users managed by a specific manager from a specific interval.
|
java.util.List<SUser> |
getActiveUsersWithRole(long roleId,
int fromIndex,
int numberOfUsers)
|
java.util.List<SUser> |
getActiveUsersWithRole(long roleId,
int fromIndex,
int numberOfUsers,
java.lang.String field,
OrderByType order)
Get a
List of active SUser for given SRole from specific interval, sorted by field
attribute in the given
OrderByType
order order. |
SCustomUserInfoDefinition |
getCustomUserInfoDefinition(long customUserInfoDefinitionId)
Get
SCustomUserInfoDefinition by its id |
SCustomUserInfoDefinition |
getCustomUserInfoDefinitionByName(java.lang.String name)
Get a
SCustomUserInfoDefinition by its name |
java.util.List<SCustomUserInfoDefinition> |
getCustomUserInfoDefinitions(int fromIndex,
int maxResults)
Get a
List of SCustomUserInfoDefinition from specific interval |
java.util.List<SCustomUserInfoDefinition> |
getCustomUserInfoDefinitions(java.util.List<java.lang.Long> customUserInfoDefinitionIds)
Get a
List of SCustomUserInfoDefinition of the given identifiers |
SCustomUserInfoValue |
getCustomUserInfoValue(long customUserInfoValueId)
Get
SCustomUserInfoValue by its id |
java.util.List<SCustomUserInfoValue> |
getCustomUserInfoValueOfUserAndDefinitions(long userId,
java.util.List<java.lang.Long> definitionsIds)
Get SCustomUserInfoValues of definitions for a user
|
java.util.List<SCustomUserInfoValue> |
getCustomUserInfoValues(java.util.List<java.lang.Long> customUserInfoValueIds)
Get a
List of SCustomUserInfoValue of the given identifiers |
SGroup |
getGroup(long groupId)
Get
SGroup by its identifier |
SGroup |
getGroupByPath(java.lang.String groupPath)
Get the
SGroup by its path |
java.util.List<SGroup> |
getGroupChildren(long groupId,
int fromIndex,
int numberOfGroups)
Get a
List child SGroup in a specific interval for specific group. |
java.util.List<SGroup> |
getGroupChildren(long groupId,
int fromIndex,
int numberOfGroups,
java.lang.String field,
OrderByType order)
Get a
List of child SGroup in specific interval, sorted by field attribute in the given
OrderByType order. |
java.util.List<SGroup> |
getGroups(int fromIndex,
int numberOfGroups)
Get a
List of SGroup in a specific interval, this is used for pagination
If the number of existing results are lower than the number asked, all results from the given index are
retrieved. |
java.util.List<SGroup> |
getGroups(int fromIndex,
int numberOfGroups,
java.lang.String field,
OrderByType order)
Get a
List of SGroup in specific interval, sorted by field attribute in the given
OrderByType order. |
java.util.List<SGroup> |
getGroups(java.util.List<java.lang.Long> groupIds)
Get a
List of SGroup for specific groupIds |
SIcon |
getIcon(long id)
get the icon using its id
|
java.util.List<SUser> |
getInactiveUsersInGroup(long groupId,
int fromIndex,
int numberOfUsers,
java.lang.String field,
OrderByType order)
Get a
List of Inactive SUser for given SGroup from specific interval, sorted by
field attribute in the given
OrderByType
order order. |
java.util.List<SUser> |
getInactiveUsersWithManager(long managerId,
int fromIndex,
int numberMaxOfUsers,
java.lang.String field,
OrderByType order)
Get all inactive users managed by a specific manager from a specific interval.
|
java.util.List<SUser> |
getInactiveUsersWithRole(long roleId,
int fromIndex,
int numberOfUsers)
|
java.util.List<SUser> |
getInactiveUsersWithRole(long roleId,
int fromIndex,
int numberOfUsers,
java.lang.String field,
OrderByType order)
Get a
List of Inactive SUser for given SRole from specific interval, sorted by
field attribute in the given
OrderByType
order order. |
SUserMembership |
getLightUserMembership(long userMembershipId)
Get light userMembership by its id
|
SUserMembership |
getLightUserMembership(long userId,
long groupId,
long roleId)
Get the
SUserMembership of the specific user, group and role without userName, groupName and roleName
being set. |
java.util.List<SUserMembership> |
getLightUserMemberships(int startIndex,
int numberOfElements)
Get light userMembership in a specific interval, this is used for pagination
|
long |
getNumberOfCustomUserInfoDefinition()
Get total number of
SCustomUserInfoDefinition of the current tenant |
long |
getNumberOfCustomUserInfoValue(QueryOptions options)
Get total number of
SCustomUserInfoValue of the current tenant matching the criterias of the given
QueryOptions |
long |
getNumberOfGroupChildren(long parentGroupId)
Get number of child groups for the group identified by the given id
|
long |
getNumberOfGroups()
Get total number of
SGroup in the current tenant |
long |
getNumberOfGroups(QueryOptions options)
Get total number of groups according to specific query options
|
long |
getNumberOfRoles()
Get total number of
SRole for this tenant |
long |
getNumberOfRoles(QueryOptions options)
Get total number of roles according to specific query options
|
long |
getNumberOfUserMemberships()
Get total number of userMemberships of the current tenant
|
long |
getNumberOfUserMembershipsOfUser(long userId)
Get total number of
SUserMembership for a specific user |
long |
getNumberOfUsers()
Get total number of
SUser on the current tenant |
long |
getNumberOfUsers(QueryOptions options)
Get total number of users according to specific query options
|
long |
getNumberOfUsersByGroup(long groupId)
Get total number of users for the given
SGroup |
long |
getNumberOfUsersByMembership(long groupId,
long roleId)
Get total number of userMemberships contains specific group and role
|
long |
getNumberOfUsersByRole(long roleId)
Get total number of users for the given role on the current tenant
|
SRole |
getRole(long roleId)
Gets the
SRole given by its identifier. |
SRole |
getRoleByName(java.lang.String roleName)
Get the
SRole given by its name. |
java.util.List<SRole> |
getRoles(int fromIndex,
int numberOfRoles)
Get a
List of SRole in specific interval
If the number of existing results are lower than the number asked, all results from the given index are
retrieved. |
java.util.List<SRole> |
getRoles(int fromIndex,
int numberOfRoles,
java.lang.String field,
OrderByType order)
|
java.util.List<SRole> |
getRoles(java.util.List<java.lang.Long> roleIds)
Get a
List of SRole by their identifiers |
SUser |
getUser(long userId)
Get
SUser by its id |
SUser |
getUserByUserName(java.lang.String userName)
Get
SUser by its name |
SContactInfo |
getUserContactInfo(long userId,
boolean isPersonal)
Return the user contact info for a specific user.
|
java.util.List<java.lang.Long> |
getUserIdsWithCustomUserInfo(java.lang.String userInfoName,
java.lang.String userInfoValue,
boolean usePartialMatch,
int fromIndex,
int maxResults)
Retrieve a
List of user identifiers from specific interval. |
SUserMembership |
getUserMembership(long userMembershipId)
Get
SUserMembership by given id |
SUserMembership |
getUserMembership(long userId,
long groupId,
long roleId)
|
java.util.List<SUserMembership> |
getUserMemberships(int fromIndex,
int numberOfUserMemberships)
Get a
List of SUserMembership from specific interval |
java.util.List<SUserMembership> |
getUserMemberships(int fromIndex,
int numberOfResult,
OrderByOption orderByOption)
Get a
List of SUserMembership from specific interval, sorted by field attribute in the
given OrderByType order
order. |
java.util.List<SUserMembership> |
getUserMemberships(java.util.List<java.lang.Long> userMembershipIds)
Get a
List of SUserMembership of the given identifiers if they exists |
java.util.List<SUserMembership> |
getUserMembershipsOfGroup(long groupId,
int startIndex,
int maxResults)
Get a
List of SUserMembership for given group from specific interval |
java.util.List<SUserMembership> |
getUserMembershipsOfRole(long roleId,
int startIndex,
int maxResults)
Get a
List of SUserMembership for given role from specific interval |
java.util.List<SUserMembership> |
getUserMembershipsOfUser(long userId,
int fromIndex,
int numberOfUsers)
Get
SUserMembership for a specific interval for a given user |
java.util.List<SUserMembership> |
getUserMembershipsOfUser(long userId,
int fromIndex,
int numberPerPage,
OrderByOption orderByOption)
Get a
List of SUserMembership of a given user from specific interval, sorted by default field in
the given OrderByType
sortOrder order. |
java.util.List<SUserMembership> |
getUserMembershipsOfUser(long userId,
int fromIndex,
int numberOfMemberships,
java.lang.String field,
OrderByType order)
Get a
List of SUserMembership of a given user from specific interval, sorted by field
attribute in the given OrderByType
sortOrder order. |
java.util.List<SUser> |
getUsers(int fromIndex,
int numberOfUsers)
Get a
List of SUser from a specific interval. |
java.util.List<SUser> |
getUsers(int fromIndex,
int numberOfUsers,
java.lang.String field,
OrderByType order)
Get a
List of child SUser from specific interval, sorted by field attribute in the given
OrderByType order order. |
java.util.List<SUser> |
getUsers(java.util.List<java.lang.Long> userIds)
Get
SUser by their userIds |
java.util.List<SUser> |
getUsersByUsername(java.util.List<java.lang.String> userNames)
retrieve a
List of SUser from their names. |
java.util.List<SUser> |
getUsersInGroup(long groupId,
int fromIndex,
int numberOfUsers,
java.lang.String field,
OrderByType order)
Get a
List of SUser for given SGroup from specific interval, sorted by field
attribute in the given OrderByType
order order. |
java.util.List<SUser> |
getUsersWithManager(long managerId,
int fromIndex,
int numberMaxOfUsers,
java.lang.String field,
OrderByType order)
Get all users (both active and inactive) managed by a specific manager from a specific interval.
|
java.util.List<SUser> |
getUsersWithRole(long roleId,
int fromIndex,
int numberOfUsers)
|
java.util.List<SUser> |
getUsersWithRole(long roleId,
int fromIndex,
int numberOfUsers,
java.lang.String field,
OrderByType order)
Get a
List of SUser for given SRole from specific interval, sorted by field
attribute in the given OrderByType
order order. |
boolean |
hasCustomUserInfoDefinition(java.lang.String name)
Verify if there is a
SCustomUserInfoDefinition of the given name |
java.util.List<SCustomUserInfoValue> |
searchCustomUserInfoValue(QueryOptions options)
Search
SCustomUserInfoValue matching the criterias of the given QueryOptions |
java.util.List<SGroup> |
searchGroups(QueryOptions options)
Search groups according to specific query options
|
java.util.List<SRole> |
searchRoles(QueryOptions options)
Search roles according to specific query options
|
java.util.List<SUser> |
searchUsers(QueryOptions options)
Search users according to specific query options
|
void |
updateCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo,
EntityUpdateDescriptor descriptor)
Update customUserInfoDefinition according to the descriptor
|
void |
updateCustomUserInfoValue(SCustomUserInfoValue customUserInfo,
EntityUpdateDescriptor descriptor)
Update profileMetadataValue according to the descriptor
|
void |
updateGroup(SGroup group,
EntityUpdateDescriptor descriptor,
EntityUpdateDescriptor iconUpdater)
Update group according to the descriptor
|
SRole |
updateRole(SRole role,
EntityUpdateDescriptor descriptor,
EntityUpdateDescriptor iconUpdater)
Update role according to the descriptor
|
SUser |
updateUser(long userId,
EntityUpdateDescriptor userUpdateDescriptor,
EntityUpdateDescriptor personalDataUpdateDescriptor,
EntityUpdateDescriptor professionalDataUpdateDescriptor,
EntityUpdateDescriptor iconUpdater)
Update the user having id userId according to the entity update descriptors in parameters
|
void |
updateUser(SUser user,
EntityUpdateDescriptor descriptor)
Update
SUser according to the EntityUpdateDescriptor |
void |
updateUser(SUser user,
EntityUpdateDescriptor descriptor,
boolean isPasswordEncrypted)
Deprecated.
|
void |
updateUserContactInfo(SContactInfo contactInfo,
EntityUpdateDescriptor descriptor)
Update user contact information according to the descriptor
|
void |
updateUserMembership(SUserMembership userMembership,
EntityUpdateDescriptor descriptor)
Update userMembership according to the descriptor
|
public IdentityServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, EventService eventService, TechnicalLoggerService logger, QueriableLoggerService queriableLoggerService, CredentialsEncrypter encrypter)
public void createGroup(SGroup group, java.lang.String iconFileName, byte[] iconContent) throws SGroupCreationException
IdentityService
createGroup
in interface IdentityService
group
- A group objectSGroupCreationException
public SCustomUserInfoDefinition createCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo) throws SCustomUserInfoDefinitionAlreadyExistsException, SCustomUserInfoDefinitionCreationException
IdentityService
createCustomUserInfoDefinition
in interface IdentityService
customUserInfo
- SCustomUserInfoDefinition objectSCustomUserInfoDefinitionAlreadyExistsException
- TODOSCustomUserInfoDefinitionCreationException
- TODOpublic SCustomUserInfoValue createCustomUserInfoValue(SCustomUserInfoValue customUserInfo) throws SIdentityException
IdentityService
createCustomUserInfoValue
in interface IdentityService
customUserInfo
- A profileMetadataValue objectSIdentityException
public void createRole(SRole role, java.lang.String iconFilename, byte[] iconContent) throws SIdentityException
IdentityService
createRole
in interface IdentityService
role
- A role objectSIdentityException
public SUser createUser(SUser user) throws SUserCreationException
IdentityService
SUser
and store it to persistence layercreateUser
in interface IdentityService
user
- The user to create and storeSUserCreationException
- occurs on persistence layer access problem@Deprecated public SUser createUserWithoutEncryptingPassword(SUser user) throws SUserCreationException
IdentityService
createUserWithoutEncryptingPassword
in interface IdentityService
user
- The user objectSUserCreationException
public SContactInfo createUserContactInfo(SContactInfo contactInfo) throws SUserCreationException
IdentityService
createUserContactInfo
in interface IdentityService
contactInfo
- The user contact information objectSUserCreationException
public void createUserMembership(SUserMembership userMembership) throws SUserMembershipCreationException
IdentityService
createUserMembership
in interface IdentityService
userMembership
- A userMembership objectSUserMembershipCreationException
public void deleteGroup(long groupId) throws SGroupNotFoundException, SGroupDeletionException
IdentityService
deleteGroup
in interface IdentityService
groupId
- The identifier of groupSGroupNotFoundException
- Error occurs when no group found with the specific groupIdSGroupDeletionException
public void deleteGroup(SGroup group) throws SGroupDeletionException
IdentityService
deleteGroup
in interface IdentityService
group
- The group will be deletedSGroupDeletionException
public void deleteAllGroups() throws SGroupDeletionException
IdentityService
deleteAllGroups
in interface IdentityService
SGroupDeletionException
public java.util.List<java.lang.Long> deleteChildrenGroup(long groupId) throws SGroupDeletionException, SGroupNotFoundException
IdentityService
deleteChildrenGroup
in interface IdentityService
groupId
- The index of the group to deleteSGroupDeletionException
SGroupNotFoundException
public void deleteCustomUserInfoDefinition(long customUserInfoDefinitionId) throws SIdentityException
IdentityService
deleteCustomUserInfoDefinition
in interface IdentityService
customUserInfoDefinitionId
- The identifier of custom user infoSIdentityException
public void deleteCustomUserInfoDefinition(SCustomUserInfoDefinition info) throws SIdentityException
IdentityService
deleteCustomUserInfoDefinition
in interface IdentityService
info
- The custom user info object will be deletedSIdentityException
public void deleteCustomUserInfoValue(long customUserInfoValueId) throws SIdentityException
IdentityService
deleteCustomUserInfoValue
in interface IdentityService
customUserInfoValueId
- The identifier of profileMetadataValueSIdentityException
public void deleteCustomUserInfoValue(SCustomUserInfoValue customUserInfo) throws SIdentityException
IdentityService
deleteCustomUserInfoValue
in interface IdentityService
customUserInfo
- The profileMetadataValue object will be deletedSIdentityException
public void deleteRole(long roleId) throws SRoleNotFoundException, SRoleDeletionException
IdentityService
deleteRole
in interface IdentityService
roleId
- The role identifierSRoleNotFoundException
- Error occurs when no role found with the specific roleIdSRoleDeletionException
public void deleteRole(SRole role) throws SRoleDeletionException
IdentityService
deleteRole
in interface IdentityService
role
- The role will be deletedSRoleDeletionException
public void deleteAllRoles() throws SRoleDeletionException
IdentityService
deleteAllRoles
in interface IdentityService
SRoleDeletionException
public void deleteUser(long userId) throws SUserDeletionException
IdentityService
deleteUser
in interface IdentityService
userId
- The identifier of userSUserDeletionException
public void deleteUser(SUser user) throws SUserDeletionException
IdentityService
deleteUser
in interface IdentityService
user
- The user will be deletedSUserDeletionException
public void deleteAllUsers() throws SUserDeletionException
IdentityService
deleteAllUsers
in interface IdentityService
SUserDeletionException
public SUserMembership getLightUserMembership(long userMembershipId) throws SIdentityException
IdentityService
getLightUserMembership
in interface IdentityService
userMembershipId
- The identifier of userMembershipSIdentityException
public void deleteUserMembership(SUserMembership userMembership) throws SMembershipDeletionException
IdentityService
deleteUserMembership
in interface IdentityService
userMembership
- The userMembership will be deletedSMembershipDeletionException
public void deleteUserMembership(long id) throws SMembershipDeletionException
IdentityService
deleteUserMembership
in interface IdentityService
id
- The identifier of userMembershipSMembershipDeletionException
public void deleteLightUserMembership(SUserMembership userMembership) throws SMembershipDeletionException
IdentityService
deleteLightUserMembership
in interface IdentityService
SMembershipDeletionException
public void deleteAllUserMemberships() throws SMembershipDeletionException
IdentityService
deleteAllUserMemberships
in interface IdentityService
SMembershipDeletionException
public SGroup getGroup(long groupId) throws SGroupNotFoundException
IdentityService
SGroup
by its identifiergetGroup
in interface IdentityService
groupId
- The group identifierSGroupNotFoundException
- occurs when the groupId does not refer to any group.public java.util.List<SGroup> getGroupChildren(long groupId, int fromIndex, int numberOfGroups) throws SIdentityException
IdentityService
List
child SGroup
in a specific interval for specific group. This is used for pagination
If the number of existing results are lower than the number asked, all results from the given index are
retrieved.getGroupChildren
in interface IdentityService
groupId
- The parent group identifierfromIndex
- Index of the record to be retrieved from. First record has index 0numberOfGroups
- Number of result to retrieveList
of child SGroup
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SGroup> getGroupChildren(long groupId, int fromIndex, int numberOfGroups, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of child SGroup
in specific interval, sorted by field attribute in the given
OrderByType
order.
For instance, getGroupChildren(0,10,"displayName", OrderByType.DESC) returns the 10 first child
SGroup
of the parent SGroup
identified by parentGroupId sorted by "displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SGroupBuilderFactory
to get a list of available field keys to sort
getGroupChildren
in interface IdentityService
groupId
- The parent group identifierfromIndex
- Index of the record to be retrieved from. First record has index 0numberOfGroups
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of child SGroup
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SGroup> getGroups(int fromIndex, int numberOfGroups) throws SIdentityException
IdentityService
List
of SGroup
in a specific interval, this is used for pagination
If the number of existing results are lower than the number asked, all results from the given index are
retrieved.getGroups
in interface IdentityService
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfGroups
- Number of result to retrieveList
of SGroup
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SGroup> getGroups(int fromIndex, int numberOfGroups, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of SGroup
in specific interval, sorted by field attribute in the given
OrderByType
order.
For instance, getGroups(0,10,"displayName", OrderByType.DESC) returns the 10 first SGroup
sorted by
"displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SGroupBuilderFactory
to get a list of available field keys to sort
getGroups
in interface IdentityService
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfGroups
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of paginated SGroup
objectsSIdentityException
- occurs on persistence layer access problemSGroupBuilderFactory
public java.util.List<SGroup> getGroups(java.util.List<java.lang.Long> groupIds) throws SGroupNotFoundException
IdentityService
List
of SGroup
for specific groupIdsgetGroups
in interface IdentityService
groupIds
- The group identifiersList
of SGroup
objectSGroupNotFoundException
- occurs when no given group identifiers refer to any group.public java.util.List<SUserMembership> getUserMemberships(int fromIndex, int numberOfResult, OrderByOption orderByOption) throws SIdentityException
IdentityService
List
of SUserMembership
from specific interval, sorted by field attribute in the
given OrderByType
order
order.
For instance, getUserMemberships(0,10,"id", OrderByType.DESC) returns the 10 first SUserMembership
sorted by
"displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SUserMembershipBuilderFactory
to check available field keys to sort
getUserMemberships
in interface IdentityService
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfResult
- Number of result to retrieveList
of SUserMembership
SIdentityException
- occurs on persistence layer access problemSUserMembershipBuilderFactory
public java.util.List<SUserMembership> getUserMembershipsOfGroup(long groupId, int startIndex, int maxResults) throws SIdentityException
IdentityService
List
of SUserMembership
for given group from specific interval
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
getUserMembershipsOfGroup
in interface IdentityService
groupId
- Identifier of the groupstartIndex
- Index of the record to be retrieved from. First record has index 0maxResults
- Number of result to retrieveList
of SUserMembership
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUserMembership> getUserMembershipsOfRole(long roleId, int startIndex, int maxResults) throws SIdentityException
IdentityService
List
of SUserMembership
for given role from specific interval
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
getUserMembershipsOfRole
in interface IdentityService
roleId
- Identifier of the rolestartIndex
- Index of the record to be retrieved from. First record has index 0maxResults
- Number of result to retrieveList
of SUserMembership
SIdentityException
- occurs on persistence layer access problempublic long getNumberOfGroupChildren(long parentGroupId) throws SIdentityException
IdentityService
getNumberOfGroupChildren
in interface IdentityService
parentGroupId
- The parent group identifierSIdentityException
- occurs on persistence layer access problempublic long getNumberOfGroups() throws SIdentityException
IdentityService
SGroup
in the current tenantgetNumberOfGroups
in interface IdentityService
SGroup
SIdentityException
- occurs on persistence layer access problempublic long getNumberOfCustomUserInfoDefinition() throws SIdentityException
IdentityService
SCustomUserInfoDefinition
of the current tenantgetNumberOfCustomUserInfoDefinition
in interface IdentityService
SCustomUserInfoDefinition
of the current tenantSIdentityException
- occurs on persistence layer access problempublic long getNumberOfCustomUserInfoValue(QueryOptions options) throws SBonitaReadException
IdentityService
SCustomUserInfoValue
of the current tenant matching the criterias of the given
QueryOptions
getNumberOfCustomUserInfoValue
in interface IdentityService
options
- The QueryOptions
containing filtering conditionsSBonitaReadException
public long getNumberOfRoles() throws SIdentityException
IdentityService
SRole
for this tenantgetNumberOfRoles
in interface IdentityService
SIdentityException
- occurs on persistence layer access problempublic long getNumberOfUsers() throws SIdentityException
IdentityService
SUser
on the current tenantgetNumberOfUsers
in interface IdentityService
SIdentityException
- occurs on persistence layer access problempublic long getNumberOfUserMembershipsOfUser(long userId) throws SIdentityException
IdentityService
SUserMembership
for a specific usergetNumberOfUserMembershipsOfUser
in interface IdentityService
userId
- The user's identifierSIdentityException
- occurs on persistence layer access problempublic long getNumberOfUsersByGroup(long groupId) throws SIdentityException
IdentityService
SGroup
getNumberOfUsersByGroup
in interface IdentityService
groupId
- The identifier of the SGroup
SIdentityException
- occurs on persistence layer access problempublic long getNumberOfUsersByRole(long roleId) throws SIdentityException
IdentityService
getNumberOfUsersByRole
in interface IdentityService
roleId
- The identifier of roleSIdentityException
- occurs on persistence layer access problempublic long getNumberOfUsersByMembership(long groupId, long roleId) throws SIdentityException
IdentityService
getNumberOfUsersByMembership
in interface IdentityService
groupId
- The identifier of grouproleId
- The identifier of roleSIdentityException
public SCustomUserInfoDefinition getCustomUserInfoDefinitionByName(java.lang.String name) throws SCustomUserInfoDefinitionNotFoundException, SCustomUserInfoDefinitionReadException
IdentityService
SCustomUserInfoDefinition
by its namegetCustomUserInfoDefinitionByName
in interface IdentityService
name
- The name of the SCustomUserInfoDefinition
to retrieveSCustomUserInfoDefinition
identified by the given nameSCustomUserInfoDefinitionNotFoundException
- if there is no custom user info definition for the given nameSCustomUserInfoDefinitionReadException
- if an exception occurs when trying to retrieve the custom user info definitionpublic boolean hasCustomUserInfoDefinition(java.lang.String name) throws SCustomUserInfoDefinitionReadException
IdentityService
SCustomUserInfoDefinition
of the given namehasCustomUserInfoDefinition
in interface IdentityService
name
- The SCustomUserInfoDefinition
's name to checkSCustomUserInfoDefinition
of the given nameSCustomUserInfoDefinitionReadException
- if an exception occurs when trying to retrieve the custom user info definitionpublic java.util.List<SCustomUserInfoDefinition> getCustomUserInfoDefinitions(int fromIndex, int maxResults) throws SIdentityException
IdentityService
List
of SCustomUserInfoDefinition
from specific interval
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
getCustomUserInfoDefinitions
in interface IdentityService
fromIndex
- Index of the record to be retrieved from. First record has index 0maxResults
- Number of result to retrieveList
of SCustomUserInfoDefinition
SIdentityException
- occurs on persistence layer access problempublic java.util.List<java.lang.Long> getUserIdsWithCustomUserInfo(java.lang.String userInfoName, java.lang.String userInfoValue, boolean usePartialMatch, int fromIndex, int maxResults) throws SIdentityException
IdentityService
List
of user identifiers from specific interval. The returned user's ids have their associated
user's userInfo of the given
name userInfoName matches the given value userInfoValue partially or not depending on the
usePartialMatch parameter.
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
getUserIdsWithCustomUserInfo
in interface IdentityService
userInfoName
- The user's information name.userInfoValue
- The user's information value.usePartialMatch
- Defines whether the custom user information value should use a partial match.fromIndex
- The index of the first record to be retrieved. First record has index 0.maxResults
- The max results to be retrieved.SIdentityException
- occurs on persistence layer access problempublic SCustomUserInfoDefinition getCustomUserInfoDefinition(long customUserInfoDefinitionId) throws SIdentityException
IdentityService
SCustomUserInfoDefinition
by its idgetCustomUserInfoDefinition
in interface IdentityService
customUserInfoDefinitionId
- The SCustomUserInfoDefinition
's identifierSIdentityException
- occurs on persistence layer access problempublic java.util.List<SCustomUserInfoDefinition> getCustomUserInfoDefinitions(java.util.List<java.lang.Long> customUserInfoDefinitionIds) throws SIdentityException
IdentityService
List
of SCustomUserInfoDefinition
of the given identifiersgetCustomUserInfoDefinitions
in interface IdentityService
customUserInfoDefinitionIds
- A List
of SCustomUserInfoDefinition
identifiersList
of SCustomUserInfoDefinition
SIdentityException
- occurs on persistence layer access problem or if none identifiers match an existing
SCustomUserInfoDefinition
public SCustomUserInfoValue getCustomUserInfoValue(long customUserInfoValueId) throws SCustomUserInfoValueNotFoundException, SCustomUserInfoValueReadException
IdentityService
SCustomUserInfoValue
by its idgetCustomUserInfoValue
in interface IdentityService
customUserInfoValueId
- The identifier of the custom user info valueSCustomUserInfoValue
SCustomUserInfoValueNotFoundException
- if no custom user info value is found for the given idSCustomUserInfoValueReadException
- if an exception occurs while trying to get the custom user info valuepublic java.util.List<SCustomUserInfoValue> getCustomUserInfoValues(java.util.List<java.lang.Long> customUserInfoValueIds) throws SIdentityException
IdentityService
List
of SCustomUserInfoValue
of the given identifiersgetCustomUserInfoValues
in interface IdentityService
customUserInfoValueIds
- A List
of SCustomUserInfoValue
identifiersList
of SCustomUserInfoValue
SIdentityException
- occurs on persistence layer access problem or if none identifiers match an existing
SCustomUserInfoDefinition
public SRole getRole(long roleId) throws SRoleNotFoundException
IdentityService
SRole
given by its identifier.getRole
in interface IdentityService
roleId
- the role identifierSRoleNotFoundException
- occurs when the roleId does not refer to any role.public SRole getRoleByName(java.lang.String roleName) throws SRoleNotFoundException
IdentityService
SRole
given by its name.getRoleByName
in interface IdentityService
roleName
- The name of roleSRoleNotFoundException
- occurs when the roleName does not refer to any role.public SGroup getGroupByPath(java.lang.String groupPath) throws SGroupNotFoundException
IdentityService
SGroup
by its pathgetGroupByPath
in interface IdentityService
groupPath
- The group pathSGroupNotFoundException
- Occurs when the groupPath does not refer to any group.public java.util.List<SRole> getRoles(int fromIndex, int numberOfRoles) throws SIdentityException
IdentityService
List
of SRole
in specific interval
If the number of existing results are lower than the number asked, all results from the given index are
retrieved.getRoles
in interface IdentityService
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfRoles
- Number of result to retrieveSIdentityException
- occurs on persistence layer access problempublic java.util.List<SRole> getRoles(int fromIndex, int numberOfRoles, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of SRole
in specific interval, sorted by field attribute in the given
OrderByType
order.
For instance, getRoles(0,10,"displayName", OrderByType.DESC) returns the 10 first roles sorted by "displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SRoleBuilderFactory
to get a list of available field keys to sort
getRoles
in interface IdentityService
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfRoles
- Number of result to retrievefield
- The field used by the sortorder
- ASC or DESCSIdentityException
- occurs on persistence layer access problemto get a list of available field keys to use
public java.util.List<SRole> getRoles(java.util.List<java.lang.Long> roleIds) throws SRoleNotFoundException
IdentityService
List
of SRole
by their identifiersgetRoles
in interface IdentityService
roleIds
- the role identifiersSRole
objectsSRoleNotFoundException
- Occurs when roleId does not refer to any role.public SUser getUser(long userId) throws SUserNotFoundException
IdentityService
SUser
by its idgetUser
in interface IdentityService
userId
- The user identifierSUserNotFoundException
- occurs when the userId does not refer to any user.public SContactInfo getUserContactInfo(long userId, boolean isPersonal) throws SIdentityException
IdentityService
getUserContactInfo
in interface IdentityService
userId
- the ID of the user to retrieve the contact info fromisPersonal
- Do we want personal contact information (or professional) ?SIdentityException
- if a Read problem occurredpublic SUser getUserByUserName(java.lang.String userName) throws SUserNotFoundException
IdentityService
SUser
by its namegetUserByUserName
in interface IdentityService
userName
- The user nameSUserNotFoundException
- occurs when the user name does not refer to any user.public SUserMembership getUserMembership(long userMembershipId) throws SIdentityException
IdentityService
SUserMembership
by given idgetUserMembership
in interface IdentityService
userMembershipId
- The identifier of userMembershipSUserMembership
of the given idSIdentityException
- occurs on persistence layer access problem or if the SUserMembership
does not existspublic java.util.List<SUserMembership> getUserMemberships(java.util.List<java.lang.Long> userMembershipIds) throws SIdentityException
IdentityService
List
of SUserMembership
of the given identifiers if they existsgetUserMemberships
in interface IdentityService
userMembershipIds
- The SUserMembership
's identifiersList
of SUserMembership
SIdentityException
- occurs on persistence layer access problem or if none identifiers match an existing
SUserMembership
public java.util.List<SUser> getUsers(int fromIndex, int numberOfUsers) throws SIdentityException
IdentityService
List
of SUser
from a specific interval.
If the number of existing results are lower than the number asked, all results from the given index are
retrieved.getUsers
in interface IdentityService
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrieveList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getUsers(int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of child SUser
from specific interval, sorted by field attribute in the given
OrderByType
order order.
For instance, getUsers(0,10,"displayName", OrderByType.DESC) returns the 10 first SUser
sorted by
"displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SUser
to get a list of available field keys to sort
getUsers
in interface IdentityService
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result we want to get. Maximum number of result returned.field
- The field used by the orderorder
- ASC or DESCList
of paginated SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getUsers(java.util.List<java.lang.Long> userIds) throws SUserNotFoundException
IdentityService
SUser
by their userIdsgetUsers
in interface IdentityService
userIds
- A List
of user identifiersList
of SUser
SUserNotFoundException
- occurs when none of the given userIds refer to any user.public java.util.List<SUser> getUsersByUsername(java.util.List<java.lang.String> userNames) throws SIdentityException
IdentityService
List
of SUser
from their names.getUsersByUsername
in interface IdentityService
userNames
- the list of user namesList
of SUser
SIdentityException
- If an exception occurs when retrieving the userspublic java.util.List<SUser> getUsersInGroup(long groupId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of SUser
for given SGroup
from specific interval, sorted by field
attribute in the given OrderByType
order order.
For instance, getUsersInGroup(1,0,10,"displayName", OrderByType.DESC) returns the 10 first SUser
of
the SGroup
with id '1' sorted by
"displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SUser
to get a list of available field keys to sort
getUsersInGroup
in interface IdentityService
groupId
- Identifier of the SGroup
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getActiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of Active SUser
for given SGroup
from specific interval, sorted by
field attribute in the given
OrderByType
order order.
For instance, getActiveUsersInGroup(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUser
of the SGroup
with id '1'
sorted by
"displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SUser
to get a list of available field keys to sort
getActiveUsersInGroup
in interface IdentityService
groupId
- Identifier of the SGroup
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getInactiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of Inactive SUser
for given SGroup
from specific interval, sorted by
field attribute in the given
OrderByType
order order.
For instance, getInactiveUsersInGroup(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUser
of the SGroup
with id '1'
sorted by
"displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SUser
to get a list of available field keys to sort
getInactiveUsersInGroup
in interface IdentityService
groupId
- Identifier of the SGroup
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
getUsersWithManager
in interface IdentityService
managerId
- The manager identifier, actually it is user identifierfromIndex
- Index of the record to be retrieved from. First record has index 0numberMaxOfUsers
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getActiveUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
getActiveUsersWithManager
in interface IdentityService
managerId
- The manager identifier, actually it is user identifierfromIndex
- Index of the record to be retrieved from. First record has index 0numberMaxOfUsers
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getInactiveUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
getInactiveUsersWithManager
in interface IdentityService
managerId
- The manager identifier, actually it is user identifierfromIndex
- Index of the record to be retrieved from. First record has index 0numberMaxOfUsers
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException
IdentityService
List
of SUser
from a specific interval for the given SRole
identifier.
If the number of existing results are lower than the number asked, all results from the given index are
retrieved.
Note that this method returns both active and inactive users.getUsersWithRole
in interface IdentityService
roleId
- The identifier of the SRole
of the SUser
to retrievefromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrieveList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getActiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException
IdentityService
List
of active SUser
from a specific interval for the given SRole
identifier.
If the number of existing results are lower than the number asked, all results from the given index are
retrieved.getActiveUsersWithRole
in interface IdentityService
roleId
- The identifier of the SRole
of the SUser
to retrievefromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrieveList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getInactiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException
IdentityService
List
of inactive SUser
from a specific interval for the given SRole
identifier.
If the number of existing results are lower than the number asked, all results from the given index are
retrieved.getInactiveUsersWithRole
in interface IdentityService
roleId
- The identifier of the SRole
of the SUser
to retrievefromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrieveList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getUsersWithRole(long roleId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of SUser
for given SRole
from specific interval, sorted by field
attribute in the given OrderByType
order order.
For instance, getUsersWithRole(1,0,10,"displayName", OrderByType.DESC) returns the 10 first SUser
of
the SRole
with id '1' sorted by
"displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SUser
to get a list of available field keys to sort
getUsersWithRole
in interface IdentityService
roleId
- The identifier of the SRole
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getActiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of active SUser
for given SRole
from specific interval, sorted by field
attribute in the given
OrderByType
order order.
For instance, getActiveUsersWithRole(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUser
of the SRole
with id '1'
sorted
by
"displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SUser
to get a list of available field keys to sort
getActiveUsersWithRole
in interface IdentityService
roleId
- The identifier of the SRole
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of SUser
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUser> getInactiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of Inactive SUser
for given SRole
from specific interval, sorted by
field attribute in the given
OrderByType
order order.
For instance, getInactiveUsersWithRole(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUser
of the SRole
with id '1'
sorted by
"displayName" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SUser
to get a list of available field keys to sort
getInactiveUsersWithRole
in interface IdentityService
roleId
- The identifier of the SRole
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrievefield
- The field used to sortorder
- ASC or DESCList
of SUser
SIdentityException
- occurs on persistence layer access problempublic void updateGroup(SGroup group, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException
IdentityService
updateGroup
in interface IdentityService
group
- The group will be updateddescriptor
- The update descriptionSIdentityException
public void updateCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo, EntityUpdateDescriptor descriptor) throws SIdentityException
IdentityService
updateCustomUserInfoDefinition
in interface IdentityService
customUserInfo
- The customUserInfoDefinition will be updateddescriptor
- The update descriptionSIdentityException
public void updateCustomUserInfoValue(SCustomUserInfoValue customUserInfo, EntityUpdateDescriptor descriptor) throws SIdentityException
IdentityService
updateCustomUserInfoValue
in interface IdentityService
customUserInfo
- The profileMetadataValue will be updateddescriptor
- The update descriptionSIdentityException
public SRole updateRole(SRole role, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException
IdentityService
updateRole
in interface IdentityService
role
- The role will be updateddescriptor
- The update descriptionSIdentityException
public void updateUser(SUser user, EntityUpdateDescriptor descriptor) throws SUserUpdateException
IdentityService
SUser
according to the EntityUpdateDescriptor
updateUser
in interface IdentityService
user
- The SUser
to updatedescriptor
- The SUser
contents to updateSUserUpdateException
- occurs on persistence layer access problem@Deprecated public void updateUser(SUser user, EntityUpdateDescriptor descriptor, boolean isPasswordEncrypted) throws SUserUpdateException
IdentityService
SUser
according to the EntityUpdateDescriptor
updateUser
in interface IdentityService
user
- The SUser
to updatedescriptor
- The SUser
contents to updateisPasswordEncrypted
- allow to know if the password given in the EntityUpdateDescriptor
is encrypted or notSUserUpdateException
public void updateUserContactInfo(SContactInfo contactInfo, EntityUpdateDescriptor descriptor) throws SIdentityException
IdentityService
updateUserContactInfo
in interface IdentityService
contactInfo
- The user contact information to be updateddescriptor
- The update descriptionSUserUpdateException
SIdentityException
public void updateUserMembership(SUserMembership userMembership, EntityUpdateDescriptor descriptor) throws SIdentityException
IdentityService
updateUserMembership
in interface IdentityService
userMembership
- The userMembership will be updateddescriptor
- The update descriptionSIdentityException
public java.util.List<SUserMembership> getUserMemberships(int fromIndex, int numberOfUserMemberships) throws SIdentityException
IdentityService
List
of SUserMembership
from specific interval
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
getUserMemberships
in interface IdentityService
fromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUserMemberships
- Number of result to retrieveList
of SUserMembership
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberOfUsers) throws SIdentityException
IdentityService
SUserMembership
for a specific interval for a given usergetUserMembershipsOfUser
in interface IdentityService
userId
- The user's identifierfromIndex
- Index of the record to be retrieved from. First record has index 0numberOfUsers
- Number of result to retrieveList
of SUserMembership
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberOfMemberships, java.lang.String field, OrderByType order) throws SIdentityException
IdentityService
List
of SUserMembership
of a given user from specific interval, sorted by field
attribute in the given OrderByType
sortOrder order.
For instance, getUserMembershipsOfUser(1,0,10,"id", OrderByType.DESC) returns the 10 first
SUserMembership
of the given user sorted by
"id" in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
check SUserMembershipBuilderFactory
to check available field keys to sort
getUserMembershipsOfUser
in interface IdentityService
userId
- The identifier of userfromIndex
- Index of the record to be retrieved from. First record has index 0numberOfMemberships
- Number of result to retrievefield
- The field user to do orderorder
- ASC or DESCList
of SUserMembership
SIdentityException
- occurs on persistence layer access problemSUserMembershipBuilderFactory
public java.util.List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberPerPage, OrderByOption orderByOption) throws SIdentityException
IdentityService
List
of SUserMembership
of a given user from specific interval, sorted by default field in
the given OrderByType
sortOrder order.
For instance, getUserMembershipsOfUser(1,0,10, OrderByType.DESC) returns the 10 first SUserMembership
of the given user sorted by
the default field in desc order
If the number of existing results are lower than the number asked, all results from the given index are retrieved.
getUserMembershipsOfUser
in interface IdentityService
userId
- The identifier of userfromIndex
- Index of the record to be retrieved from. First record has index 0numberPerPage
- Number of result o retrieveorderByOption
- OrderByOption object containing order informationSIdentityException
- occurs on persistence layer access problempublic SUserMembership getUserMembership(long userId, long groupId, long roleId) throws SIdentityException
IdentityService
getUserMembership
in interface IdentityService
userId
- The user's identifiergroupId
- The group's identifierroleId
- The role's identifierSUserMembership
SIdentityException
- occurs on persistence layer access problem or if the SUserMembership
does not existspublic SUserMembership getLightUserMembership(long userId, long groupId, long roleId) throws SIdentityException
IdentityService
SUserMembership
of the specific user, group and role without userName, groupName and roleName
being set.getLightUserMembership
in interface IdentityService
userId
- The user's identifiergroupId
- The group's identifierroleId
- The role's identifierSUserMembership
SIdentityException
- occurs on persistence layer access problem or if the SUserMembership
does not existspublic long getNumberOfUserMemberships() throws SIdentityException
IdentityService
getNumberOfUserMemberships
in interface IdentityService
SIdentityException
- occurs on persistence layer access problempublic java.util.List<SUserMembership> getLightUserMemberships(int startIndex, int numberOfElements) throws SIdentityException
IdentityService
getLightUserMemberships
in interface IdentityService
startIndex
- Index of the record to be retrieved from. First record has index 0numberOfElements
- Number of result we want to get. Maximum number of result returned.SIdentityException
public long getNumberOfUsers(QueryOptions options) throws SBonitaReadException
IdentityService
getNumberOfUsers
in interface IdentityService
options
- The QueryOptions object containing some query conditionsSBonitaReadException
public java.util.List<SUser> searchUsers(QueryOptions options) throws SBonitaReadException
IdentityService
searchUsers
in interface IdentityService
options
- The QueryOptions object containing some query conditionsSBonitaReadException
public long getNumberOfRoles(QueryOptions options) throws SBonitaReadException
IdentityService
getNumberOfRoles
in interface IdentityService
options
- The QueryOptions object containing some query conditionsSBonitaReadException
public java.util.List<SRole> searchRoles(QueryOptions options) throws SBonitaReadException
IdentityService
searchRoles
in interface IdentityService
options
- The QueryOptions object containing some query conditionsSBonitaReadException
public long getNumberOfGroups(QueryOptions options) throws SBonitaReadException
IdentityService
getNumberOfGroups
in interface IdentityService
options
- The QueryOptions object containing some query conditionsSBonitaReadException
public java.util.List<SGroup> searchGroups(QueryOptions options) throws SBonitaReadException
IdentityService
searchGroups
in interface IdentityService
options
- The QueryOptions object containing some query conditionsSBonitaReadException
public boolean checkCredentials(SUser user, java.lang.String password)
IdentityService
checkCredentials
in interface IdentityService
user
- the userpassword
- the passwordpublic java.util.List<SCustomUserInfoValue> searchCustomUserInfoValue(QueryOptions options) throws SBonitaReadException
IdentityService
SCustomUserInfoValue
matching the criterias of the given QueryOptions
searchCustomUserInfoValue
in interface IdentityService
options
- The QueryOptions object containing some query conditionsSBonitaReadException
- occurs on persistence layer access problem or if search parameters are not correctpublic java.util.List<SCustomUserInfoValue> getCustomUserInfoValueOfUserAndDefinitions(long userId, java.util.List<java.lang.Long> definitionsIds) throws SBonitaReadException
IdentityService
getCustomUserInfoValueOfUserAndDefinitions
in interface IdentityService
SBonitaReadException
public SUser updateUser(long userId, EntityUpdateDescriptor userUpdateDescriptor, EntityUpdateDescriptor personalDataUpdateDescriptor, EntityUpdateDescriptor professionalDataUpdateDescriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException
IdentityService
updateUser
in interface IdentityService
userId
- the user to updateuserUpdateDescriptor
- the entity update descriptor of the user itselfpersonalDataUpdateDescriptor
- the entity update descriptor for the personal dataprofessionalDataUpdateDescriptor
- the entity update descriptor for the professional dataSIdentityException
public SUser createUser(SUser sUser, SContactInfo personalContactInfo, SContactInfo proContactInfo, java.lang.String iconFilename, byte[] iconContent) throws SUserCreationException
IdentityService
createUser
in interface IdentityService
sUser
- the user to persistpersonalContactInfo
- its personal contact infoproContactInfo
- its professional contact infoiconFilename
- original name of the icon, used to determine the mime typeiconContent
- content of the iconSUserCreationException
public SIcon getIcon(long id) throws SBonitaReadException
IdentityService
getIcon
in interface IdentityService
id
- id of the iconSBonitaReadException