Class IdentityServiceImpl
- All Implemented Interfaces:
IdentityService
- Author:
- Baptiste Mesta, Matthieu Chaffotte, Bole Zhang, Hongwen Zang, Celine Souchet
-
Field Summary
Fields inherited from interface org.bonitasoft.engine.identity.IdentityService
CUSTOM_USER_INFO_DEFINITION, CUSTOM_USER_INFO_VALUE, GROUP, ICON, ROLE, USER, USER_CONTACT_INFO, USER_LOGIN, USERMEMBERSHIP -
Constructor Summary
ConstructorsConstructorDescriptionIdentityServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, QueriableLoggerService queriableLoggerService, CredentialsEncrypter encrypter, IconService iconService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckCredentials(SUser user, String password) Checks whether the couple user/password is valid.createCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo) Create custom user info definition in DB for a server given custom user info definitioncreateCustomUserInfoValue(SCustomUserInfoValue customUserInfo) Create profileMetadataValue in DB for give profileMetadataValue objectvoidcreateGroup(SGroup group, String iconFileName, byte[] iconContent) Create group in DB for the given group objectvoidcreateRole(SRole role, String iconFilename, byte[] iconContent) Create role in DB for the given rolecreateUser(SUser user) CreateSUserand store it to persistence layercreateUser(SUser sUser, SContactInfo personalContactInfo, SContactInfo proContactInfo, String iconFilename, byte[] iconContent) create a new user in database along with its contact datacreateUserContactInfo(SContactInfo contactInfo) Create user contact information for given datavoidcreateUserMembership(SUserMembership userMembership) Create userMembership in DB for the given userMembership objectDeprecated.voidDelete all groups for the connected tenantvoidDelete all roles for the connected tenantvoidDelete all user memberships for the connected tenantvoidDelete all users for the connected tenantdeleteChildrenGroup(long groupId) delete children groups of the given group if there is somevoiddeleteCustomUserInfoDefinition(long customUserInfoDefinitionId) Delete the id specified custom user infovoidDelete the specific custom user infovoiddeleteCustomUserInfoValue(long customUserInfoValueId) Delete the id specified profileMetadataValuevoiddeleteCustomUserInfoValue(SCustomUserInfoValue customUserInfo) Delete the specific profileMetadataValuevoiddeleteGroup(long groupId) Delete the id specified groupvoiddeleteGroup(SGroup group) Delete the specific groupvoiddeleteLightUserMembership(SUserMembership userMembership) Delete the specific light userMembershipvoiddeleteRole(long roleId) Delete the id specified rolevoiddeleteRole(SRole role) Delete the specific rolevoiddeleteUser(long userId) Delete user by its idvoiddeleteUser(SUser user) Delete the specific uservoiddeleteUserMembership(long id) Delete the id specified userMembershipvoiddeleteUserMembership(SUserMembership userMembership) Delete the specific userMembershipgetActiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, String field, OrderByType order) Get aListof ActiveSUserfor givenSGroupfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.getActiveUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, String field, OrderByType order) Get all active users managed by a specific manager from a specific interval.getActiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) getActiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers, String field, OrderByType order) Get aListof activeSUserfor givenSRolefrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.getCustomUserInfoDefinition(long customUserInfoDefinitionId) GetSCustomUserInfoDefinitionby its idGet aSCustomUserInfoDefinitionby its namegetCustomUserInfoDefinitions(int fromIndex, int maxResults) Get aListofSCustomUserInfoDefinitionfrom specific intervalgetCustomUserInfoDefinitions(List<Long> customUserInfoDefinitionIds) Get aListofSCustomUserInfoDefinitionof the given identifiersgetCustomUserInfoValue(long customUserInfoValueId) GetSCustomUserInfoValueby its idgetCustomUserInfoValueOfUserAndDefinitions(long userId, List<Long> definitionsIds) Get SCustomUserInfoValues of definitions for a usergetCustomUserInfoValues(List<Long> customUserInfoValueIds) Get aListofSCustomUserInfoValueof the given identifiersgetGroup(long groupId) GetSGroupby its identifiergetGroupByPath(String groupPath) Get theSGroupby its pathgetGroupChildren(long groupId, int fromIndex, int numberOfGroups) getGroupChildren(long groupId, int fromIndex, int numberOfGroups, String field, OrderByType order) Get aListof childSGroupin specific interval, sorted by field attribute in the givenOrderByTypeorder.getGroups(int fromIndex, int numberOfGroups) getGroups(int fromIndex, int numberOfGroups, String field, OrderByType order) Get aListofSGroupin specific interval, sorted by field attribute in the givenOrderByTypeorder.getInactiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, String field, OrderByType order) Get aListof InactiveSUserfor givenSGroupfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.getInactiveUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, String field, OrderByType order) Get all inactive users managed by a specific manager from a specific interval.getInactiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) getInactiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers, String field, OrderByType order) Get aListof InactiveSUserfor givenSRolefrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.getLightUserMembership(long userMembershipId) Get light userMembership by its idgetLightUserMembership(long userId, long groupId, long roleId) Get theSUserMembershipof the specific user, group and role without userName, groupName and roleName being set.getLightUserMemberships(int startIndex, int numberOfElements) Get light userMembership in a specific interval, this is used for paginationlongGet total number ofSCustomUserInfoDefinitionof the current tenantlongGet total number ofSCustomUserInfoValueof the current tenant matching the criterias of the givenQueryOptionslonggetNumberOfGroupChildren(long parentGroupId) Get number of child groups for the group identified by the given idlongGet total number ofSGroupin the current tenantlonggetNumberOfGroups(QueryOptions options) Get total number of groups according to specific query optionslongGet total number ofSRolefor this tenantlonggetNumberOfRoles(QueryOptions options) Get total number of roles according to specific query optionslongGet total number of userMemberships of the current tenantlonggetNumberOfUserMembershipsOfUser(long userId) Get total number ofSUserMembershipfor a specific userlongGet total number ofSUseron the current tenantlonggetNumberOfUsers(QueryOptions options) Get total number of users according to specific query optionslonggetNumberOfUsersByGroup(long groupId) Get total number of users for the givenSGrouplonggetNumberOfUsersByMembership(long groupId, long roleId) Get total number of userMemberships contains specific group and rolelonggetNumberOfUsersByRole(long roleId) Get total number of users for the given role on the current tenantgetRole(long roleId) Gets theSRolegiven by its identifier.getRoleByName(String roleName) Get theSRolegiven by its name.getRoles(int fromIndex, int numberOfRoles) getRoles(int fromIndex, int numberOfRoles, String field, OrderByType order) getUser(long userId) GetSUserby its idgetUserByUserName(String userName) GetSUserby its namegetUserContactInfo(long userId, boolean isPersonal) Return the user contact info for a specific user.getUserIdsWithCustomUserInfo(String userInfoName, String userInfoValue, boolean usePartialMatch, int fromIndex, int maxResults) Retrieve aListof user identifiers from specific interval.getUserMembership(long userMembershipId) GetSUserMembershipby given idgetUserMembership(long userId, long groupId, long roleId) getUserMemberships(int fromIndex, int numberOfUserMemberships) Get aListofSUserMembershipfrom specific intervalgetUserMemberships(int fromIndex, int numberOfResult, OrderByOption orderByOption) Get aListofSUserMembershipfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.getUserMemberships(List<Long> userMembershipIds) Get aListofSUserMembershipof the given identifiers if they existsgetUserMembershipsOfGroup(long groupId, int startIndex, int maxResults) Get aListofSUserMembershipfor given group from specific intervalgetUserMembershipsOfRole(long roleId, int startIndex, int maxResults) Get aListofSUserMembershipfor given role from specific intervalgetUserMembershipsOfUser(long userId, int fromIndex, int numberOfUsers) GetSUserMembershipfor a specific interval for a given usergetUserMembershipsOfUser(long userId, int fromIndex, int numberOfMemberships, String field, OrderByType order) Get aListofSUserMembershipof a given user from specific interval, sorted by field attribute in the givenOrderByTypesortOrder order.getUserMembershipsOfUser(long userId, int fromIndex, int numberPerPage, OrderByOption orderByOption) Get aListofSUserMembershipof a given user from specific interval, sorted by default field in the givenOrderByTypesortOrder order.getUsers(int fromIndex, int numberOfUsers) getUsers(int fromIndex, int numberOfUsers, String field, OrderByType order) Get aListof childSUserfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.GetSUserby their userIdsgetUsersByUsername(List<String> userNames) getUsersInGroup(long groupId, int fromIndex, int numberOfUsers, String field, OrderByType order) Get aListofSUserfor givenSGroupfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.getUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, String field, OrderByType order) Get all users (both active and inactive) managed by a specific manager from a specific interval.getUsersWithRole(long roleId, int fromIndex, int numberOfUsers) getUsersWithRole(long roleId, int fromIndex, int numberOfUsers, String field, OrderByType order) Get aListofSUserfor givenSRolefrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.booleanVerify if there is aSCustomUserInfoDefinitionof the given namesearchCustomUserInfoValue(QueryOptions options) SearchSCustomUserInfoValuematching the criterias of the givenQueryOptionssearchGroups(QueryOptions options) Search groups according to specific query optionssearchRoles(QueryOptions options) Search roles according to specific query optionssearchUsers(QueryOptions options) Search users according to specific query optionsvoidupdateCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo, EntityUpdateDescriptor descriptor) Update customUserInfoDefinition according to the descriptorvoidupdateCustomUserInfoValue(SCustomUserInfoValue customUserInfo, EntityUpdateDescriptor descriptor) Update profileMetadataValue according to the descriptorvoidupdateGroup(SGroup group, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) Update group according to the descriptorupdateRole(SRole role, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) Update role according to the descriptorupdateUser(long userId, EntityUpdateDescriptor userUpdateDescriptor, EntityUpdateDescriptor personalDataUpdateDescriptor, EntityUpdateDescriptor professionalDataUpdateDescriptor, EntityUpdateDescriptor iconUpdater) Update the user having id userId according to the entity update descriptors in parametersvoidupdateUser(SUser user, EntityUpdateDescriptor descriptor) UpdateSUseraccording to theEntityUpdateDescriptorvoidupdateUser(SUser user, EntityUpdateDescriptor descriptor, boolean isPasswordEncrypted) Deprecated.voidupdateUserContactInfo(SContactInfo contactInfo, EntityUpdateDescriptor descriptor) Update user contact information according to the descriptorvoidupdateUserMembership(SUserMembership userMembership, EntityUpdateDescriptor descriptor) Update userMembership according to the descriptor
-
Constructor Details
-
IdentityServiceImpl
public IdentityServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, QueriableLoggerService queriableLoggerService, CredentialsEncrypter encrypter, IconService iconService)
-
-
Method Details
-
createGroup
public void createGroup(SGroup group, String iconFileName, byte[] iconContent) throws SGroupCreationException Description copied from interface:IdentityServiceCreate group in DB for the given group object- Specified by:
createGroupin interfaceIdentityService- Parameters:
group- A group object- Throws:
SGroupCreationException
-
createCustomUserInfoDefinition
public SCustomUserInfoDefinition createCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo) throws SCustomUserInfoDefinitionAlreadyExistsException, SCustomUserInfoDefinitionCreationException Description copied from interface:IdentityServiceCreate custom user info definition in DB for a server given custom user info definition- Specified by:
createCustomUserInfoDefinitionin interfaceIdentityService- Parameters:
customUserInfo- SCustomUserInfoDefinition object- Throws:
SCustomUserInfoDefinitionAlreadyExistsException- TODOSCustomUserInfoDefinitionCreationException- TODO
-
createCustomUserInfoValue
public SCustomUserInfoValue createCustomUserInfoValue(SCustomUserInfoValue customUserInfo) throws SIdentityException Description copied from interface:IdentityServiceCreate profileMetadataValue in DB for give profileMetadataValue object- Specified by:
createCustomUserInfoValuein interfaceIdentityService- Parameters:
customUserInfo- A profileMetadataValue object- Throws:
SIdentityException
-
createRole
public void createRole(SRole role, String iconFilename, byte[] iconContent) throws SIdentityException Description copied from interface:IdentityServiceCreate role in DB for the given role- Specified by:
createRolein interfaceIdentityService- Parameters:
role- A role object- Throws:
SIdentityException
-
createUser
Description copied from interface:IdentityServiceCreateSUserand store it to persistence layer- Specified by:
createUserin interfaceIdentityService- Parameters:
user- The user to create and store- Returns:
- the created user with its identifier set
- Throws:
SUserCreationException- occurs on persistence layer access problem
-
createUserWithoutEncryptingPassword
@Deprecated public SUser createUserWithoutEncryptingPassword(SUser user) throws SUserCreationException Deprecated.Description copied from interface:IdentityServiceCreate user in DB for given user and- Specified by:
createUserWithoutEncryptingPasswordin interfaceIdentityService- Parameters:
user- The user object- Throws:
SUserCreationException
-
createUserContactInfo
Description copied from interface:IdentityServiceCreate user contact information for given data- Specified by:
createUserContactInfoin interfaceIdentityService- Parameters:
contactInfo- The user contact information object- Returns:
- The contact info created
- Throws:
SUserCreationException
-
createUserMembership
public void createUserMembership(SUserMembership userMembership) throws SUserMembershipCreationException Description copied from interface:IdentityServiceCreate userMembership in DB for the given userMembership object- Specified by:
createUserMembershipin interfaceIdentityService- Parameters:
userMembership- A userMembership object- Throws:
SUserMembershipCreationException
-
deleteGroup
Description copied from interface:IdentityServiceDelete the id specified group- Specified by:
deleteGroupin interfaceIdentityService- Parameters:
groupId- The identifier of group- Throws:
SGroupNotFoundException- Error occurs when no group found with the specific groupIdSGroupDeletionException
-
deleteGroup
Description copied from interface:IdentityServiceDelete the specific group- Specified by:
deleteGroupin interfaceIdentityService- Parameters:
group- The group will be deleted- Throws:
SGroupDeletionException
-
deleteAllGroups
Description copied from interface:IdentityServiceDelete all groups for the connected tenant- Specified by:
deleteAllGroupsin interfaceIdentityService- Throws:
SGroupDeletionException
-
deleteChildrenGroup
public List<Long> deleteChildrenGroup(long groupId) throws SGroupDeletionException, SGroupNotFoundException Description copied from interface:IdentityServicedelete children groups of the given group if there is some- Specified by:
deleteChildrenGroupin interfaceIdentityService- Parameters:
groupId- The index of the group to delete- Throws:
SGroupDeletionExceptionSGroupNotFoundException
-
deleteCustomUserInfoDefinition
public void deleteCustomUserInfoDefinition(long customUserInfoDefinitionId) throws SIdentityException Description copied from interface:IdentityServiceDelete the id specified custom user info- Specified by:
deleteCustomUserInfoDefinitionin interfaceIdentityService- Parameters:
customUserInfoDefinitionId- The identifier of custom user info- Throws:
SIdentityException
-
deleteCustomUserInfoDefinition
public void deleteCustomUserInfoDefinition(SCustomUserInfoDefinition info) throws SIdentityException Description copied from interface:IdentityServiceDelete the specific custom user info- Specified by:
deleteCustomUserInfoDefinitionin interfaceIdentityService- Parameters:
info- The custom user info object will be deleted- Throws:
SIdentityException
-
deleteCustomUserInfoValue
Description copied from interface:IdentityServiceDelete the id specified profileMetadataValue- Specified by:
deleteCustomUserInfoValuein interfaceIdentityService- Parameters:
customUserInfoValueId- The identifier of profileMetadataValue- Throws:
SIdentityException
-
deleteCustomUserInfoValue
public void deleteCustomUserInfoValue(SCustomUserInfoValue customUserInfo) throws SIdentityException Description copied from interface:IdentityServiceDelete the specific profileMetadataValue- Specified by:
deleteCustomUserInfoValuein interfaceIdentityService- Parameters:
customUserInfo- The profileMetadataValue object will be deleted- Throws:
SIdentityException
-
deleteRole
Description copied from interface:IdentityServiceDelete the id specified role- Specified by:
deleteRolein interfaceIdentityService- Parameters:
roleId- The role identifier- Throws:
SRoleNotFoundException- Error occurs when no role found with the specific roleIdSRoleDeletionException
-
deleteRole
Description copied from interface:IdentityServiceDelete the specific role- Specified by:
deleteRolein interfaceIdentityService- Parameters:
role- The role will be deleted- Throws:
SRoleDeletionException
-
deleteAllRoles
Description copied from interface:IdentityServiceDelete all roles for the connected tenant- Specified by:
deleteAllRolesin interfaceIdentityService- Throws:
SRoleDeletionException
-
deleteUser
Description copied from interface:IdentityServiceDelete user by its id- Specified by:
deleteUserin interfaceIdentityService- Parameters:
userId- The identifier of user- Throws:
SUserDeletionException
-
deleteUser
Description copied from interface:IdentityServiceDelete the specific user- Specified by:
deleteUserin interfaceIdentityService- Parameters:
user- The user will be deleted- Throws:
SUserDeletionException
-
deleteAllUsers
Description copied from interface:IdentityServiceDelete all users for the connected tenant- Specified by:
deleteAllUsersin interfaceIdentityService- Throws:
SUserDeletionException
-
getLightUserMembership
Description copied from interface:IdentityServiceGet light userMembership by its id- Specified by:
getLightUserMembershipin interfaceIdentityService- Parameters:
userMembershipId- The identifier of userMembership- Returns:
- a SUserMembership object without userName, groupName and roleName
- Throws:
SIdentityException
-
deleteUserMembership
public void deleteUserMembership(SUserMembership userMembership) throws SMembershipDeletionException Description copied from interface:IdentityServiceDelete the specific userMembership- Specified by:
deleteUserMembershipin interfaceIdentityService- Parameters:
userMembership- The userMembership will be deleted- Throws:
SMembershipDeletionException
-
deleteUserMembership
Description copied from interface:IdentityServiceDelete the id specified userMembership- Specified by:
deleteUserMembershipin interfaceIdentityService- Parameters:
id- The identifier of userMembership- Throws:
SMembershipDeletionException
-
deleteLightUserMembership
public void deleteLightUserMembership(SUserMembership userMembership) throws SMembershipDeletionException Description copied from interface:IdentityServiceDelete the specific light userMembership- Specified by:
deleteLightUserMembershipin interfaceIdentityService- Throws:
SMembershipDeletionException
-
deleteAllUserMemberships
Description copied from interface:IdentityServiceDelete all user memberships for the connected tenant- Specified by:
deleteAllUserMembershipsin interfaceIdentityService- Throws:
SMembershipDeletionException
-
getGroup
Description copied from interface:IdentityServiceGetSGroupby its identifier- Specified by:
getGroupin interfaceIdentityService- Parameters:
groupId- The group identifier- Returns:
- the group
- Throws:
SGroupNotFoundException- occurs when the groupId does not refer to any group.
-
getGroupChildren
public List<SGroup> getGroupChildren(long groupId, int fromIndex, int numberOfGroups) throws SIdentityException Description copied from interface:IdentityServiceGet aListchildSGroupin 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.- Specified by:
getGroupChildrenin interfaceIdentityService- Parameters:
groupId- The parent group identifierfromIndex- Index of the record to be retrieved from. First record has index 0numberOfGroups- Number of result to retrieve- Returns:
- a
Listof childSGroup - Throws:
SIdentityException- occurs on persistence layer access problem
-
getGroupChildren
public List<SGroup> getGroupChildren(long groupId, int fromIndex, int numberOfGroups, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListof childSGroupin specific interval, sorted by field attribute in the givenOrderByTypeorder.For instance, getGroupChildren(0,10,"displayName", OrderByType.DESC) returns the 10 first child
SGroupof the parentSGroupidentified by parentGroupId sorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SGroupBuilderFactoryto get a list of available field keys to sort- Specified by:
getGroupChildrenin interfaceIdentityService- Parameters:
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 DESC- Returns:
- a
Listof childSGroup - Throws:
SIdentityException- occurs on persistence layer access problem
-
getGroups
Description copied from interface:IdentityServiceGet aListofSGroupin 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.- Specified by:
getGroupsin interfaceIdentityService- Parameters:
fromIndex- Index of the record to be retrieved from. First record has index 0numberOfGroups- Number of result to retrieve- Returns:
- a
ListofSGroup - Throws:
SIdentityException- occurs on persistence layer access problem
-
getGroups
public List<SGroup> getGroups(int fromIndex, int numberOfGroups, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSGroupin specific interval, sorted by field attribute in the givenOrderByTypeorder.For instance, getGroups(0,10,"displayName", OrderByType.DESC) returns the 10 first
SGroupsorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SGroupBuilderFactoryto get a list of available field keys to sort- Specified by:
getGroupsin interfaceIdentityService- Parameters:
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 DESC- Returns:
- a
Listof paginatedSGroupobjects - Throws:
SIdentityException- occurs on persistence layer access problem- See Also:
-
SGroupBuilderFactory
-
getGroups
Description copied from interface:IdentityService- Specified by:
getGroupsin interfaceIdentityService- Parameters:
groupIds- The group identifiers- Returns:
- a
ListofSGroupobject - Throws:
SGroupNotFoundException- occurs when no given group identifiers refer to any group.
-
getUserMemberships
public List<SUserMembership> getUserMemberships(int fromIndex, int numberOfResult, OrderByOption orderByOption) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserMembershipfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.For instance, getUserMemberships(0,10,"id", OrderByType.DESC) returns the 10 first
SUserMembershipsorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SUserMembershipBuilderFactoryto check available field keys to sort- Specified by:
getUserMembershipsin interfaceIdentityService- Parameters:
fromIndex- Index of the record to be retrieved from. First record has index 0numberOfResult- Number of result to retrieve- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem- See Also:
-
SUserMembershipBuilderFactory
-
getUserMembershipsOfGroup
public List<SUserMembership> getUserMembershipsOfGroup(long groupId, int startIndex, int maxResults) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserMembershipfor given group from specific intervalIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
- Specified by:
getUserMembershipsOfGroupin interfaceIdentityService- Parameters:
groupId- Identifier of the groupstartIndex- Index of the record to be retrieved from. First record has index 0maxResults- Number of result to retrieve- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUserMembershipsOfRole
public List<SUserMembership> getUserMembershipsOfRole(long roleId, int startIndex, int maxResults) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserMembershipfor given role from specific intervalIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
- Specified by:
getUserMembershipsOfRolein interfaceIdentityService- Parameters:
roleId- Identifier of the rolestartIndex- Index of the record to be retrieved from. First record has index 0maxResults- Number of result to retrieve- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfGroupChildren
Description copied from interface:IdentityServiceGet number of child groups for the group identified by the given id- Specified by:
getNumberOfGroupChildrenin interfaceIdentityService- Parameters:
parentGroupId- The parent group identifier- Returns:
- the number of child groups
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfGroups
Description copied from interface:IdentityServiceGet total number ofSGroupin the current tenant- Specified by:
getNumberOfGroupsin interfaceIdentityService- Returns:
- the total number of
SGroup - Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfCustomUserInfoDefinition
Description copied from interface:IdentityServiceGet total number ofSCustomUserInfoDefinitionof the current tenant- Specified by:
getNumberOfCustomUserInfoDefinitionin interfaceIdentityService- Returns:
- the total number of
SCustomUserInfoDefinitionof the current tenant - Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfCustomUserInfoValue
Description copied from interface:IdentityServiceGet total number ofSCustomUserInfoValueof the current tenant matching the criterias of the givenQueryOptions- Specified by:
getNumberOfCustomUserInfoValuein interfaceIdentityService- Parameters:
options- TheQueryOptionscontaining filtering conditions- Returns:
- the total number of custom user info value
- Throws:
SBonitaReadException
-
getNumberOfRoles
Description copied from interface:IdentityServiceGet total number ofSRolefor this tenant- Specified by:
getNumberOfRolesin interfaceIdentityService- Returns:
- the total number of roles for this tenant
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfUsers
Description copied from interface:IdentityServiceGet total number ofSUseron the current tenant- Specified by:
getNumberOfUsersin interfaceIdentityService- Returns:
- the total number of users
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfUserMembershipsOfUser
Description copied from interface:IdentityServiceGet total number ofSUserMembershipfor a specific user- Specified by:
getNumberOfUserMembershipsOfUserin interfaceIdentityService- Parameters:
userId- The user's identifier- Returns:
- total number of userMemberships for the specific user
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfUsersByGroup
Description copied from interface:IdentityServiceGet total number of users for the givenSGroup- Specified by:
getNumberOfUsersByGroupin interfaceIdentityService- Parameters:
groupId- The identifier of theSGroup- Returns:
- total number of users in the given group
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfUsersByRole
Description copied from interface:IdentityServiceGet total number of users for the given role on the current tenant- Specified by:
getNumberOfUsersByRolein interfaceIdentityService- Parameters:
roleId- The identifier of role- Returns:
- total number of users related to the given role
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfUsersByMembership
Description copied from interface:IdentityServiceGet total number of userMemberships contains specific group and role- Specified by:
getNumberOfUsersByMembershipin interfaceIdentityService- Parameters:
groupId- The identifier of grouproleId- The identifier of role- Returns:
- the number of userMemberships
- Throws:
SIdentityException
-
getCustomUserInfoDefinitionByName
public SCustomUserInfoDefinition getCustomUserInfoDefinitionByName(String name) throws SCustomUserInfoDefinitionNotFoundException, SCustomUserInfoDefinitionReadException Description copied from interface:IdentityServiceGet aSCustomUserInfoDefinitionby its name- Specified by:
getCustomUserInfoDefinitionByNamein interfaceIdentityService- Parameters:
name- The name of theSCustomUserInfoDefinitionto retrieve- Returns:
- the
SCustomUserInfoDefinitionidentified by the given name - Throws:
SCustomUserInfoDefinitionNotFoundException- if there is no custom user info definition for the given nameSCustomUserInfoDefinitionReadException- if an exception occurs when trying to retrieve the custom user info definition
-
hasCustomUserInfoDefinition
public boolean hasCustomUserInfoDefinition(String name) throws SCustomUserInfoDefinitionReadException Description copied from interface:IdentityServiceVerify if there is aSCustomUserInfoDefinitionof the given name- Specified by:
hasCustomUserInfoDefinitionin interfaceIdentityService- Parameters:
name- TheSCustomUserInfoDefinition's name to check- Returns:
- the
SCustomUserInfoDefinitionof the given name - Throws:
SCustomUserInfoDefinitionReadException- if an exception occurs when trying to retrieve the custom user info definition
-
getCustomUserInfoDefinitions
public List<SCustomUserInfoDefinition> getCustomUserInfoDefinitions(int fromIndex, int maxResults) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSCustomUserInfoDefinitionfrom specific intervalIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
- Specified by:
getCustomUserInfoDefinitionsin interfaceIdentityService- Parameters:
fromIndex- Index of the record to be retrieved from. First record has index 0maxResults- Number of result to retrieve- Returns:
- a
ListofSCustomUserInfoDefinition - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUserIdsWithCustomUserInfo
public List<Long> getUserIdsWithCustomUserInfo(String userInfoName, String userInfoValue, boolean usePartialMatch, int fromIndex, int maxResults) throws SIdentityException Description copied from interface:IdentityServiceRetrieve aListof 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.
- Specified by:
getUserIdsWithCustomUserInfoin interfaceIdentityService- Parameters:
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.- Returns:
- the list identifiers of users matching the given user's information name & value.
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getCustomUserInfoDefinition
public SCustomUserInfoDefinition getCustomUserInfoDefinition(long customUserInfoDefinitionId) throws SIdentityException Description copied from interface:IdentityServiceGetSCustomUserInfoDefinitionby its id- Specified by:
getCustomUserInfoDefinitionin interfaceIdentityService- Parameters:
customUserInfoDefinitionId- TheSCustomUserInfoDefinition's identifier- Returns:
- the customUserInfoDefinition
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getCustomUserInfoDefinitions
public List<SCustomUserInfoDefinition> getCustomUserInfoDefinitions(List<Long> customUserInfoDefinitionIds) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSCustomUserInfoDefinitionof the given identifiers- Specified by:
getCustomUserInfoDefinitionsin interfaceIdentityService- Parameters:
customUserInfoDefinitionIds- AListofSCustomUserInfoDefinitionidentifiers- Returns:
- a
ListofSCustomUserInfoDefinition - Throws:
SIdentityException- occurs on persistence layer access problem or if none identifiers match an existingSCustomUserInfoDefinition
-
getCustomUserInfoValue
public SCustomUserInfoValue getCustomUserInfoValue(long customUserInfoValueId) throws SCustomUserInfoValueNotFoundException, SCustomUserInfoValueReadException Description copied from interface:IdentityServiceGetSCustomUserInfoValueby its id- Specified by:
getCustomUserInfoValuein interfaceIdentityService- Parameters:
customUserInfoValueId- The identifier of the custom user info value- Returns:
- the
SCustomUserInfoValue - Throws:
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 value
-
getCustomUserInfoValues
public List<SCustomUserInfoValue> getCustomUserInfoValues(List<Long> customUserInfoValueIds) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSCustomUserInfoValueof the given identifiers- Specified by:
getCustomUserInfoValuesin interfaceIdentityService- Parameters:
customUserInfoValueIds- AListofSCustomUserInfoValueidentifiers- Returns:
- A
ListofSCustomUserInfoValue - Throws:
SIdentityException- occurs on persistence layer access problem or if none identifiers match an existingSCustomUserInfoDefinition
-
getRole
Description copied from interface:IdentityServiceGets theSRolegiven by its identifier.- Specified by:
getRolein interfaceIdentityService- Parameters:
roleId- the role identifier- Returns:
- the role of the given id
- Throws:
SRoleNotFoundException- occurs when the roleId does not refer to any role.
-
getRoleByName
Description copied from interface:IdentityServiceGet theSRolegiven by its name.- Specified by:
getRoleByNamein interfaceIdentityService- Parameters:
roleName- The name of role- Returns:
- the role of the given name
- Throws:
SRoleNotFoundException- occurs when the roleName does not refer to any role.
-
getGroupByPath
Description copied from interface:IdentityServiceGet theSGroupby its path- Specified by:
getGroupByPathin interfaceIdentityService- Parameters:
groupPath- The group path- Returns:
- the group
- Throws:
SGroupNotFoundException- Occurs when the groupPath does not refer to any group.
-
getRoles
Description copied from interface:IdentityServiceGet aListofSRolein specific interval If the number of existing results are lower than the number asked, all results from the given index are retrieved.- Specified by:
getRolesin interfaceIdentityService- Parameters:
fromIndex- Index of the record to be retrieved from. First record has index 0numberOfRoles- Number of result to retrieve- Returns:
- a list of SRole objects
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getRoles
public List<SRole> getRoles(int fromIndex, int numberOfRoles, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSRolein specific interval, sorted by field attribute in the givenOrderByTypeorder.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
SRoleBuilderFactoryto get a list of available field keys to sort- Specified by:
getRolesin interfaceIdentityService- Parameters:
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 DESC- Returns:
- a list of paginated SRole objects
- Throws:
SIdentityException- occurs on persistence layer access problem- See Also:
-
to get a list of available field keys to use
-
getRoles
Description copied from interface:IdentityService- Specified by:
getRolesin interfaceIdentityService- Parameters:
roleIds- the role identifiers- Returns:
- a list of
SRoleobjects - Throws:
SRoleNotFoundException- Occurs when roleId does not refer to any role.
-
getUser
Description copied from interface:IdentityServiceGetSUserby its id- Specified by:
getUserin interfaceIdentityService- Parameters:
userId- The user identifier- Returns:
- the user
- Throws:
SUserNotFoundException- occurs when the userId does not refer to any user.
-
getUserContactInfo
Description copied from interface:IdentityServiceReturn the user contact info for a specific user.- Specified by:
getUserContactInfoin interfaceIdentityService- Parameters:
userId- the ID of the user to retrieve the contact info fromisPersonal- Do we want personal contact information (or professional) ?- Returns:
- the corresponding SContactInfo, if found
- Throws:
SIdentityException- if a Read problem occurred
-
getUserByUserName
Description copied from interface:IdentityServiceGetSUserby its name- Specified by:
getUserByUserNamein interfaceIdentityService- Parameters:
userName- The user name- Returns:
- the user
- Throws:
SUserNotFoundException- occurs when the user name does not refer to any user.
-
getUserMembership
Description copied from interface:IdentityServiceGetSUserMembershipby given id- Specified by:
getUserMembershipin interfaceIdentityService- Parameters:
userMembershipId- The identifier of userMembership- Returns:
- the
SUserMembershipof the given id - Throws:
SIdentityException- occurs on persistence layer access problem or if theSUserMembershipdoes not exists
-
getUserMemberships
public List<SUserMembership> getUserMemberships(List<Long> userMembershipIds) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserMembershipof the given identifiers if they exists- Specified by:
getUserMembershipsin interfaceIdentityService- Parameters:
userMembershipIds- TheSUserMembership's identifiers- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem or if none identifiers match an existingSUserMembership
-
getUsers
Description copied from interface:IdentityServiceGet aListofSUserfrom a specific interval. If the number of existing results are lower than the number asked, all results from the given index are retrieved.- Specified by:
getUsersin interfaceIdentityService- Parameters:
fromIndex- Index of the record to be retrieved from. First record has index 0numberOfUsers- Number of result to retrieve- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUsers
public List<SUser> getUsers(int fromIndex, int numberOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListof childSUserfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.For instance, getUsers(0,10,"displayName", OrderByType.DESC) returns the 10 first
SUsersorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SUserto get a list of available field keys to sort- Specified by:
getUsersin interfaceIdentityService- Parameters:
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 DESC- Returns:
- a
Listof paginatedSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUsers
Description copied from interface:IdentityServiceGetSUserby their userIds- Specified by:
getUsersin interfaceIdentityService- Parameters:
userIds- AListof user identifiers- Returns:
- a
ListofSUser - Throws:
SUserNotFoundException- occurs when none of the given userIds refer to any user.
-
getUsersByUsername
Description copied from interface:IdentityService- Specified by:
getUsersByUsernamein interfaceIdentityService- Parameters:
userNames- the list of user names- Returns:
- a
ListofSUser - Throws:
SIdentityException- If an exception occurs when retrieving the users
-
getUsersInGroup
public List<SUser> getUsersInGroup(long groupId, int fromIndex, int numberOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserfor givenSGroupfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.For instance, getUsersInGroup(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUserof theSGroupwith id '1' sorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SUserto get a list of available field keys to sort- Specified by:
getUsersInGroupin interfaceIdentityService- Parameters:
groupId- Identifier of theSGroupfromIndex- 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 DESC- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getActiveUsersInGroup
public List<SUser> getActiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListof ActiveSUserfor givenSGroupfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.For instance, getActiveUsersInGroup(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUserof theSGroupwith id '1' sorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SUserto get a list of available field keys to sort- Specified by:
getActiveUsersInGroupin interfaceIdentityService- Parameters:
groupId- Identifier of theSGroupfromIndex- 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 DESC- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getInactiveUsersInGroup
public List<SUser> getInactiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListof InactiveSUserfor givenSGroupfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.For instance, getInactiveUsersInGroup(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUserof theSGroupwith id '1' sorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SUserto get a list of available field keys to sort- Specified by:
getInactiveUsersInGroupin interfaceIdentityService- Parameters:
groupId- Identifier of theSGroupfromIndex- 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 DESC- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUsersWithManager
public List<SUser> getUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet all users (both active and inactive) managed by a specific manager from a specific interval. If the number of existing results are lower than the number asked, all results from the given index are retrieved.- Specified by:
getUsersWithManagerin interfaceIdentityService- Parameters:
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 DESC- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getActiveUsersWithManager
public List<SUser> getActiveUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet all active users managed by a specific manager from a specific interval. If the number of existing results are lower than the number asked, all results from the given index are retrieved.- Specified by:
getActiveUsersWithManagerin interfaceIdentityService- Parameters:
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 DESC- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getInactiveUsersWithManager
public List<SUser> getInactiveUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet all inactive users managed by a specific manager from a specific interval. If the number of existing results are lower than the number asked, all results from the given index are retrieved.- Specified by:
getInactiveUsersWithManagerin interfaceIdentityService- Parameters:
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 DESC- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUsersWithRole
public List<SUser> getUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserfrom a specific interval for the givenSRoleidentifier. 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.- Specified by:
getUsersWithRolein interfaceIdentityService- Parameters:
roleId- The identifier of theSRoleof theSUserto retrievefromIndex- Index of the record to be retrieved from. First record has index 0numberOfUsers- Number of result to retrieve- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getActiveUsersWithRole
public List<SUser> getActiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException Description copied from interface:IdentityServiceGet aListof activeSUserfrom a specific interval for the givenSRoleidentifier. If the number of existing results are lower than the number asked, all results from the given index are retrieved.- Specified by:
getActiveUsersWithRolein interfaceIdentityService- Parameters:
roleId- The identifier of theSRoleof theSUserto retrievefromIndex- Index of the record to be retrieved from. First record has index 0numberOfUsers- Number of result to retrieve- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getInactiveUsersWithRole
public List<SUser> getInactiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException Description copied from interface:IdentityServiceGet aListof inactiveSUserfrom a specific interval for the givenSRoleidentifier. If the number of existing results are lower than the number asked, all results from the given index are retrieved.- Specified by:
getInactiveUsersWithRolein interfaceIdentityService- Parameters:
roleId- The identifier of theSRoleof theSUserto retrievefromIndex- Index of the record to be retrieved from. First record has index 0numberOfUsers- Number of result to retrieve- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUsersWithRole
public List<SUser> getUsersWithRole(long roleId, int fromIndex, int numberOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserfor givenSRolefrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.For instance, getUsersWithRole(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUserof theSRolewith id '1' sorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SUserto get a list of available field keys to sort- Specified by:
getUsersWithRolein interfaceIdentityService- Parameters:
roleId- The identifier of theSRolefromIndex- 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 DESC- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getActiveUsersWithRole
public List<SUser> getActiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListof activeSUserfor givenSRolefrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.For instance, getActiveUsersWithRole(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUserof theSRolewith id '1' sorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SUserto get a list of available field keys to sort- Specified by:
getActiveUsersWithRolein interfaceIdentityService- Parameters:
roleId- The identifier of theSRolefromIndex- 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 DESC- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
getInactiveUsersWithRole
public List<SUser> getInactiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListof InactiveSUserfor givenSRolefrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.For instance, getInactiveUsersWithRole(1,0,10,"displayName", OrderByType.DESC) returns the 10 first
SUserof theSRolewith id '1' sorted by "displayName" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SUserto get a list of available field keys to sort- Specified by:
getInactiveUsersWithRolein interfaceIdentityService- Parameters:
roleId- The identifier of theSRolefromIndex- 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 DESC- Returns:
- a
ListofSUser - Throws:
SIdentityException- occurs on persistence layer access problem
-
updateGroup
public void updateGroup(SGroup group, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException Description copied from interface:IdentityServiceUpdate group according to the descriptor- Specified by:
updateGroupin interfaceIdentityService- Parameters:
group- The group will be updateddescriptor- The update description- Throws:
SIdentityException
-
updateCustomUserInfoDefinition
public void updateCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo, EntityUpdateDescriptor descriptor) throws SIdentityException Description copied from interface:IdentityServiceUpdate customUserInfoDefinition according to the descriptor- Specified by:
updateCustomUserInfoDefinitionin interfaceIdentityService- Parameters:
customUserInfo- The customUserInfoDefinition will be updateddescriptor- The update description- Throws:
SIdentityException
-
updateCustomUserInfoValue
public void updateCustomUserInfoValue(SCustomUserInfoValue customUserInfo, EntityUpdateDescriptor descriptor) throws SIdentityException Description copied from interface:IdentityServiceUpdate profileMetadataValue according to the descriptor- Specified by:
updateCustomUserInfoValuein interfaceIdentityService- Parameters:
customUserInfo- The profileMetadataValue will be updateddescriptor- The update description- Throws:
SIdentityException
-
updateRole
public SRole updateRole(SRole role, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException Description copied from interface:IdentityServiceUpdate role according to the descriptor- Specified by:
updateRolein interfaceIdentityService- Parameters:
role- The role will be updateddescriptor- The update description- Throws:
SIdentityException
-
updateUser
Description copied from interface:IdentityServiceUpdateSUseraccording to theEntityUpdateDescriptor- Specified by:
updateUserin interfaceIdentityService- Parameters:
user- TheSUserto updatedescriptor- TheSUsercontents to update- Throws:
SUserUpdateException- occurs on persistence layer access problem
-
updateUser
@Deprecated public void updateUser(SUser user, EntityUpdateDescriptor descriptor, boolean isPasswordEncrypted) throws SUserUpdateException Deprecated.Description copied from interface:IdentityServiceUpdateSUseraccording to theEntityUpdateDescriptor- Specified by:
updateUserin interfaceIdentityService- Parameters:
user- TheSUserto updatedescriptor- TheSUsercontents to updateisPasswordEncrypted- allow to know if the password given in theEntityUpdateDescriptoris encrypted or not- Throws:
SUserUpdateException
-
updateUserContactInfo
public void updateUserContactInfo(SContactInfo contactInfo, EntityUpdateDescriptor descriptor) throws SIdentityException Description copied from interface:IdentityServiceUpdate user contact information according to the descriptor- Specified by:
updateUserContactInfoin interfaceIdentityService- Parameters:
contactInfo- The user contact information to be updateddescriptor- The update description- Throws:
SUserUpdateExceptionSIdentityException
-
updateUserMembership
public void updateUserMembership(SUserMembership userMembership, EntityUpdateDescriptor descriptor) throws SIdentityException Description copied from interface:IdentityServiceUpdate userMembership according to the descriptor- Specified by:
updateUserMembershipin interfaceIdentityService- Parameters:
userMembership- The userMembership will be updateddescriptor- The update description- Throws:
SIdentityException
-
getUserMemberships
public List<SUserMembership> getUserMemberships(int fromIndex, int numberOfUserMemberships) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserMembershipfrom specific intervalIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
- Specified by:
getUserMembershipsin interfaceIdentityService- Parameters:
fromIndex- Index of the record to be retrieved from. First record has index 0numberOfUserMemberships- Number of result to retrieve- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUserMembershipsOfUser
public List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberOfUsers) throws SIdentityException Description copied from interface:IdentityServiceGetSUserMembershipfor a specific interval for a given user- Specified by:
getUserMembershipsOfUserin interfaceIdentityService- Parameters:
userId- The user's identifierfromIndex- Index of the record to be retrieved from. First record has index 0numberOfUsers- Number of result to retrieve- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUserMembershipsOfUser
public List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberOfMemberships, String field, OrderByType order) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserMembershipof a given user from specific interval, sorted by field attribute in the givenOrderByTypesortOrder order.For instance, getUserMembershipsOfUser(1,0,10,"id", OrderByType.DESC) returns the 10 first
SUserMembershipof the given user sorted by "id" in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
check
SUserMembershipBuilderFactoryto check available field keys to sort- Specified by:
getUserMembershipsOfUserin interfaceIdentityService- Parameters:
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 DESC- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem- See Also:
-
SUserMembershipBuilderFactory
-
getUserMembershipsOfUser
public List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberPerPage, OrderByOption orderByOption) throws SIdentityException Description copied from interface:IdentityServiceGet aListofSUserMembershipof a given user from specific interval, sorted by default field in the givenOrderByTypesortOrder order.For instance, getUserMembershipsOfUser(1,0,10, OrderByType.DESC) returns the 10 first
SUserMembershipof the given user sorted by the default field in desc orderIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
- Specified by:
getUserMembershipsOfUserin interfaceIdentityService- Parameters:
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 information- Returns:
- a list of SUserMembership objects
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getUserMembership
public SUserMembership getUserMembership(long userId, long groupId, long roleId) throws SIdentityException Description copied from interface:IdentityService- Specified by:
getUserMembershipin interfaceIdentityService- Parameters:
userId- The user's identifiergroupId- The group's identifierroleId- The role's identifier- Returns:
- the
SUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem or if theSUserMembershipdoes not exists
-
getLightUserMembership
public SUserMembership getLightUserMembership(long userId, long groupId, long roleId) throws SIdentityException Description copied from interface:IdentityServiceGet theSUserMembershipof the specific user, group and role without userName, groupName and roleName being set.- Specified by:
getLightUserMembershipin interfaceIdentityService- Parameters:
userId- The user's identifiergroupId- The group's identifierroleId- The role's identifier- Returns:
- the lightened
SUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem or if theSUserMembershipdoes not exists
-
getNumberOfUserMemberships
Description copied from interface:IdentityServiceGet total number of userMemberships of the current tenant- Specified by:
getNumberOfUserMembershipsin interfaceIdentityService- Returns:
- total number of userMemberships
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getLightUserMemberships
public List<SUserMembership> getLightUserMemberships(int startIndex, int numberOfElements) throws SIdentityException Description copied from interface:IdentityServiceGet light userMembership in a specific interval, this is used for pagination- Specified by:
getLightUserMembershipsin interfaceIdentityService- Parameters:
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.- Returns:
- a list of SUserMembership objects without userName, groupName and roleName
- Throws:
SIdentityException
-
getNumberOfUsers
Description copied from interface:IdentityServiceGet total number of users according to specific query options- Specified by:
getNumberOfUsersin interfaceIdentityService- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- the satisfied user number
- Throws:
SBonitaReadException
-
searchUsers
Description copied from interface:IdentityServiceSearch users according to specific query options- Specified by:
searchUsersin interfaceIdentityService- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- a list of SUser objects
- Throws:
SBonitaReadException
-
getNumberOfRoles
Description copied from interface:IdentityServiceGet total number of roles according to specific query options- Specified by:
getNumberOfRolesin interfaceIdentityService- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- the satisfied role number
- Throws:
SBonitaReadException
-
searchRoles
Description copied from interface:IdentityServiceSearch roles according to specific query options- Specified by:
searchRolesin interfaceIdentityService- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- a list of SRole objects
- Throws:
SBonitaReadException
-
getNumberOfGroups
Description copied from interface:IdentityServiceGet total number of groups according to specific query options- Specified by:
getNumberOfGroupsin interfaceIdentityService- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- the group number
- Throws:
SBonitaReadException
-
searchGroups
Description copied from interface:IdentityServiceSearch groups according to specific query options- Specified by:
searchGroupsin interfaceIdentityService- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- a list of SGroup objects
- Throws:
SBonitaReadException
-
checkCredentials
Description copied from interface:IdentityServiceChecks whether the couple user/password is valid.- Specified by:
checkCredentialsin interfaceIdentityService- Parameters:
user- the userpassword- the password- Returns:
- true if the couple user/password is valid; false otherwise
-
searchCustomUserInfoValue
public List<SCustomUserInfoValue> searchCustomUserInfoValue(QueryOptions options) throws SBonitaReadException Description copied from interface:IdentityServiceSearchSCustomUserInfoValuematching the criterias of the givenQueryOptions- Specified by:
searchCustomUserInfoValuein interfaceIdentityService- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- a list of SCustomUserInfoValue objects
- Throws:
SBonitaReadException- occurs on persistence layer access problem or if search parameters are not correct
-
getCustomUserInfoValueOfUserAndDefinitions
public List<SCustomUserInfoValue> getCustomUserInfoValueOfUserAndDefinitions(long userId, List<Long> definitionsIds) throws SBonitaReadException Description copied from interface:IdentityServiceGet SCustomUserInfoValues of definitions for a user- Specified by:
getCustomUserInfoValueOfUserAndDefinitionsin interfaceIdentityService- Throws:
SBonitaReadException
-
updateUser
public SUser updateUser(long userId, EntityUpdateDescriptor userUpdateDescriptor, EntityUpdateDescriptor personalDataUpdateDescriptor, EntityUpdateDescriptor professionalDataUpdateDescriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException Description copied from interface:IdentityServiceUpdate the user having id userId according to the entity update descriptors in parameters- Specified by:
updateUserin interfaceIdentityService- Parameters:
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 data- Returns:
- the updated user
- Throws:
SIdentityException
-
createUser
public SUser createUser(SUser sUser, SContactInfo personalContactInfo, SContactInfo proContactInfo, String iconFilename, byte[] iconContent) throws SUserCreationException Description copied from interface:IdentityServicecreate a new user in database along with its contact data- Specified by:
createUserin interfaceIdentityService- Parameters:
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 icon- Returns:
- the user persisted
- Throws:
SUserCreationException
-