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> |
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
IdentityServicecreateGroup in interface IdentityServicegroup - A group objectSGroupCreationExceptionpublic SCustomUserInfoDefinition createCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo) throws SCustomUserInfoDefinitionAlreadyExistsException, SCustomUserInfoDefinitionCreationException
IdentityServicecreateCustomUserInfoDefinition in interface IdentityServicecustomUserInfo - SCustomUserInfoDefinition objectSCustomUserInfoDefinitionAlreadyExistsException - TODOSCustomUserInfoDefinitionCreationException - TODOpublic SCustomUserInfoValue createCustomUserInfoValue(SCustomUserInfoValue customUserInfo) throws SIdentityException
IdentityServicecreateCustomUserInfoValue in interface IdentityServicecustomUserInfo - A profileMetadataValue objectSIdentityExceptionpublic void createRole(SRole role, java.lang.String iconFilename, byte[] iconContent) throws SIdentityException
IdentityServicecreateRole in interface IdentityServicerole - A role objectSIdentityExceptionpublic SUser createUser(SUser user) throws SUserCreationException
IdentityServiceSUser and store it to persistence layercreateUser in interface IdentityServiceuser - The user to create and storeSUserCreationException - occurs on persistence layer access problem@Deprecated public SUser createUserWithoutEncryptingPassword(SUser user) throws SUserCreationException
IdentityServicecreateUserWithoutEncryptingPassword in interface IdentityServiceuser - The user objectSUserCreationExceptionpublic SContactInfo createUserContactInfo(SContactInfo contactInfo) throws SUserCreationException
IdentityServicecreateUserContactInfo in interface IdentityServicecontactInfo - The user contact information objectSUserCreationExceptionpublic void createUserMembership(SUserMembership userMembership) throws SUserMembershipCreationException
IdentityServicecreateUserMembership in interface IdentityServiceuserMembership - A userMembership objectSUserMembershipCreationExceptionpublic void deleteGroup(long groupId)
throws SGroupNotFoundException,
SGroupDeletionException
IdentityServicedeleteGroup in interface IdentityServicegroupId - The identifier of groupSGroupNotFoundException - Error occurs when no group found with the specific groupIdSGroupDeletionExceptionpublic void deleteGroup(SGroup group) throws SGroupDeletionException
IdentityServicedeleteGroup in interface IdentityServicegroup - The group will be deletedSGroupDeletionExceptionpublic void deleteAllGroups()
throws SGroupDeletionException
IdentityServicedeleteAllGroups in interface IdentityServiceSGroupDeletionExceptionpublic java.util.List<java.lang.Long> deleteChildrenGroup(long groupId)
throws SGroupDeletionException,
SGroupNotFoundException
IdentityServicedeleteChildrenGroup in interface IdentityServicegroupId - The index of the group to deleteSGroupDeletionExceptionSGroupNotFoundExceptionpublic void deleteCustomUserInfoDefinition(long customUserInfoDefinitionId)
throws SIdentityException
IdentityServicedeleteCustomUserInfoDefinition in interface IdentityServicecustomUserInfoDefinitionId - The identifier of custom user infoSIdentityExceptionpublic void deleteCustomUserInfoDefinition(SCustomUserInfoDefinition info) throws SIdentityException
IdentityServicedeleteCustomUserInfoDefinition in interface IdentityServiceinfo - The custom user info object will be deletedSIdentityExceptionpublic void deleteCustomUserInfoValue(long customUserInfoValueId)
throws SIdentityException
IdentityServicedeleteCustomUserInfoValue in interface IdentityServicecustomUserInfoValueId - The identifier of profileMetadataValueSIdentityExceptionpublic void deleteCustomUserInfoValue(SCustomUserInfoValue customUserInfo) throws SIdentityException
IdentityServicedeleteCustomUserInfoValue in interface IdentityServicecustomUserInfo - The profileMetadataValue object will be deletedSIdentityExceptionpublic void deleteRole(long roleId)
throws SRoleNotFoundException,
SRoleDeletionException
IdentityServicedeleteRole in interface IdentityServiceroleId - The role identifierSRoleNotFoundException - Error occurs when no role found with the specific roleIdSRoleDeletionExceptionpublic void deleteRole(SRole role) throws SRoleDeletionException
IdentityServicedeleteRole in interface IdentityServicerole - The role will be deletedSRoleDeletionExceptionpublic void deleteAllRoles()
throws SRoleDeletionException
IdentityServicedeleteAllRoles in interface IdentityServiceSRoleDeletionExceptionpublic void deleteUser(long userId)
throws SUserDeletionException
IdentityServicedeleteUser in interface IdentityServiceuserId - The identifier of userSUserDeletionExceptionpublic void deleteUser(SUser user) throws SUserDeletionException
IdentityServicedeleteUser in interface IdentityServiceuser - The user will be deletedSUserDeletionExceptionpublic void deleteAllUsers()
throws SUserDeletionException
IdentityServicedeleteAllUsers in interface IdentityServiceSUserDeletionExceptionpublic SUserMembership getLightUserMembership(long userMembershipId) throws SIdentityException
IdentityServicegetLightUserMembership in interface IdentityServiceuserMembershipId - The identifier of userMembershipSIdentityExceptionpublic void deleteUserMembership(SUserMembership userMembership) throws SMembershipDeletionException
IdentityServicedeleteUserMembership in interface IdentityServiceuserMembership - The userMembership will be deletedSMembershipDeletionExceptionpublic void deleteUserMembership(long id)
throws SMembershipDeletionException
IdentityServicedeleteUserMembership in interface IdentityServiceid - The identifier of userMembershipSMembershipDeletionExceptionpublic void deleteLightUserMembership(SUserMembership userMembership) throws SMembershipDeletionException
IdentityServicedeleteLightUserMembership in interface IdentityServiceSMembershipDeletionExceptionpublic void deleteAllUserMemberships()
throws SMembershipDeletionException
IdentityServicedeleteAllUserMemberships in interface IdentityServiceSMembershipDeletionExceptionpublic SGroup getGroup(long groupId) throws SGroupNotFoundException
IdentityServiceSGroup by its identifiergetGroup in interface IdentityServicegroupId - 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
IdentityServiceList 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 IdentityServicegroupId - The parent group identifierfromIndex - Index of the record to be retrieved from. First record has index 0numberOfGroups - Number of result to retrieveList of child SGroupSIdentityException - 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
IdentityServiceList 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 IdentityServicegroupId - 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 SGroupSIdentityException - occurs on persistence layer access problempublic java.util.List<SGroup> getGroups(int fromIndex, int numberOfGroups) throws SIdentityException
IdentityServiceList 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 IdentityServicefromIndex - Index of the record to be retrieved from. First record has index 0numberOfGroups - Number of result to retrieveList of SGroupSIdentityException - occurs on persistence layer access problempublic java.util.List<SGroup> getGroups(int fromIndex, int numberOfGroups, java.lang.String field, OrderByType order) throws SIdentityException
IdentityServiceList 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 IdentityServicefromIndex - 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 problemSGroupBuilderFactorypublic java.util.List<SGroup> getGroups(java.util.List<java.lang.Long> groupIds) throws SGroupNotFoundException
IdentityServiceList of SGroup for specific groupIdsgetGroups in interface IdentityServicegroupIds - 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
IdentityServiceList 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 IdentityServicefromIndex - Index of the record to be retrieved from. First record has index 0numberOfResult - Number of result to retrieveList of SUserMembershipSIdentityException - occurs on persistence layer access problemSUserMembershipBuilderFactorypublic java.util.List<SUserMembership> getUserMembershipsOfGroup(long groupId, int startIndex, int maxResults) throws SIdentityException
IdentityServiceList 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 IdentityServicegroupId - Identifier of the groupstartIndex - Index of the record to be retrieved from. First record has index 0maxResults - Number of result to retrieveList of SUserMembershipSIdentityException - occurs on persistence layer access problempublic java.util.List<SUserMembership> getUserMembershipsOfRole(long roleId, int startIndex, int maxResults) throws SIdentityException
IdentityServiceList 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 IdentityServiceroleId - Identifier of the rolestartIndex - Index of the record to be retrieved from. First record has index 0maxResults - Number of result to retrieveList of SUserMembershipSIdentityException - occurs on persistence layer access problempublic long getNumberOfGroupChildren(long parentGroupId)
throws SIdentityException
IdentityServicegetNumberOfGroupChildren in interface IdentityServiceparentGroupId - The parent group identifierSIdentityException - occurs on persistence layer access problempublic long getNumberOfGroups()
throws SIdentityException
IdentityServiceSGroup in the current tenantgetNumberOfGroups in interface IdentityServiceSGroupSIdentityException - occurs on persistence layer access problempublic long getNumberOfCustomUserInfoDefinition()
throws SIdentityException
IdentityServiceSCustomUserInfoDefinition of the current tenantgetNumberOfCustomUserInfoDefinition in interface IdentityServiceSCustomUserInfoDefinition of the current tenantSIdentityException - occurs on persistence layer access problempublic long getNumberOfCustomUserInfoValue(QueryOptions options) throws SBonitaReadException
IdentityServiceSCustomUserInfoValue of the current tenant matching the criterias of the given QueryOptionsgetNumberOfCustomUserInfoValue in interface IdentityServiceoptions - The QueryOptions containing filtering conditionsSBonitaReadExceptionpublic long getNumberOfRoles()
throws SIdentityException
IdentityServiceSRole for this tenantgetNumberOfRoles in interface IdentityServiceSIdentityException - occurs on persistence layer access problempublic long getNumberOfUsers()
throws SIdentityException
IdentityServiceSUser on the current tenantgetNumberOfUsers in interface IdentityServiceSIdentityException - occurs on persistence layer access problempublic long getNumberOfUserMembershipsOfUser(long userId)
throws SIdentityException
IdentityServiceSUserMembership for a specific usergetNumberOfUserMembershipsOfUser in interface IdentityServiceuserId - The user's identifierSIdentityException - occurs on persistence layer access problempublic long getNumberOfUsersByGroup(long groupId)
throws SIdentityException
IdentityServiceSGroupgetNumberOfUsersByGroup in interface IdentityServicegroupId - The identifier of the SGroupSIdentityException - occurs on persistence layer access problempublic long getNumberOfUsersByRole(long roleId)
throws SIdentityException
IdentityServicegetNumberOfUsersByRole in interface IdentityServiceroleId - The identifier of roleSIdentityException - occurs on persistence layer access problempublic long getNumberOfUsersByMembership(long groupId,
long roleId)
throws SIdentityException
IdentityServicegetNumberOfUsersByMembership in interface IdentityServicegroupId - The identifier of grouproleId - The identifier of roleSIdentityExceptionpublic SCustomUserInfoDefinition getCustomUserInfoDefinitionByName(java.lang.String name) throws SCustomUserInfoDefinitionNotFoundException, SCustomUserInfoDefinitionReadException
IdentityServiceSCustomUserInfoDefinition by its namegetCustomUserInfoDefinitionByName in interface IdentityServicename - 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
IdentityServiceSCustomUserInfoDefinition of the given namehasCustomUserInfoDefinition in interface IdentityServicename - 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
IdentityServiceList 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 IdentityServicefromIndex - Index of the record to be retrieved from. First record has index 0maxResults - Number of result to retrieveList of SCustomUserInfoDefinitionSIdentityException - 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
IdentityServiceList 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 IdentityServiceuserInfoName - 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
IdentityServiceSCustomUserInfoDefinition by its idgetCustomUserInfoDefinition in interface IdentityServicecustomUserInfoDefinitionId - The SCustomUserInfoDefinition's identifierSIdentityException - occurs on persistence layer access problempublic java.util.List<SCustomUserInfoDefinition> getCustomUserInfoDefinitions(java.util.List<java.lang.Long> customUserInfoDefinitionIds) throws SIdentityException
IdentityServiceList of SCustomUserInfoDefinition of the given identifiersgetCustomUserInfoDefinitions in interface IdentityServicecustomUserInfoDefinitionIds - A List of SCustomUserInfoDefinition identifiersList of SCustomUserInfoDefinitionSIdentityException - occurs on persistence layer access problem or if none identifiers match an existing SCustomUserInfoDefinitionpublic SCustomUserInfoValue getCustomUserInfoValue(long customUserInfoValueId) throws SCustomUserInfoValueNotFoundException, SCustomUserInfoValueReadException
IdentityServiceSCustomUserInfoValue by its idgetCustomUserInfoValue in interface IdentityServicecustomUserInfoValueId - The identifier of the custom user info valueSCustomUserInfoValueSCustomUserInfoValueNotFoundException - 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
IdentityServiceList of SCustomUserInfoValue of the given identifiersgetCustomUserInfoValues in interface IdentityServicecustomUserInfoValueIds - A List of SCustomUserInfoValue identifiersList of SCustomUserInfoValueSIdentityException - occurs on persistence layer access problem or if none identifiers match an existing SCustomUserInfoDefinitionpublic SRole getRole(long roleId) throws SRoleNotFoundException
IdentityServiceSRole given by its identifier.getRole in interface IdentityServiceroleId - the role identifierSRoleNotFoundException - occurs when the roleId does not refer to any role.public SRole getRoleByName(java.lang.String roleName) throws SRoleNotFoundException
IdentityServiceSRole given by its name.getRoleByName in interface IdentityServiceroleName - The name of roleSRoleNotFoundException - occurs when the roleName does not refer to any role.public SGroup getGroupByPath(java.lang.String groupPath) throws SGroupNotFoundException
IdentityServiceSGroup by its pathgetGroupByPath in interface IdentityServicegroupPath - 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
IdentityServiceList 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 IdentityServicefromIndex - 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
IdentityServiceList 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 IdentityServicefromIndex - 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 usepublic java.util.List<SRole> getRoles(java.util.List<java.lang.Long> roleIds) throws SRoleNotFoundException
IdentityServiceList of SRole by their identifiersgetRoles in interface IdentityServiceroleIds - the role identifiersSRole objectsSRoleNotFoundException - Occurs when roleId does not refer to any role.public SUser getUser(long userId) throws SUserNotFoundException
IdentityServiceSUser by its idgetUser in interface IdentityServiceuserId - The user identifierSUserNotFoundException - occurs when the userId does not refer to any user.public SContactInfo getUserContactInfo(long userId, boolean isPersonal) throws SIdentityException
IdentityServicegetUserContactInfo in interface IdentityServiceuserId - 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
IdentityServiceSUser by its namegetUserByUserName in interface IdentityServiceuserName - The user nameSUserNotFoundException - occurs when the user name does not refer to any user.public SUserMembership getUserMembership(long userMembershipId) throws SIdentityException
IdentityServiceSUserMembership by given idgetUserMembership in interface IdentityServiceuserMembershipId - 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
IdentityServiceList of SUserMembership of the given identifiers if they existsgetUserMemberships in interface IdentityServiceuserMembershipIds - The SUserMembership's identifiersList of SUserMembershipSIdentityException - occurs on persistence layer access problem or if none identifiers match an existing SUserMembershippublic java.util.List<SUser> getUsers(int fromIndex, int numberOfUsers) throws SIdentityException
IdentityServiceList 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 IdentityServicefromIndex - Index of the record to be retrieved from. First record has index 0numberOfUsers - Number of result to retrieveList of SUserSIdentityException - occurs on persistence layer access problempublic java.util.List<SUser> getUsers(int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
IdentityServiceList 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 IdentityServicefromIndex - 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 SUserSIdentityException - occurs on persistence layer access problempublic java.util.List<SUser> getUsers(java.util.List<java.lang.Long> userIds) throws SUserNotFoundException
IdentityServiceSUser by their userIdsgetUsers in interface IdentityServiceuserIds - A List of user identifiersList of SUserSUserNotFoundException - 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
IdentityServiceList of SUser from their names.getUsersByUsername in interface IdentityServiceuserNames - the list of user namesList of SUserSIdentityException - 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
IdentityServiceList 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 IdentityServicegroupId - Identifier of the SGroupfromIndex - 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 SUserSIdentityException - 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
IdentityServiceList 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 IdentityServicegroupId - Identifier of the SGroupfromIndex - 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 SUserSIdentityException - 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
IdentityServiceList 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 IdentityServicegroupId - Identifier of the SGroupfromIndex - 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 SUserSIdentityException - 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
IdentityServicegetUsersWithManager in interface IdentityServicemanagerId - 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 SUserSIdentityException - 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
IdentityServicegetActiveUsersWithManager in interface IdentityServicemanagerId - 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 SUserSIdentityException - 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
IdentityServicegetInactiveUsersWithManager in interface IdentityServicemanagerId - 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 SUserSIdentityException - occurs on persistence layer access problempublic java.util.List<SUser> getUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException
IdentityServiceList 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 IdentityServiceroleId - 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 SUserSIdentityException - occurs on persistence layer access problempublic java.util.List<SUser> getActiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException
IdentityServiceList 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 IdentityServiceroleId - 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 SUserSIdentityException - occurs on persistence layer access problempublic java.util.List<SUser> getInactiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException
IdentityServiceList 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 IdentityServiceroleId - 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 SUserSIdentityException - 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
IdentityServiceList 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 IdentityServiceroleId - The identifier of the SRolefromIndex - 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 SUserSIdentityException - 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
IdentityServiceList 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 IdentityServiceroleId - The identifier of the SRolefromIndex - 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 SUserSIdentityException - 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
IdentityServiceList 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 IdentityServiceroleId - The identifier of the SRolefromIndex - 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 SUserSIdentityException - occurs on persistence layer access problempublic void updateGroup(SGroup group, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException
IdentityServiceupdateGroup in interface IdentityServicegroup - The group will be updateddescriptor - The update descriptionSIdentityExceptionpublic void updateCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo, EntityUpdateDescriptor descriptor) throws SIdentityException
IdentityServiceupdateCustomUserInfoDefinition in interface IdentityServicecustomUserInfo - The customUserInfoDefinition will be updateddescriptor - The update descriptionSIdentityExceptionpublic void updateCustomUserInfoValue(SCustomUserInfoValue customUserInfo, EntityUpdateDescriptor descriptor) throws SIdentityException
IdentityServiceupdateCustomUserInfoValue in interface IdentityServicecustomUserInfo - The profileMetadataValue will be updateddescriptor - The update descriptionSIdentityExceptionpublic SRole updateRole(SRole role, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException
IdentityServiceupdateRole in interface IdentityServicerole - The role will be updateddescriptor - The update descriptionSIdentityExceptionpublic void updateUser(SUser user, EntityUpdateDescriptor descriptor) throws SUserUpdateException
IdentityServiceSUser according to the EntityUpdateDescriptorupdateUser in interface IdentityServiceuser - 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
IdentityServiceSUser according to the EntityUpdateDescriptorupdateUser in interface IdentityServiceuser - The SUser to updatedescriptor - The SUser contents to updateisPasswordEncrypted - allow to know if the password given in the EntityUpdateDescriptor is encrypted or notSUserUpdateExceptionpublic void updateUserContactInfo(SContactInfo contactInfo, EntityUpdateDescriptor descriptor) throws SIdentityException
IdentityServiceupdateUserContactInfo in interface IdentityServicecontactInfo - The user contact information to be updateddescriptor - The update descriptionSUserUpdateExceptionSIdentityExceptionpublic void updateUserMembership(SUserMembership userMembership, EntityUpdateDescriptor descriptor) throws SIdentityException
IdentityServiceupdateUserMembership in interface IdentityServiceuserMembership - The userMembership will be updateddescriptor - The update descriptionSIdentityExceptionpublic java.util.List<SUserMembership> getUserMemberships(int fromIndex, int numberOfUserMemberships) throws SIdentityException
IdentityServiceList 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 IdentityServicefromIndex - Index of the record to be retrieved from. First record has index 0numberOfUserMemberships - Number of result to retrieveList of SUserMembershipSIdentityException - occurs on persistence layer access problempublic java.util.List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberOfUsers) throws SIdentityException
IdentityServiceSUserMembership for a specific interval for a given usergetUserMembershipsOfUser in interface IdentityServiceuserId - The user's identifierfromIndex - Index of the record to be retrieved from. First record has index 0numberOfUsers - Number of result to retrieveList of SUserMembershipSIdentityException - 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
IdentityServiceList 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 IdentityServiceuserId - 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 SUserMembershipSIdentityException - occurs on persistence layer access problemSUserMembershipBuilderFactorypublic java.util.List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberPerPage, OrderByOption orderByOption) throws SIdentityException
IdentityServiceList 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 IdentityServiceuserId - 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
IdentityServicegetUserMembership in interface IdentityServiceuserId - The user's identifiergroupId - The group's identifierroleId - The role's identifierSUserMembershipSIdentityException - occurs on persistence layer access problem or if the SUserMembership does not existspublic SUserMembership getLightUserMembership(long userId, long groupId, long roleId) throws SIdentityException
IdentityServiceSUserMembership of the specific user, group and role without userName, groupName and roleName being set.getLightUserMembership in interface IdentityServiceuserId - The user's identifiergroupId - The group's identifierroleId - The role's identifierSUserMembershipSIdentityException - occurs on persistence layer access problem or if the SUserMembership does not existspublic long getNumberOfUserMemberships()
throws SIdentityException
IdentityServicegetNumberOfUserMemberships in interface IdentityServiceSIdentityException - occurs on persistence layer access problempublic java.util.List<SUserMembership> getLightUserMemberships(int startIndex, int numberOfElements) throws SIdentityException
IdentityServicegetLightUserMemberships in interface IdentityServicestartIndex - 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.SIdentityExceptionpublic long getNumberOfUsers(QueryOptions options) throws SBonitaReadException
IdentityServicegetNumberOfUsers in interface IdentityServiceoptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic java.util.List<SUser> searchUsers(QueryOptions options) throws SBonitaReadException
IdentityServicesearchUsers in interface IdentityServiceoptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic long getNumberOfRoles(QueryOptions options) throws SBonitaReadException
IdentityServicegetNumberOfRoles in interface IdentityServiceoptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic java.util.List<SRole> searchRoles(QueryOptions options) throws SBonitaReadException
IdentityServicesearchRoles in interface IdentityServiceoptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic long getNumberOfGroups(QueryOptions options) throws SBonitaReadException
IdentityServicegetNumberOfGroups in interface IdentityServiceoptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic java.util.List<SGroup> searchGroups(QueryOptions options) throws SBonitaReadException
IdentityServicesearchGroups in interface IdentityServiceoptions - The QueryOptions object containing some query conditionsSBonitaReadExceptionpublic boolean checkCredentials(SUser user, java.lang.String password)
IdentityServicecheckCredentials in interface IdentityServiceuser - the userpassword - the passwordpublic java.util.List<SCustomUserInfoValue> searchCustomUserInfoValue(QueryOptions options) throws SBonitaReadException
IdentityServiceSCustomUserInfoValue matching the criterias of the given QueryOptionssearchCustomUserInfoValue in interface IdentityServiceoptions - The QueryOptions object containing some query conditionsSBonitaReadException - occurs on persistence layer access problem or if search parameters are not correctpublic SUser updateUser(long userId, EntityUpdateDescriptor userUpdateDescriptor, EntityUpdateDescriptor personalDataUpdateDescriptor, EntityUpdateDescriptor professionalDataUpdateDescriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException
IdentityServiceupdateUser in interface IdentityServiceuserId - 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 dataSIdentityExceptionpublic SUser createUser(SUser sUser, SContactInfo personalContactInfo, SContactInfo proContactInfo, java.lang.String iconFilename, byte[] iconContent) throws SUserCreationException
IdentityServicecreateUser in interface IdentityServicesUser - 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 iconSUserCreationExceptionpublic SIcon getIcon(long id) throws SBonitaReadException
IdentityServicegetIcon in interface IdentityServiceid - id of the iconSBonitaReadException