Interface IdentityService
-
- All Known Implementing Classes:
IdentityServiceImpl
public interface IdentityServiceThis service allow to manage the users and organizations and membership and the relations between them.- Since:
- 6.0
- Author:
- Anthony Birembaut, Baptiste Mesta, Matthieu Chaffotte
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCUSTOM_USER_INFO_DEFINITIONstatic java.lang.StringCUSTOM_USER_INFO_VALUEstatic java.lang.StringGROUPstatic java.lang.StringICONstatic java.lang.StringROLEstatic java.lang.StringUSERstatic java.lang.StringUSER_CONTACT_INFOstatic java.lang.StringUSER_LOGINstatic java.lang.StringUSERMEMBERSHIP
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleancheckCredentials(SUser user, java.lang.String password)Checks whether the couple user/password is valid.SCustomUserInfoDefinitioncreateCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo)Create custom user info definition in DB for a server given custom user info definitionSCustomUserInfoValuecreateCustomUserInfoValue(SCustomUserInfoValue customUserInfo)Create profileMetadataValue in DB for give profileMetadataValue objectvoidcreateGroup(SGroup group, java.lang.String iconFileName, byte[] iconContent)Create group in DB for the given group objectvoidcreateRole(SRole role, java.lang.String iconFilename, byte[] iconContent)Create role in DB for the given roleSUsercreateUser(SUser user)CreateSUserand store it to persistence layerSUsercreateUser(SUser sUser, SContactInfo personalContactInfo, SContactInfo proContactInfo, java.lang.String iconFilename, byte[] iconContent)create a new user in database along with its contact dataSContactInfocreateUserContactInfo(SContactInfo contactInfo)Create user contact information for given datavoidcreateUserMembership(SUserMembership userMembership)Create userMembership in DB for the given userMembership objectSUsercreateUserWithoutEncryptingPassword(SUser user)Deprecated.voiddeleteAllGroups()Delete all groups for the connected tenantvoiddeleteAllRoles()Delete all roles for the connected tenantvoiddeleteAllUserMemberships()Delete all user memberships for the connected tenantvoiddeleteAllUsers()Delete all users for the connected tenantjava.util.List<java.lang.Long>deleteChildrenGroup(long groupId)delete children groups of the given group if there is somevoiddeleteCustomUserInfoDefinition(long customUserInfoDefinitionId)Delete the id specified custom user infovoiddeleteCustomUserInfoDefinition(SCustomUserInfoDefinition metadataDefinition)Delete 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 userMembershipId)Delete the id specified userMembershipvoiddeleteUserMembership(SUserMembership userMembership)Delete the specific userMembershipjava.util.List<SUser>getActiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order)Get aListof ActiveSUserfor givenSGroupfrom specific interval, sorted by field attribute in the givenOrderByTypeorder 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 aListof activeSUserfor givenSRolefrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.SCustomUserInfoDefinitiongetCustomUserInfoDefinition(long customUserInfoDefinitionId)GetSCustomUserInfoDefinitionby its idSCustomUserInfoDefinitiongetCustomUserInfoDefinitionByName(java.lang.String name)Get aSCustomUserInfoDefinitionby its namejava.util.List<SCustomUserInfoDefinition>getCustomUserInfoDefinitions(int fromIndex, int maxResults)Get aListofSCustomUserInfoDefinitionfrom specific intervaljava.util.List<SCustomUserInfoDefinition>getCustomUserInfoDefinitions(java.util.List<java.lang.Long> customUserInfoDefinitionIds)Get aListofSCustomUserInfoDefinitionof the given identifiersSCustomUserInfoValuegetCustomUserInfoValue(long customUserInfoValueId)GetSCustomUserInfoValueby its idjava.util.List<SCustomUserInfoValue>getCustomUserInfoValueOfUserAndDefinitions(long userId, java.util.List<java.lang.Long> definitionsIds)Get SCustomUserInfoValues of definitions for a userjava.util.List<SCustomUserInfoValue>getCustomUserInfoValues(java.util.List<java.lang.Long> customUserInfoValueIds)Get aListofSCustomUserInfoValueof the given identifiersSGroupgetGroup(long groupId)GetSGroupby its identifierSGroupgetGroupByPath(java.lang.String groupPath)Get theSGroupby its pathjava.util.List<SGroup>getGroupChildren(long parentGroupId, int fromIndex, int numberOfGroups)Get aListchildSGroupin a specific interval for specific group.java.util.List<SGroup>getGroupChildren(long parentGroupId, int fromIndex, int numberOfGroups, java.lang.String field, OrderByType order)Get aListof childSGroupin specific interval, sorted by field attribute in the givenOrderByTypeorder.java.util.List<SGroup>getGroups(int fromIndex, int numberOfGroups)Get 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.java.util.List<SGroup>getGroups(int fromIndex, int numberOfGroups, java.lang.String field, OrderByType order)Get aListofSGroupin specific interval, sorted by field attribute in the givenOrderByTypeorder.java.util.List<SGroup>getGroups(java.util.List<java.lang.Long> groupIds)Get aListofSGroupfor specific groupIdsjava.util.List<SUser>getInactiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order)Get aListof InactiveSUserfor givenSGroupfrom specific interval, sorted by field attribute in the givenOrderByTypeorder 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 aListof InactiveSUserfor givenSRolefrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.SUserMembershipgetLightUserMembership(long userMembershipId)Get light userMembership by its idSUserMembershipgetLightUserMembership(long userId, long groupId, long roleId)Get theSUserMembershipof 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 paginationlonggetNumberOfCustomUserInfoDefinition()Get total number ofSCustomUserInfoDefinitionof the current tenantlonggetNumberOfCustomUserInfoValue(QueryOptions options)Get 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 idlonggetNumberOfGroups()Get total number ofSGroupin the current tenantlonggetNumberOfGroups(QueryOptions options)Get total number of groups according to specific query optionslonggetNumberOfRoles()Get total number ofSRolefor this tenantlonggetNumberOfRoles(QueryOptions options)Get total number of roles according to specific query optionslonggetNumberOfUserMemberships()Get total number of userMemberships of the current tenantlonggetNumberOfUserMembershipsOfUser(long userId)Get total number ofSUserMembershipfor a specific userlonggetNumberOfUsers()Get 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 tenantSRolegetRole(long roleId)Gets theSRolegiven by its identifier.SRolegetRoleByName(java.lang.String roleName)Get theSRolegiven by its name.java.util.List<SRole>getRoles(int fromIndex, int numberOfRoles)Get aListofSRolein 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 aListofSRoleby their identifiersSUsergetUser(long userId)GetSUserby its idSUsergetUserByUserName(java.lang.String username)GetSUserby its nameSContactInfogetUserContactInfo(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 aListof user identifiers from specific interval.SUserMembershipgetUserMembership(long userMembershipId)GetSUserMembershipby given idSUserMembershipgetUserMembership(long userId, long groupId, long roleId)java.util.List<SUserMembership>getUserMemberships(int fromIndex, int numberOfResults)Get aListofSUserMembershipfrom specific intervaljava.util.List<SUserMembership>getUserMemberships(int fromIndex, int numberOfUserMemberships, OrderByOption orderByOption)Get aListofSUserMembershipfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.java.util.List<SUserMembership>getUserMemberships(java.util.List<java.lang.Long> userMembershipIds)Get aListofSUserMembershipof the given identifiers if they existsjava.util.List<SUserMembership>getUserMembershipsOfGroup(long groupId, int fromIndex, int numberOfResults)Get aListofSUserMembershipfor given group from specific intervaljava.util.List<SUserMembership>getUserMembershipsOfRole(long roleId, int fromIndex, int numberOfResults)Get aListofSUserMembershipfor given role from specific intervaljava.util.List<SUserMembership>getUserMembershipsOfUser(long userId, int fromIndex, int numberOfMemberships)GetSUserMembershipfor a specific interval for a given userjava.util.List<SUserMembership>getUserMembershipsOfUser(long userId, int fromIndex, int numberOfMemberships, java.lang.String field, OrderByType sortOrder)Get aListofSUserMembershipof a given user from specific interval, sorted by field attribute in the givenOrderByTypesortOrder order.java.util.List<SUserMembership>getUserMembershipsOfUser(long userId, int fromIndex, int numberPerPage, OrderByOption sortOrder)Get aListofSUserMembershipof a given user from specific interval, sorted by default field in the givenOrderByTypesortOrder order.java.util.List<SUser>getUsers(int fromIndex, int numberOfUsers)Get aListofSUserfrom a specific interval.java.util.List<SUser>getUsers(int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order)Get aListof childSUserfrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.java.util.List<SUser>getUsers(java.util.List<java.lang.Long> userIds)GetSUserby their userIdsjava.util.List<SUser>getUsersByUsername(java.util.List<java.lang.String> userNames)retrieve aListofSUserfrom their names.java.util.List<SUser>getUsersInGroup(long groupId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order)Get aListofSUserfor givenSGroupfrom specific interval, sorted by field attribute in the givenOrderByTypeorder 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 aListofSUserfor givenSRolefrom specific interval, sorted by field attribute in the givenOrderByTypeorder order.booleanhasCustomUserInfoDefinition(java.lang.String name)Verify if there is aSCustomUserInfoDefinitionof the given namejava.util.List<SCustomUserInfoValue>searchCustomUserInfoValue(QueryOptions options)SearchSCustomUserInfoValuematching the criterias of the givenQueryOptionsjava.util.List<SGroup>searchGroups(QueryOptions options)Search groups according to specific query optionsjava.util.List<SRole>searchRoles(QueryOptions options)Search roles according to specific query optionsjava.util.List<SUser>searchUsers(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 descriptorSRoleupdateRole(SRole role, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater)Update role according to the descriptorSUserupdateUser(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
-
-
-
Field Detail
-
GROUP
static final java.lang.String GROUP
- See Also:
- Constant Field Values
-
CUSTOM_USER_INFO_DEFINITION
static final java.lang.String CUSTOM_USER_INFO_DEFINITION
- See Also:
- Constant Field Values
-
CUSTOM_USER_INFO_VALUE
static final java.lang.String CUSTOM_USER_INFO_VALUE
- See Also:
- Constant Field Values
-
ROLE
static final java.lang.String ROLE
- See Also:
- Constant Field Values
-
USER
static final java.lang.String USER
- See Also:
- Constant Field Values
-
USER_LOGIN
static final java.lang.String USER_LOGIN
- See Also:
- Constant Field Values
-
USER_CONTACT_INFO
static final java.lang.String USER_CONTACT_INFO
- See Also:
- Constant Field Values
-
USERMEMBERSHIP
static final java.lang.String USERMEMBERSHIP
- See Also:
- Constant Field Values
-
ICON
static final java.lang.String ICON
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRole
SRole getRole(long roleId) throws SRoleNotFoundException
Gets theSRolegiven by its identifier.- 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
SRole getRoleByName(java.lang.String roleName) throws SRoleNotFoundException
Get theSRolegiven by its name.- 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.
-
getNumberOfRoles
long getNumberOfRoles() throws SIdentityExceptionGet total number ofSRolefor this tenant- Returns:
- the total number of roles for this tenant
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getRoles
java.util.List<SRole> getRoles(java.util.List<java.lang.Long> roleIds) throws SRoleNotFoundException
Get aListofSRoleby their identifiers- Parameters:
roleIds- the role identifiers- Returns:
- a list of
SRoleobjects - Throws:
SRoleNotFoundException- Occurs when roleId does not refer to any role.
-
getRoles
java.util.List<SRole> getRoles(int fromIndex, int numberOfRoles) throws SIdentityException
Get aListofSRolein specific interval If the number of existing results are lower than the number asked, all results from the given index are retrieved.- 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
java.util.List<SRole> getRoles(int fromIndex, int numberOfRoles, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- 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
-
getGroupByPath
SGroup getGroupByPath(java.lang.String groupPath) throws SGroupNotFoundException
Get theSGroupby its path- Parameters:
groupPath- The group path- Returns:
- the group
- Throws:
SGroupNotFoundException- Occurs when the groupPath does not refer to any group.
-
getGroup
SGroup getGroup(long groupId) throws SGroupNotFoundException
GetSGroupby its identifier- Parameters:
groupId- The group identifier- Returns:
- the group
- Throws:
SGroupNotFoundException- occurs when the groupId does not refer to any group.
-
getNumberOfGroups
long getNumberOfGroups() throws SIdentityExceptionGet total number ofSGroupin the current tenant- Returns:
- the total number of
SGroup - Throws:
SIdentityException- occurs on persistence layer access problem
-
getGroups
java.util.List<SGroup> getGroups(java.util.List<java.lang.Long> groupIds) throws SGroupNotFoundException
Get aListofSGroupfor specific groupIds- Parameters:
groupIds- The group identifiers- Returns:
- a
ListofSGroupobject - Throws:
SGroupNotFoundException- occurs when no given group identifiers refer to any group.
-
getGroups
java.util.List<SGroup> getGroups(int fromIndex, int numberOfGroups) throws SIdentityException
Get 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.- 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
java.util.List<SGroup> getGroups(int fromIndex, int numberOfGroups, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- 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
-
getNumberOfGroupChildren
long getNumberOfGroupChildren(long parentGroupId) throws SIdentityExceptionGet number of child groups for the group identified by the given id- Parameters:
parentGroupId- The parent group identifier- Returns:
- the number of child groups
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getGroupChildren
java.util.List<SGroup> getGroupChildren(long parentGroupId, int fromIndex, int numberOfGroups) throws SIdentityException
Get 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.- Parameters:
parentGroupId- 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
java.util.List<SGroup> getGroupChildren(long parentGroupId, int fromIndex, int numberOfGroups, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- Parameters:
parentGroupId- 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
-
getUser
SUser getUser(long userId) throws SUserNotFoundException
GetSUserby its id- Parameters:
userId- The user identifier- Returns:
- the user
- Throws:
SUserNotFoundException- occurs when the userId does not refer to any user.
-
checkCredentials
boolean checkCredentials(SUser user, java.lang.String password)
Checks whether the couple user/password is valid.- Parameters:
user- the userpassword- the password- Returns:
- true if the couple user/password is valid; false otherwise
-
getUserByUserName
SUser getUserByUserName(java.lang.String username) throws SUserNotFoundException
GetSUserby its name- Parameters:
username- The user name- Returns:
- the user
- Throws:
SUserNotFoundException- occurs when the user name does not refer to any user.
-
getNumberOfUsers
long getNumberOfUsers() throws SIdentityExceptionGet total number ofSUseron the current tenant- Returns:
- the total number of users
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getUsers
java.util.List<SUser> getUsers(java.util.List<java.lang.Long> userIds) throws SUserNotFoundException
GetSUserby their userIds- Parameters:
userIds- AListof user identifiers- Returns:
- a
ListofSUser - Throws:
SUserNotFoundException- occurs when none of the given userIds refer to any user.
-
getUsersByUsername
java.util.List<SUser> getUsersByUsername(java.util.List<java.lang.String> userNames) throws SIdentityException
retrieve aListofSUserfrom their names.- Parameters:
userNames- the list of user names- Returns:
- a
ListofSUser - Throws:
SIdentityException- If an exception occurs when retrieving the users
-
getUsers
java.util.List<SUser> getUsers(int fromIndex, int numberOfUsers) throws SIdentityException
Get aListofSUserfrom a specific interval. If the number of existing results are lower than the number asked, all results from the given index are retrieved.- 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
java.util.List<SUser> getUsers(int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- 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
-
getUsersWithManager
java.util.List<SUser> getUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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.- 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
java.util.List<SUser> getActiveUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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.- 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
java.util.List<SUser> getInactiveUsersWithManager(long managerId, int fromIndex, int numberMaxOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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.- 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
-
getNumberOfUsersByRole
long getNumberOfUsersByRole(long roleId) throws SIdentityExceptionGet total number of users for the given role on the current tenant- Parameters:
roleId- The identifier of role- Returns:
- total number of users related to the given role
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getUsersWithRole
java.util.List<SUser> getUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException
Get 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.- 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
java.util.List<SUser> getActiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException
Get 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.- 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
java.util.List<SUser> getInactiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers) throws SIdentityException
Get 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.- 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
java.util.List<SUser> getUsersWithRole(long roleId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- 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
java.util.List<SUser> getActiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- 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
java.util.List<SUser> getInactiveUsersWithRole(long roleId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- 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
-
getNumberOfUsersByGroup
long getNumberOfUsersByGroup(long groupId) throws SIdentityExceptionGet total number of users for the givenSGroup- Parameters:
groupId- The identifier of theSGroup- Returns:
- total number of users in the given group
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getActiveUsersInGroup
java.util.List<SUser> getActiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- 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
java.util.List<SUser> getInactiveUsersInGroup(long groupId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- 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
-
getUsersInGroup
java.util.List<SUser> getUsersInGroup(long groupId, int fromIndex, int numberOfUsers, java.lang.String field, OrderByType order) throws SIdentityException
Get 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- 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
-
getUserMembershipsOfGroup
java.util.List<SUserMembership> getUserMembershipsOfGroup(long groupId, int fromIndex, int numberOfResults) throws SIdentityException
Get 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.
- Parameters:
groupId- Identifier of the groupfromIndex- Index of the record to be retrieved from. First record has index 0numberOfResults- Number of result to retrieve- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUserMembershipsOfRole
java.util.List<SUserMembership> getUserMembershipsOfRole(long roleId, int fromIndex, int numberOfResults) throws SIdentityException
Get 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.
- Parameters:
roleId- Identifier of the rolefromIndex- Index of the record to be retrieved from. First record has index 0numberOfResults- Number of result to retrieve- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUserMembership
SUserMembership getUserMembership(long userMembershipId) throws SIdentityException
GetSUserMembershipby given id- 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
-
getUserMembership
SUserMembership getUserMembership(long userId, long groupId, long roleId) throws SIdentityException
- 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
SUserMembership getLightUserMembership(long userId, long groupId, long roleId) throws SIdentityException
Get theSUserMembershipof the specific user, group and role without userName, groupName and roleName being set.- 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
-
getUserMemberships
java.util.List<SUserMembership> getUserMemberships(java.util.List<java.lang.Long> userMembershipIds) throws SIdentityException
Get aListofSUserMembershipof the given identifiers if they exists- Parameters:
userMembershipIds- TheSUserMembership's identifiers- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem or if none identifiers match an existingSUserMembership
-
getUserMemberships
java.util.List<SUserMembership> getUserMemberships(int fromIndex, int numberOfResults) throws SIdentityException
Get aListofSUserMembershipfrom specific intervalIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
- Parameters:
fromIndex- Index of the record to be retrieved from. First record has index 0numberOfResults- Number of result to retrieve- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUserMemberships
java.util.List<SUserMembership> getUserMemberships(int fromIndex, int numberOfUserMemberships, OrderByOption orderByOption) throws SIdentityException
Get 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- Parameters:
fromIndex- Index of the record to be retrieved from. First record has index 0numberOfUserMemberships- Number of result to retrievefield- The field used to sortorder- ASC or DESC- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem- See Also:
SUserMembershipBuilderFactory
-
getCustomUserInfoDefinition
SCustomUserInfoDefinition getCustomUserInfoDefinition(long customUserInfoDefinitionId) throws SIdentityException
GetSCustomUserInfoDefinitionby its id- Parameters:
customUserInfoDefinitionId- TheSCustomUserInfoDefinition's identifier- Returns:
- the customUserInfoDefinition
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getCustomUserInfoValue
SCustomUserInfoValue getCustomUserInfoValue(long customUserInfoValueId) throws SCustomUserInfoValueNotFoundException, SCustomUserInfoValueReadException
GetSCustomUserInfoValueby its id- 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
-
getCustomUserInfoDefinitionByName
SCustomUserInfoDefinition getCustomUserInfoDefinitionByName(java.lang.String name) throws SCustomUserInfoDefinitionNotFoundException, SCustomUserInfoDefinitionReadException
Get aSCustomUserInfoDefinitionby its name- 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
boolean hasCustomUserInfoDefinition(java.lang.String name) throws SCustomUserInfoDefinitionReadExceptionVerify if there is aSCustomUserInfoDefinitionof the given name- Parameters:
name- TheSCustomUserInfoDefinition's name to check- Returns:
- the
SCustomUserInfoDefinitionof 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
-
getNumberOfCustomUserInfoDefinition
long getNumberOfCustomUserInfoDefinition() throws SIdentityExceptionGet total number ofSCustomUserInfoDefinitionof the current tenant- Returns:
- the total number of
SCustomUserInfoDefinitionof the current tenant - Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfCustomUserInfoValue
long getNumberOfCustomUserInfoValue(QueryOptions options) throws SBonitaReadException
Get total number ofSCustomUserInfoValueof the current tenant matching the criterias of the givenQueryOptions- Parameters:
options- TheQueryOptionscontaining filtering conditions- Returns:
- the total number of custom user info value
- Throws:
SIdentityException- occurs on persistence layer access problemSBonitaReadException
-
getCustomUserInfoDefinitions
java.util.List<SCustomUserInfoDefinition> getCustomUserInfoDefinitions(java.util.List<java.lang.Long> customUserInfoDefinitionIds) throws SIdentityException
Get aListofSCustomUserInfoDefinitionof the given identifiers- Parameters:
customUserInfoDefinitionIds- AListofSCustomUserInfoDefinitionidentifiers- Returns:
- a
ListofSCustomUserInfoDefinition - Throws:
SIdentityException- occurs on persistence layer access problem or if none identifiers match an existingSCustomUserInfoDefinition
-
getCustomUserInfoValues
java.util.List<SCustomUserInfoValue> getCustomUserInfoValues(java.util.List<java.lang.Long> customUserInfoValueIds) throws SIdentityException
Get aListofSCustomUserInfoValueof the given identifiers- Parameters:
customUserInfoValueIds- AListofSCustomUserInfoValueidentifiers- Returns:
- A
ListofSCustomUserInfoValue - Throws:
SIdentityException- occurs on persistence layer access problem or if none identifiers match an existingSCustomUserInfoDefinition
-
getCustomUserInfoDefinitions
java.util.List<SCustomUserInfoDefinition> getCustomUserInfoDefinitions(int fromIndex, int maxResults) throws SIdentityException
Get aListofSCustomUserInfoDefinitionfrom specific intervalIf the number of existing results are lower than the number asked, all results from the given index are retrieved.
- 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
java.util.List<java.lang.Long> getUserIdsWithCustomUserInfo(java.lang.String userInfoName, java.lang.String userInfoValue, boolean usePartialMatch, int fromIndex, int maxResults) throws SIdentityExceptionRetrieve 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.
- 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- Since:
- 6.3.2
-
searchCustomUserInfoValue
java.util.List<SCustomUserInfoValue> searchCustomUserInfoValue(QueryOptions options) throws SBonitaReadException
SearchSCustomUserInfoValuematching the criterias of the givenQueryOptions- 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
java.util.List<SCustomUserInfoValue> getCustomUserInfoValueOfUserAndDefinitions(long userId, java.util.List<java.lang.Long> definitionsIds) throws SBonitaReadException
Get SCustomUserInfoValues of definitions for a user- Throws:
SBonitaReadException
-
getUserMembershipsOfUser
java.util.List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberOfMemberships) throws SIdentityException
GetSUserMembershipfor a specific interval for a given user- Parameters:
userId- The user's identifierfromIndex- Index of the record to be retrieved from. First record has index 0numberOfMemberships- Number of result to retrieve- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem
-
getUserMembershipsOfUser
java.util.List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberOfMemberships, java.lang.String field, OrderByType sortOrder) throws SIdentityException
Get 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- 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 ordersortOrder- ASC or DESC- Returns:
- a
ListofSUserMembership - Throws:
SIdentityException- occurs on persistence layer access problem- See Also:
SUserMembershipBuilderFactory
-
getUserMembershipsOfUser
java.util.List<SUserMembership> getUserMembershipsOfUser(long userId, int fromIndex, int numberPerPage, OrderByOption sortOrder) throws SIdentityException
Get 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.
- Parameters:
userId- The identifier of userfromIndex- Index of the record to be retrieved from. First record has index 0numberPerPage- Number of result o retrievesortOrder- OrderByOption object containing order information- Returns:
- a list of SUserMembership objects
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfUserMembershipsOfUser
long getNumberOfUserMembershipsOfUser(long userId) throws SIdentityExceptionGet total number ofSUserMembershipfor a specific user- Parameters:
userId- The user's identifier- Returns:
- total number of userMemberships for the specific user
- Throws:
SIdentityException- occurs on persistence layer access problem
-
getNumberOfUserMemberships
long getNumberOfUserMemberships() throws SIdentityExceptionGet total number of userMemberships of the current tenant- Returns:
- total number of userMemberships
- Throws:
SIdentityException- occurs on persistence layer access problem
-
createUser
SUser createUser(SUser user) throws SUserCreationException
CreateSUserand store it to persistence layer- Parameters:
user- The user to create and store- Returns:
- the created user with its identifier set
- Throws:
SUserCreationException- occurs on persistence layer access problem
-
updateUser
void updateUser(SUser user, EntityUpdateDescriptor descriptor) throws SUserUpdateException
UpdateSUseraccording to theEntityUpdateDescriptor- Parameters:
user- TheSUserto updatedescriptor- TheSUsercontents to update- Throws:
SUserUpdateException- occurs on persistence layer access problem
-
updateUser
@Deprecated void updateUser(SUser user, EntityUpdateDescriptor descriptor, boolean isPasswordEncrypted) throws SUserUpdateException
Deprecated.UpdateSUseraccording to theEntityUpdateDescriptor- Parameters:
user- TheSUserto updatedescriptor- TheSUsercontents to updateisPasswordEncrypted- allow to know if the password given in theEntityUpdateDescriptoris encrypted or not- Throws:
SUserUpdateException
-
createCustomUserInfoDefinition
SCustomUserInfoDefinition createCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo) throws SCustomUserInfoDefinitionAlreadyExistsException, SCustomUserInfoDefinitionCreationException
Create custom user info definition in DB for a server given custom user info definition- Parameters:
customUserInfo- SCustomUserInfoDefinition object- Throws:
SCustomUserInfoDefinitionAlreadyExistsException- TODOSCustomUserInfoDefinitionCreationException- TODO
-
updateCustomUserInfoDefinition
void updateCustomUserInfoDefinition(SCustomUserInfoDefinition customUserInfo, EntityUpdateDescriptor descriptor) throws SIdentityException
Update customUserInfoDefinition according to the descriptor- Parameters:
customUserInfo- The customUserInfoDefinition will be updateddescriptor- The update description- Throws:
SIdentityException
-
createCustomUserInfoValue
SCustomUserInfoValue createCustomUserInfoValue(SCustomUserInfoValue customUserInfo) throws SIdentityException
Create profileMetadataValue in DB for give profileMetadataValue object- Parameters:
customUserInfo- A profileMetadataValue object- Throws:
SIdentityException
-
updateCustomUserInfoValue
void updateCustomUserInfoValue(SCustomUserInfoValue customUserInfo, EntityUpdateDescriptor descriptor) throws SIdentityException
Update profileMetadataValue according to the descriptor- Parameters:
customUserInfo- The profileMetadataValue will be updateddescriptor- The update description- Throws:
SIdentityException
-
createRole
void createRole(SRole role, java.lang.String iconFilename, byte[] iconContent) throws SIdentityException
Create role in DB for the given role- Parameters:
role- A role objecticonFilename-iconContent-- Throws:
SIdentityException
-
updateRole
SRole updateRole(SRole role, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException
Update role according to the descriptor- Parameters:
role- The role will be updateddescriptor- The update descriptioniconUpdater-- Throws:
SIdentityException
-
createGroup
void createGroup(SGroup group, java.lang.String iconFileName, byte[] iconContent) throws SGroupCreationException
Create group in DB for the given group object- Parameters:
group- A group objecticonFileName-iconContent-- Throws:
SGroupCreationException
-
updateGroup
void updateGroup(SGroup group, EntityUpdateDescriptor descriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException
Update group according to the descriptor- Parameters:
group- The group will be updateddescriptor- The update descriptioniconUpdater-- Throws:
SIdentityException
-
createUserMembership
void createUserMembership(SUserMembership userMembership) throws SUserMembershipCreationException
Create userMembership in DB for the given userMembership object- Parameters:
userMembership- A userMembership object- Throws:
SUserMembershipCreationException
-
updateUserMembership
void updateUserMembership(SUserMembership userMembership, EntityUpdateDescriptor descriptor) throws SIdentityException
Update userMembership according to the descriptor- Parameters:
userMembership- The userMembership will be updateddescriptor- The update description- Throws:
SIdentityException
-
deleteUser
void deleteUser(SUser user) throws SUserDeletionException
Delete the specific user- Parameters:
user- The user will be deleted- Throws:
SUserDeletionException
-
deleteUser
void deleteUser(long userId) throws SUserDeletionExceptionDelete user by its id- Parameters:
userId- The identifier of user- Throws:
SUserDeletionException
-
deleteAllUsers
void deleteAllUsers() throws SUserDeletionExceptionDelete all users for the connected tenant- Throws:
SUserDeletionException- Since:
- 6.1
-
deleteCustomUserInfoDefinition
void deleteCustomUserInfoDefinition(SCustomUserInfoDefinition metadataDefinition) throws SIdentityException
Delete the specific custom user info- Parameters:
metadataDefinition- The custom user info object will be deleted- Throws:
SIdentityException
-
deleteCustomUserInfoDefinition
void deleteCustomUserInfoDefinition(long customUserInfoDefinitionId) throws SIdentityExceptionDelete the id specified custom user info- Parameters:
customUserInfoDefinitionId- The identifier of custom user info- Throws:
SIdentityException
-
deleteCustomUserInfoValue
void deleteCustomUserInfoValue(SCustomUserInfoValue customUserInfo) throws SIdentityException
Delete the specific profileMetadataValue- Parameters:
customUserInfo- The profileMetadataValue object will be deleted- Throws:
SIdentityException
-
deleteCustomUserInfoValue
void deleteCustomUserInfoValue(long customUserInfoValueId) throws SIdentityExceptionDelete the id specified profileMetadataValue- Parameters:
customUserInfoValueId- The identifier of profileMetadataValue- Throws:
SIdentityException
-
deleteRole
void deleteRole(SRole role) throws SRoleDeletionException
Delete the specific role- Parameters:
role- The role will be deleted- Throws:
SRoleDeletionException
-
deleteRole
void deleteRole(long roleId) throws SRoleNotFoundException, SRoleDeletionExceptionDelete the id specified role- Parameters:
roleId- The role identifier- Throws:
SRoleNotFoundException- Error occurs when no role found with the specific roleIdSRoleDeletionException
-
deleteAllRoles
void deleteAllRoles() throws SRoleDeletionExceptionDelete all roles for the connected tenant- Throws:
SRoleDeletionException- Since:
- 6.1
-
deleteGroup
void deleteGroup(SGroup group) throws SGroupDeletionException
Delete the specific group- Parameters:
group- The group will be deleted- Throws:
SGroupDeletionException
-
deleteGroup
void deleteGroup(long groupId) throws SGroupNotFoundException, SGroupDeletionExceptionDelete the id specified group- Parameters:
groupId- The identifier of group- Throws:
SGroupNotFoundException- Error occurs when no group found with the specific groupIdSGroupDeletionException
-
deleteAllGroups
void deleteAllGroups() throws SGroupDeletionExceptionDelete all groups for the connected tenant- Throws:
SGroupDeletionException- Since:
- 6.1
-
deleteUserMembership
void deleteUserMembership(SUserMembership userMembership) throws SMembershipDeletionException
Delete the specific userMembership- Parameters:
userMembership- The userMembership will be deleted- Throws:
SMembershipDeletionException
-
deleteLightUserMembership
void deleteLightUserMembership(SUserMembership userMembership) throws SMembershipDeletionException
Delete the specific light userMembership- Parameters:
userMembership-- Throws:
SMembershipDeletionException- Since:
- 6.1
-
deleteUserMembership
void deleteUserMembership(long userMembershipId) throws SMembershipDeletionExceptionDelete the id specified userMembership- Parameters:
userMembershipId- The identifier of userMembership- Throws:
SMembershipDeletionException
-
deleteAllUserMemberships
void deleteAllUserMemberships() throws SMembershipDeletionExceptionDelete all user memberships for the connected tenant- Throws:
SMembershipDeletionException- Since:
- 6.1
-
getNumberOfUsers
long getNumberOfUsers(QueryOptions options) throws SBonitaReadException
Get total number of users according to specific query options- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- the satisfied user number
- Throws:
SBonitaReadException
-
searchUsers
java.util.List<SUser> searchUsers(QueryOptions options) throws SBonitaReadException
Search users according to specific query options- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- a list of SUser objects
- Throws:
SBonitaReadException
-
getNumberOfRoles
long getNumberOfRoles(QueryOptions options) throws SBonitaReadException
Get total number of roles according to specific query options- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- the satisfied role number
- Throws:
SBonitaReadException
-
searchRoles
java.util.List<SRole> searchRoles(QueryOptions options) throws SBonitaReadException
Search roles according to specific query options- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- a list of SRole objects
- Throws:
SBonitaReadException
-
getNumberOfGroups
long getNumberOfGroups(QueryOptions options) throws SBonitaReadException
Get total number of groups according to specific query options- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- the group number
- Throws:
SBonitaReadException
-
searchGroups
java.util.List<SGroup> searchGroups(QueryOptions options) throws SBonitaReadException
Search groups according to specific query options- Parameters:
options- The QueryOptions object containing some query conditions- Returns:
- a list of SGroup objects
- Throws:
SBonitaReadException
-
getNumberOfUsersByMembership
long getNumberOfUsersByMembership(long groupId, long roleId) throws SIdentityExceptionGet total number of userMemberships contains specific group and role- Parameters:
groupId- The identifier of grouproleId- The identifier of role- Returns:
- the number of userMemberships
- Throws:
SIdentityException
-
getLightUserMembership
SUserMembership getLightUserMembership(long userMembershipId) throws SIdentityException
Get light userMembership by its id- Parameters:
userMembershipId- The identifier of userMembership- Returns:
- a SUserMembership object without userName, groupName and roleName
- Throws:
SIdentityException
-
getLightUserMemberships
java.util.List<SUserMembership> getLightUserMemberships(int startIndex, int numberOfElements) throws SIdentityException
Get light userMembership in a specific interval, this is used for pagination- 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
-
deleteChildrenGroup
java.util.List<java.lang.Long> deleteChildrenGroup(long groupId) throws SGroupDeletionException, SGroupNotFoundExceptiondelete children groups of the given group if there is some- Parameters:
groupId- The index of the group to delete- Throws:
SGroupDeletionExceptionSGroupNotFoundException
-
getUserContactInfo
SContactInfo getUserContactInfo(long userId, boolean isPersonal) throws SIdentityException
Return the user contact info for a specific user.- 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
-
createUserContactInfo
SContactInfo createUserContactInfo(SContactInfo contactInfo) throws SUserCreationException
Create user contact information for given data- Parameters:
contactInfo- The user contact information object- Returns:
- The contact info created
- Throws:
SUserCreationException
-
updateUserContactInfo
void updateUserContactInfo(SContactInfo contactInfo, EntityUpdateDescriptor descriptor) throws SIdentityException
Update user contact information according to the descriptor- Parameters:
contactInfo- The user contact information to be updateddescriptor- The update description- Throws:
SUserUpdateExceptionSIdentityException
-
createUserWithoutEncryptingPassword
@Deprecated SUser createUserWithoutEncryptingPassword(SUser user) throws SUserCreationException
Deprecated.Create user in DB for given user and- Parameters:
user- The user object- Throws:
SUserCreationException
-
updateUser
SUser updateUser(long userId, EntityUpdateDescriptor userUpdateDescriptor, EntityUpdateDescriptor personalDataUpdateDescriptor, EntityUpdateDescriptor professionalDataUpdateDescriptor, EntityUpdateDescriptor iconUpdater) throws SIdentityException
Update the user having id userId according to the entity update descriptors in parameters- 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
SUser createUser(SUser sUser, SContactInfo personalContactInfo, SContactInfo proContactInfo, java.lang.String iconFilename, byte[] iconContent) throws SUserCreationException
create a new user in database along with its contact data- 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
-
-