Interface ActorMappingService
-
- All Known Implementing Classes:
ActorMappingServiceImpl
public interface ActorMappingService
- Since:
- 6.0
- Author:
- Matthieu Chaffotte, Elias Ricken de Medeiros, Celine Souchet
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACTOR
static java.lang.String
ACTOR_MEMBER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SActor
addActor(SActor actor)
Create an actor by given actorjava.util.Set<SActor>
addActors(java.util.Set<SActor> actors)
Create actors by given actorsSActorMember
addGroupToActor(long actorId, long groupId)
Add the groupId specified group to the actorId specified actorSActorMember
addRoleAndGroupToActor(long actorId, long roleId, long groupId)
Add the roleId and groupId specified relationship to the actorId specified actorSActorMember
addRoleToActor(long actorId, long roleId)
Add the roleId specified role to the actorId specified actorSActorMember
addUserToActor(long actorId, long userId)
Add the userId specified user to the actorId specified actorboolean
canUserStartProcessDefinition(long userId, long processDefinitionId)
Is a specified user allowed to start a process?SActorMember
deleteActorMember(long actorMemberId)
Remove actorMember for the give actorMemberIdvoid
deleteActorMember(SActorMember actorMember)
Remove an actor membervoid
deleteActors(long scopeId)
Delete actors in the id specified scopevoid
deleteAllActorMembers()
Delete all actor members for the connected tenantSActor
getActor(long actorId)
Get actor by actor id If the actor by a given actorId is not found, it will throw SActorNotFoundExceptionSActor
getActor(java.lang.String actorName, long scopeId)
Get actor by actor name and scope id If the actor by a given actorName and scopeId is not found, it will throw SActorNotFoundExceptionSActorMember
getActorMember(long actorId, long userId, long groupId, long roleId)
Get the actor memberjava.util.List<SActorMember>
getActorMembers(long actorId, int index, int numberOfActorMembers)
Get list of SActorMember objects by paginationjava.util.List<SActorMember>
getActorMembersOfGroup(long groupId, int index, int numberOfActorMembers)
Get a list of SActorMember objects for given groupIdjava.util.List<SActorMember>
getActorMembersOfRole(long roleId, int fromIndex, int numberOfActorMembers)
Get a list of SActorMember objects for given roleIdjava.util.List<SActorMember>
getActorMembersOfUser(long userId, int fromIndex, int numberOfActorMembers)
Get a list of SActorMember objects for given userIdjava.util.List<SActor>
getActors(long processDefinitionId, QueryOptions queryOptions)
Get paginated actorsjava.util.List<SActor>
getActors(java.util.List<java.lang.Long> actorIds)
Get a list of actors by the given list of actor idsjava.util.List<SActor>
getActors(java.util.Set<java.lang.Long> scopeIds, java.lang.Long userId)
Get a list of all actors for the id specified user in certain scopes specified by scopeIdslong
getNumberOfActorMembers(long actorId)
Get number of ActorMembers for give actorIdlong
getNumberOfGroupsOfActor(long actorId)
Get the number of groups corresponding to an actorlong
getNumberOfMembershipsOfActor(long actorId)
Get the number of memberships (role and group) of an actorlong
getNumberOfRolesOfActor(long actorId)
Get the number of roles of an actorlong
getNumberOfUsersOfActor(long actorId)
Return the number of users corresponding to an actorjava.util.List<java.lang.Long>
getPossibleUserIdsOfActorId(long actorId, int startIndex, int maxResults)
SActor
updateActor(long actorId, EntityUpdateDescriptor updateDescriptor)
Update actor by its id If the actor by a given actorId is not found, it will throw processDefinitionNotFountExcetion
-
-
-
Field Detail
-
ACTOR
static final java.lang.String ACTOR
- See Also:
- Constant Field Values
-
ACTOR_MEMBER
static final java.lang.String ACTOR_MEMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
addActor
SActor addActor(SActor actor) throws SActorCreationException
Create an actor by given actor- Parameters:
actor
- The given actor without id- Returns:
- the new created actor with id
- Throws:
SActorCreationException
-
addActors
java.util.Set<SActor> addActors(java.util.Set<SActor> actors) throws SActorCreationException
Create actors by given actors- Parameters:
actors
- The given actors without IDs- Returns:
- The set of the new created actors
- Throws:
SActorCreationException
-
getActor
SActor getActor(long actorId) throws SActorNotFoundException, SBonitaReadException
Get actor by actor id If the actor by a given actorId is not found, it will throw SActorNotFoundException- Parameters:
actorId
- Id of actor- Returns:
- SActor object response to the given actorId
- Throws:
SActorNotFoundException
SBonitaReadException
-
getActor
SActor getActor(java.lang.String actorName, long scopeId) throws SActorNotFoundException
Get actor by actor name and scope id If the actor by a given actorName and scopeId is not found, it will throw SActorNotFoundException- Parameters:
actorName
- Name of actorscopeId
- Id of scope, it can be processDefinitionId- Returns:
- SActor object corresponding to the given actorName and scopeId
- Throws:
SActorNotFoundException
- Error thrown if no actor have an id corresponding to the parameter.
-
getActors
java.util.List<SActor> getActors(java.util.Set<java.lang.Long> scopeIds, java.lang.Long userId) throws SBonitaReadException
Get a list of all actors for the id specified user in certain scopes specified by scopeIds- Parameters:
scopeIds
- Ids of scope, it can be processDefinitionIduserId
- Id of user which is added to actor- Returns:
- The list of SActor Objects
- Throws:
SBonitaReadException
-
updateActor
SActor updateActor(long actorId, EntityUpdateDescriptor updateDescriptor) throws SActorNotFoundException, SActorUpdateException, SBonitaReadException
Update actor by its id If the actor by a given actorId is not found, it will throw processDefinitionNotFountExcetion- Parameters:
actorId
- Id of actorupdateDescriptor
- Update description- Returns:
- the updated actor
- Throws:
SActorNotFoundException
- Error thrown if no actor have an id corresponding to the parameter actorId.SActorUpdateException
- Error thrown if has exceptions while try to update an actorSBonitaReadException
-
deleteActors
void deleteActors(long scopeId) throws SActorDeletionException
Delete actors in the id specified scope- Parameters:
scopeId
- Id of scope, it can be processDefinitionId- Throws:
SActorDeletionException
- Error thrown if has exceptions while try to delete actors
-
addUserToActor
SActorMember addUserToActor(long actorId, long userId) throws SActorNotFoundException, SActorMemberCreationException
Add the userId specified user to the actorId specified actor- Parameters:
actorId
- Id of actoruserId
- Id of user- Returns:
- SActorMember object
- Throws:
SActorNotFoundException
- Error thrown if no actor have an id corresponding to the parameter actorId.SActorMemberCreationException
- Error thrown if has exceptions while try to create the SActorMember object
-
addGroupToActor
SActorMember addGroupToActor(long actorId, long groupId) throws SActorNotFoundException, SActorMemberCreationException
Add the groupId specified group to the actorId specified actor- Parameters:
actorId
- Id of actorgroupId
- Id of group- Returns:
- SActorMember object
- Throws:
SActorNotFoundException
- Error thrown if no actor have an id corresponding to the parameter actorId.SActorMemberCreationException
- Error thrown if has exceptions while try to create the SActorMember object
-
addRoleToActor
SActorMember addRoleToActor(long actorId, long roleId) throws SActorNotFoundException, SActorMemberCreationException
Add the roleId specified role to the actorId specified actor- Parameters:
actorId
- Id of actorroleId
- Id of role- Returns:
- SActorMember object
- Throws:
SActorNotFoundException
- Error thrown if no actor have an id corresponding to the parameter actorId.SActorMemberCreationException
- Error thrown if has exceptions while try to create the SActorMember object
-
addRoleAndGroupToActor
SActorMember addRoleAndGroupToActor(long actorId, long roleId, long groupId) throws SActorNotFoundException, SActorMemberCreationException
Add the roleId and groupId specified relationship to the actorId specified actor- Parameters:
actorId
- Id of actorroleId
- Id of rolegroupId
- Id of group- Returns:
- SActorMember object
- Throws:
SActorNotFoundException
- Error thrown if no actor have an id corresponding to the parameter actorId.SActorMemberCreationException
- Error thrown if has exceptions while try to create the SActorMember object
-
deleteActorMember
SActorMember deleteActorMember(long actorMemberId) throws SActorMemberNotFoundException, SActorMemberDeletionException
Remove actorMember for the give actorMemberId- Parameters:
actorMemberId
- Id of actorMember- Throws:
SActorMemberNotFoundException
- Error thrown if no actorMember have an id corresponding to the parameter actorMemberId.SActorMemberDeletionException
- Error thrown if has exceptions while try to remove the SActorMember object
-
deleteActorMember
void deleteActorMember(SActorMember actorMember) throws SActorMemberDeletionException
Remove an actor member- Parameters:
actorMember
- the actorMember to remove- Throws:
SActorMemberDeletionException
- Error thrown if has exceptions while try to remove the SActorMember object
-
getActorMembers
java.util.List<SActorMember> getActorMembers(long actorId, int index, int numberOfActorMembers) throws SBonitaReadException
Get list of SActorMember objects by pagination- Parameters:
actorId
- Id of actorindex
- Index of the record to be retrieved from. First record has pageNumber 0.numberOfActorMembers
- Number of result we want to get. Maximum number of result returned.- Returns:
- List of SActorMember objects, ordered by id ascending
- Throws:
SBonitaReadException
-
getNumberOfActorMembers
long getNumberOfActorMembers(long actorId) throws SBonitaReadException
Get number of ActorMembers for give actorId- Parameters:
actorId
- Id of actor- Returns:
- the number of ActorMembers
- Throws:
SBonitaReadException
-
getActorMembersOfUser
java.util.List<SActorMember> getActorMembersOfUser(long userId, int fromIndex, int numberOfActorMembers) throws SBonitaReadException
Get a list of SActorMember objects for given userId- Parameters:
userId
- Id of userfromIndex
- Index of the record to be retrieved from. First record has pageNumber 0.numberOfActorMembers
- Number of result we want to get. Maximum number of result returned.- Returns:
- List of SActorMember objects, ordered by id ascending
- Throws:
SBonitaReadException
-
getActorMembersOfGroup
java.util.List<SActorMember> getActorMembersOfGroup(long groupId, int index, int numberOfActorMembers) throws SBonitaReadException
Get a list of SActorMember objects for given groupId- Parameters:
groupId
- Id of group- Returns:
- a list of SActorMember objects, ordered by id ascending
- Throws:
SBonitaReadException
-
getActorMembersOfRole
java.util.List<SActorMember> getActorMembersOfRole(long roleId, int fromIndex, int numberOfActorMembers) throws SBonitaReadException
Get a list of SActorMember objects for given roleId- Parameters:
roleId
- Id of role- Returns:
- a list of SActorMember objects, ordered by id ascending
- Throws:
SBonitaReadException
-
canUserStartProcessDefinition
boolean canUserStartProcessDefinition(long userId, long processDefinitionId) throws SBonitaReadException
Is a specified user allowed to start a process?- Parameters:
userId
- Id of userprocessDefinitionId
- Id of processDefinition- Returns:
- a list of SActor objects
- Throws:
SBonitaReadException
-
getActors
java.util.List<SActor> getActors(java.util.List<java.lang.Long> actorIds) throws SActorNotFoundException, SBonitaReadException
Get a list of actors by the given list of actor ids- Parameters:
actorIds
- the list of actor ids to retrieve- Returns:
- a list of actors
- Throws:
SActorNotFoundException
SBonitaReadException
-
getActors
java.util.List<SActor> getActors(long processDefinitionId, QueryOptions queryOptions) throws SBonitaReadException
Get paginated actors- Parameters:
processDefinitionId
- identifier of process definition- Returns:
- the list of actors
- Throws:
SBonitaReadException
-
getNumberOfUsersOfActor
long getNumberOfUsersOfActor(long actorId)
Return the number of users corresponding to an actor- Parameters:
actorId
- the id of the actor to retrieve the users from- Returns:
- Number of users mapped to actor
-
getNumberOfRolesOfActor
long getNumberOfRolesOfActor(long actorId)
Get the number of roles of an actor- Parameters:
actorId
- the id corresponding to an actor- Returns:
- Number of roles mapped to actor
-
getNumberOfGroupsOfActor
long getNumberOfGroupsOfActor(long actorId) throws java.lang.RuntimeException
Get the number of groups corresponding to an actor- Parameters:
actorId
- the id of the actor to retrieve the groups from- Returns:
- Number of groups mapped to actor
- Throws:
java.lang.RuntimeException
-
getNumberOfMembershipsOfActor
long getNumberOfMembershipsOfActor(long actorId)
Get the number of memberships (role and group) of an actor- Parameters:
actorId
- the id of the actor to retrieve the memberships from- Returns:
- Number of memberships mapped to actor
-
deleteAllActorMembers
void deleteAllActorMembers() throws SActorMemberDeletionException
Delete all actor members for the connected tenant- Throws:
SActorMemberDeletionException
- Since:
- 6.1
-
getPossibleUserIdsOfActorId
java.util.List<java.lang.Long> getPossibleUserIdsOfActorId(long actorId, int startIndex, int maxResults) throws SBonitaReadException
- Throws:
SBonitaReadException
-
getActorMember
SActorMember getActorMember(long actorId, long userId, long groupId, long roleId) throws SBonitaReadException
Get the actor member- Parameters:
actorId
- The identifier of the actoruserId
- The identifier of the usergroupId
- The identifier of the grouproleId
- The identifier of the role- Returns:
- The corresponding actor member
- Throws:
SBonitaReadException
- Since:
- 6.3
-
-