Class SupervisorMappingServiceImpl
- java.lang.Object
-
- org.bonitasoft.engine.supervisor.mapping.impl.SupervisorMappingServiceImpl
-
- All Implemented Interfaces:
SupervisorMappingService
public class SupervisorMappingServiceImpl extends java.lang.Object implements 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
Constructors Constructor Description SupervisorMappingServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, EventService eventService, QueriableLoggerService queriableLoggerService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SProcessSupervisorcreateProcessSupervisor(SProcessSupervisor supervisor)Create supervisor in DB according to the given supervisorvoiddeleteAllProcessSupervisors()Delete 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 criteriaSProcessSupervisorgetProcessSupervisor(long supervisorId)get supervisor without display name by its idjava.lang.BooleanisProcessSupervisor(long processDefinitionId, long userId)Verify if the id specified user is the supervisor of id specified process definitionjava.util.List<SProcessSupervisor>searchProcessSupervisors(QueryOptions queryOptions)Search all supervisors suit to the specific criteria
-
-
-
Constructor Detail
-
SupervisorMappingServiceImpl
public SupervisorMappingServiceImpl(ReadPersistenceService persistenceService, Recorder recorder, EventService eventService, QueriableLoggerService queriableLoggerService)
-
-
Method Detail
-
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, SSupervisorDeletionExceptionDescription 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
public void deleteAllProcessSupervisors() throws SSupervisorDeletionExceptionDescription copied from interface:SupervisorMappingServiceDelete all supervisors for the connected tenant- Specified by:
deleteAllProcessSupervisorsin interfaceSupervisorMappingService- Throws:
SSupervisorDeletionException
-
isProcessSupervisor
public java.lang.Boolean isProcessSupervisor(long processDefinitionId, long userId) throws SBonitaReadExceptionDescription 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 java.util.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
public long getNumberOfProcessSupervisors(QueryOptions searchOptions) throws SBonitaReadException
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
-
-