Class SupervisorMappingServiceImpl
java.lang.Object
org.bonitasoft.engine.supervisor.mapping.impl.SupervisorMappingServiceImpl
- All Implemented Interfaces:
SupervisorMappingService
- Author:
- Yanyan Liu, Elias Ricken de Medeiros, Celine Souchet
-
Field Summary
Fields inherited from interface org.bonitasoft.engine.supervisor.mapping.SupervisorMappingService
SUPERVISOR -
Constructor Summary
ConstructorsConstructorDescriptionSupervisorMappingServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, EventService eventService, QueriableLoggerService queriableLoggerService) -
Method Summary
Modifier and TypeMethodDescriptioncreateProcessSupervisor(SProcessSupervisor supervisor) Create supervisor in DB according to the given supervisorvoidDelete all supervisors for the connected tenantvoiddeleteProcessSupervisor(long supervisorId) Delete the id specified supervisorvoiddeleteProcessSupervisor(SProcessSupervisor supervisor) Delete the specific supervisorlonggetNumberOfProcessSupervisors(QueryOptions searchOptions) Get total number of supervisors suit to the specific criteriagetProcessSupervisor(long supervisorId) get supervisor without display name by its idisProcessSupervisor(long processDefinitionId, long userId) Verify if the id specified user is the supervisor of id specified process definitionsearchProcessSupervisors(QueryOptions queryOptions) Search all supervisors suit to the specific criteria
-
Constructor Details
-
SupervisorMappingServiceImpl
public SupervisorMappingServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, EventService eventService, QueriableLoggerService queriableLoggerService)
-
-
Method Details
-
createProcessSupervisor
public SProcessSupervisor createProcessSupervisor(SProcessSupervisor supervisor) throws SSupervisorCreationException Description copied from interface:SupervisorMappingServiceCreate supervisor in DB according to the given supervisor- Specified by:
createProcessSupervisorin interfaceSupervisorMappingService- Parameters:
supervisor- a SSupervisor object- Returns:
- the new created supervisor
- Throws:
SSupervisorCreationException
-
getProcessSupervisor
public SProcessSupervisor getProcessSupervisor(long supervisorId) throws SSupervisorNotFoundException Description copied from interface:SupervisorMappingServiceget supervisor without display name by its id- Specified by:
getProcessSupervisorin interfaceSupervisorMappingService- Parameters:
supervisorId- identifier of supervisor- Returns:
- the supervisor with id equals the parameter
- Throws:
SSupervisorNotFoundException
-
deleteProcessSupervisor
public void deleteProcessSupervisor(long supervisorId) throws SSupervisorNotFoundException, SSupervisorDeletionException Description copied from interface:SupervisorMappingServiceDelete the id specified supervisor- Specified by:
deleteProcessSupervisorin interfaceSupervisorMappingService- Parameters:
supervisorId- identifier of supervisor- Throws:
SSupervisorNotFoundExceptionSSupervisorDeletionException
-
deleteProcessSupervisor
public void deleteProcessSupervisor(SProcessSupervisor supervisor) throws SSupervisorDeletionException Description copied from interface:SupervisorMappingServiceDelete the specific supervisor- Specified by:
deleteProcessSupervisorin interfaceSupervisorMappingService- Parameters:
supervisor- the supervisor will be deleted- Throws:
SSupervisorDeletionException
-
deleteAllProcessSupervisors
Description copied from interface:SupervisorMappingServiceDelete all supervisors for the connected tenant- Specified by:
deleteAllProcessSupervisorsin interfaceSupervisorMappingService- Throws:
SSupervisorDeletionException
-
isProcessSupervisor
public Boolean isProcessSupervisor(long processDefinitionId, long userId) throws SBonitaReadException Description copied from interface:SupervisorMappingServiceVerify if the id specified user is the supervisor of id specified process definition- Specified by:
isProcessSupervisorin interfaceSupervisorMappingService- Parameters:
processDefinitionId- identifier of process definitionuserId- identifier of user- Returns:
- true if user is supervisor of the process, false otherwise
- Throws:
SBonitaReadException
-
searchProcessSupervisors
public List<SProcessSupervisor> searchProcessSupervisors(QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:SupervisorMappingServiceSearch all supervisors suit to the specific criteria- Specified by:
searchProcessSupervisorsin interfaceSupervisorMappingService- Parameters:
queryOptions- The QueryOptions object containing some query conditions- Returns:
- a list of SSupervisor objects
- Throws:
SBonitaReadException
-
getNumberOfProcessSupervisors
Description copied from interface:SupervisorMappingServiceGet total number of supervisors suit to the specific criteria- Specified by:
getNumberOfProcessSupervisorsin interfaceSupervisorMappingService- Parameters:
searchOptions- The QueryOptions object containing some query conditions- Returns:
- a list of SSupervisor objects
- Throws:
SBonitaReadException
-