public class ActorMappingServiceImpl extends java.lang.Object implements ActorMappingService
ACTOR, ACTOR_MEMBER| Constructor and Description |
|---|
ActorMappingServiceImpl(ReadPersistenceService persistenceService,
Recorder recorder,
EventService eventService,
QueriableLoggerService queriableLoggerService,
IdentityService identityService) |
| Modifier and Type | Method and Description |
|---|---|
SActor |
addActor(SActor actor)
Create an actor by given actor
|
java.util.Set<SActor> |
addActors(java.util.Set<SActor> actors)
Create actors by given actors
|
SActorMember |
addGroupToActor(long actorId,
long groupId)
Add the groupId specified group to the actorId specified actor
|
SActorMember |
addRoleAndGroupToActor(long actorId,
long roleId,
long groupId)
Add the roleId and groupId specified relationship to the actorId specified actor
|
SActorMember |
addRoleToActor(long actorId,
long roleId)
Add the roleId specified role to the actorId specified actor
|
SActorMember |
addUserToActor(long actorId,
long userId)
Add the userId specified user to the actorId specified actor
|
boolean |
canUserStartProcessDefinition(long userId,
long processDefinitionId)
Is a specified user allowed to start a process?
|
SActorMember |
deleteActorMember(long actorMemberId)
Remove actorMember for the give actorMemberId
|
void |
deleteActorMember(SActorMember sActorMember)
Remove an actor member
|
void |
deleteActors(long scopeId)
Delete actors in the id specified scope
|
void |
deleteAllActorMembers()
Delete all actor members for the connected tenant
|
SActor |
getActor(long actorId)
Get actor by actor id
If the actor by a given actorId is not found, it will throw SActorNotFoundException
|
SActor |
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 SActorNotFoundException
|
SActorMember |
getActorMember(long actorId,
long userId,
long groupId,
long roleId)
Get the actor member
|
java.util.List<SActorMember> |
getActorMembers(long actorId,
int fromIndex,
int numberOfActorMembers)
Get list of SActorMember objects by pagination
|
java.util.List<SActorMember> |
getActorMembersOfGroup(long groupId,
int fromIndex,
int numberOfActorMembers)
Get a list of SActorMember objects for given groupId
|
java.util.List<SActorMember> |
getActorMembersOfRole(long roleId,
int fromIndex,
int numberOfActorMembers)
Get a list of SActorMember objects for given roleId
|
java.util.List<SActorMember> |
getActorMembersOfUser(long userId,
int fromIndex,
int numberOfActorMembers)
Get a list of SActorMember objects for given userId
|
java.util.List<SActor> |
getActors(java.util.List<java.lang.Long> actorIds)
Get a list of actors by the given list of actor ids
|
java.util.List<SActor> |
getActors(long processDefinitionId,
QueryOptions queryOptions)
Get paginated actors
|
java.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 scopeIds
|
long |
getNumberOfActorMembers(long actorId)
Get number of ActorMembers for give actorId
|
long |
getNumberOfGroupsOfActor(long actorId)
Get the number of groups corresponding to an actor
|
long |
getNumberOfMembershipsOfActor(long actorId)
Get the number of memberships (role and group) of an actor
|
long |
getNumberOfRolesOfActor(long actorId)
Get the number of roles of an actor
|
long |
getNumberOfUsersOfActor(long actorId)
Return the number of users corresponding to an actor
|
java.util.List<java.lang.Long> |
getPossibleUserIdsOfActorId(long actorId,
int startIndex,
int maxResults) |
SActor |
updateActor(long actorId,
EntityUpdateDescriptor descriptor)
Update actor by its id
If the actor by a given actorId is not found, it will throw processDefinitionNotFountExcetion
|
public ActorMappingServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, EventService eventService, QueriableLoggerService queriableLoggerService, IdentityService identityService)
public java.util.Set<SActor> addActors(java.util.Set<SActor> actors) throws SActorCreationException
ActorMappingServiceaddActors in interface ActorMappingServiceactors - The given actors without IDsSActorCreationExceptionpublic SActor addActor(SActor actor) throws SActorCreationException
ActorMappingServiceaddActor in interface ActorMappingServiceactor - The given actor without idSActorCreationExceptionpublic SActor getActor(long actorId) throws SActorNotFoundException, SBonitaReadException
ActorMappingServicegetActor in interface ActorMappingServiceactorId - Id of actorSActorNotFoundExceptionSBonitaReadExceptionpublic long getNumberOfUsersOfActor(long actorId)
ActorMappingServicegetNumberOfUsersOfActor in interface ActorMappingServiceactorId - the id of the actor to retrieve the users frompublic long getNumberOfRolesOfActor(long actorId)
ActorMappingServicegetNumberOfRolesOfActor in interface ActorMappingServiceactorId - the id corresponding to an actorpublic long getNumberOfGroupsOfActor(long actorId)
ActorMappingServicegetNumberOfGroupsOfActor in interface ActorMappingServiceactorId - the id of the actor to retrieve the groups frompublic long getNumberOfMembershipsOfActor(long actorId)
ActorMappingServicegetNumberOfMembershipsOfActor in interface ActorMappingServiceactorId - the id of the actor to retrieve the memberships frompublic java.util.List<SActor> getActors(java.util.List<java.lang.Long> actorIds) throws SBonitaReadException
ActorMappingServicegetActors in interface ActorMappingServiceactorIds - the list of actor ids to retrieveSBonitaReadExceptionpublic SActor getActor(java.lang.String actorName, long scopeId) throws SActorNotFoundException
ActorMappingServicegetActor in interface ActorMappingServiceactorName - Name of actorscopeId - Id of scope, it can be processDefinitionIdSActorNotFoundException - Error thrown if no actor have an id corresponding to the parameter.public SActor updateActor(long actorId, EntityUpdateDescriptor descriptor) throws SActorNotFoundException, SActorUpdateException, SBonitaReadException
ActorMappingServiceupdateActor in interface ActorMappingServiceactorId - Id of actordescriptor - Update descriptionSActorNotFoundException - Error thrown if no actor have an id corresponding to the parameter actorId.SActorUpdateException - Error thrown if has exceptions while try to update an actorSBonitaReadExceptionpublic void deleteActors(long scopeId)
throws SActorDeletionException
ActorMappingServicedeleteActors in interface ActorMappingServicescopeId - Id of scope, it can be processDefinitionIdSActorDeletionException - Error thrown if has exceptions while try to delete actorspublic java.util.List<SActor> getActors(java.util.Set<java.lang.Long> scopeIds, java.lang.Long userId) throws SBonitaReadException
ActorMappingServicegetActors in interface ActorMappingServicescopeIds - Ids of scope, it can be processDefinitionIduserId - Id of user which is added to actorSBonitaReadExceptionpublic SActorMember addUserToActor(long actorId, long userId) throws SActorMemberCreationException
ActorMappingServiceaddUserToActor in interface ActorMappingServiceactorId - Id of actoruserId - Id of userSActorMemberCreationException - Error thrown if has exceptions while try to create the SActorMember objectpublic SActorMember addGroupToActor(long actorId, long groupId) throws SActorNotFoundException, SActorMemberCreationException
ActorMappingServiceaddGroupToActor in interface ActorMappingServiceactorId - Id of actorgroupId - Id of groupSActorNotFoundException - 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 objectpublic SActorMember addRoleToActor(long actorId, long roleId) throws SActorMemberCreationException
ActorMappingServiceaddRoleToActor in interface ActorMappingServiceactorId - Id of actorroleId - Id of roleSActorMemberCreationException - Error thrown if has exceptions while try to create the SActorMember objectpublic SActorMember addRoleAndGroupToActor(long actorId, long roleId, long groupId) throws SActorNotFoundException, SActorMemberCreationException
ActorMappingServiceaddRoleAndGroupToActor in interface ActorMappingServiceactorId - Id of actorroleId - Id of rolegroupId - Id of groupSActorNotFoundException - 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 objectpublic SActorMember deleteActorMember(long actorMemberId) throws SActorMemberNotFoundException, SActorMemberDeletionException
ActorMappingServicedeleteActorMember in interface ActorMappingServiceactorMemberId - Id of actorMemberSActorMemberNotFoundException - 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 objectpublic void deleteActorMember(SActorMember sActorMember) throws SActorMemberDeletionException
ActorMappingServicedeleteActorMember in interface ActorMappingServicesActorMember - the actorMember to removeSActorMemberDeletionException - Error thrown if has exceptions while try to remove the SActorMember objectpublic SActorMember getActorMember(long actorId, long userId, long groupId, long roleId) throws SBonitaReadException
ActorMappingServicegetActorMember in interface ActorMappingServiceactorId - The identifier of the actoruserId - The identifier of the usergroupId - The identifier of the grouproleId - The identifier of the roleSBonitaReadExceptionpublic long getNumberOfActorMembers(long actorId)
throws SBonitaReadException
ActorMappingServicegetNumberOfActorMembers in interface ActorMappingServiceactorId - Id of actorSBonitaReadExceptionpublic java.util.List<SActorMember> getActorMembers(long actorId, int fromIndex, int numberOfActorMembers) throws SBonitaReadException
ActorMappingServicegetActorMembers in interface ActorMappingServiceactorId - Id of actorfromIndex - 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.SBonitaReadExceptionpublic java.util.List<SActorMember> getActorMembersOfUser(long userId, int fromIndex, int numberOfActorMembers) throws SBonitaReadException
ActorMappingServicegetActorMembersOfUser in interface ActorMappingServiceuserId - 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.SBonitaReadExceptionpublic java.util.List<SActorMember> getActorMembersOfGroup(long groupId, int fromIndex, int numberOfActorMembers) throws SBonitaReadException
ActorMappingServicegetActorMembersOfGroup in interface ActorMappingServicegroupId - Id of groupSBonitaReadExceptionpublic java.util.List<SActorMember> getActorMembersOfRole(long roleId, int fromIndex, int numberOfActorMembers) throws SBonitaReadException
ActorMappingServicegetActorMembersOfRole in interface ActorMappingServiceroleId - Id of roleSBonitaReadExceptionpublic boolean canUserStartProcessDefinition(long userId,
long processDefinitionId)
throws SBonitaReadException
ActorMappingServicecanUserStartProcessDefinition in interface ActorMappingServiceuserId - Id of userprocessDefinitionId - Id of processDefinitionSBonitaReadExceptionpublic java.util.List<SActor> getActors(long processDefinitionId, QueryOptions queryOptions) throws SBonitaReadException
ActorMappingServicegetActors in interface ActorMappingServiceprocessDefinitionId - identifier of process definitionSBonitaReadExceptionpublic void deleteAllActorMembers()
throws SActorMemberDeletionException
ActorMappingServicedeleteAllActorMembers in interface ActorMappingServiceSActorMemberDeletionExceptionpublic java.util.List<java.lang.Long> getPossibleUserIdsOfActorId(long actorId,
int startIndex,
int maxResults)
throws SBonitaReadException
getPossibleUserIdsOfActorId in interface ActorMappingServiceSBonitaReadException