Package es.caib.bpm.servei
Class BpmJobExecutorBase
- java.lang.Object
-
- es.caib.bpm.servei.BpmJobExecutorBase
-
- All Implemented Interfaces:
es.caib.bpm.servei.BpmJobExecutor
public abstract class BpmJobExecutorBase extends Object implements es.caib.bpm.servei.BpmJobExecutor
Spring Service base class for
see es.caib.bpm.servei.BpmJobExecutores.caib.bpm.servei.BpmJobExecutor, provides access to all services and entities referenced by this service.
-
-
Constructor Summary
Constructors Constructor Description BpmJobExecutorBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidanotateFailure(long id, Exception e)voidexecuteJob(long id)com.soffid.iam.bpm.service.BpmJobExecutorgetBpmJobExecutor()Gets reference tobpmJobExecutor.ListgetJobs(String lockOwner)DategetNextDueDate(String lockOwner)protected PrincipalgetPrincipal()Gets the currentprincipalif one has been set, otherwise returnsnull.protected abstract voidhandleAnotateFailure(long id, Exception e)protected abstract voidhandleExecuteJob(long id)protected abstract ListhandleGetJobs(String lockOwner)protected abstract DatehandleGetNextDueDate(String lockOwner)protected abstract voidhandleIndexPendingProcesses()protected abstract booleanhandleLockJob(long id, String lockOwner)protected abstract voidhandleUnlockOverdueJobs(Date threshold)voidindexPendingProcesses()booleanlockJob(long id, String lockOwner)voidsetBpmJobExecutor(com.soffid.iam.bpm.service.BpmJobExecutor bpmJobExecutor)Sets reference tobpmJobExecutor.voidunlockOverdueJobs(Date threshold)
-
-
-
Method Detail
-
setBpmJobExecutor
public void setBpmJobExecutor(com.soffid.iam.bpm.service.BpmJobExecutor bpmJobExecutor)
Sets reference tobpmJobExecutor.
-
getBpmJobExecutor
public com.soffid.iam.bpm.service.BpmJobExecutor getBpmJobExecutor()
Gets reference tobpmJobExecutor.
-
lockJob
@Transactional(isolation=DEFAULT, propagation=REQUIRES_NEW, rollbackFor=java.lang.Exception.class) public boolean lockJob(long id, String lockOwner) throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException, Exception- Specified by:
lockJobin interfacees.caib.bpm.servei.BpmJobExecutor- Throws:
es.caib.seycon.ng.exception.InternalErrorExceptionException
-
handleLockJob
protected abstract boolean handleLockJob(long id, String lockOwner) throws Exception- Throws:
Exception
-
getNextDueDate
@Transactional(isolation=DEFAULT, propagation=REQUIRES_NEW, rollbackFor=java.lang.Exception.class) public Date getNextDueDate(String lockOwner) throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException- Specified by:
getNextDueDatein interfacees.caib.bpm.servei.BpmJobExecutor- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleGetNextDueDate
protected abstract Date handleGetNextDueDate(String lockOwner) throws Exception
- Throws:
Exception
-
getJobs
@Transactional(isolation=DEFAULT, propagation=REQUIRES_NEW, rollbackFor=java.lang.Exception.class) public List getJobs(String lockOwner) throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException- Specified by:
getJobsin interfacees.caib.bpm.servei.BpmJobExecutor- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleGetJobs
protected abstract List handleGetJobs(String lockOwner) throws Exception
- Throws:
Exception
-
anotateFailure
@Transactional(isolation=DEFAULT, propagation=REQUIRES_NEW, rollbackFor=java.lang.Exception.class) public void anotateFailure(long id, Exception e) throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException- Specified by:
anotateFailurein interfacees.caib.bpm.servei.BpmJobExecutor- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleAnotateFailure
protected abstract void handleAnotateFailure(long id, Exception e) throws Exception- Throws:
Exception
-
executeJob
@Transactional(isolation=DEFAULT, propagation=REQUIRES_NEW, rollbackFor=java.lang.Exception.class) public void executeJob(long id) throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException, Exception- Specified by:
executeJobin interfacees.caib.bpm.servei.BpmJobExecutor- Throws:
es.caib.seycon.ng.exception.InternalErrorExceptionException
-
handleExecuteJob
protected abstract void handleExecuteJob(long id) throws Exception- Throws:
Exception
-
indexPendingProcesses
@Transactional(isolation=DEFAULT, propagation=REQUIRES_NEW, rollbackFor=java.lang.Exception.class) public void indexPendingProcesses() throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException- Specified by:
indexPendingProcessesin interfacees.caib.bpm.servei.BpmJobExecutor- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleIndexPendingProcesses
protected abstract void handleIndexPendingProcesses() throws Exception- Throws:
Exception
-
unlockOverdueJobs
@Transactional(isolation=DEFAULT, propagation=REQUIRES_NEW, rollbackFor=java.lang.Exception.class) public void unlockOverdueJobs(Date threshold) throws es.caib.seycon.ng.exception.InternalErrorException, es.caib.seycon.ng.exception.InternalErrorException- Specified by:
unlockOverdueJobsin interfacees.caib.bpm.servei.BpmJobExecutor- Throws:
es.caib.seycon.ng.exception.InternalErrorException
-
handleUnlockOverdueJobs
protected abstract void handleUnlockOverdueJobs(Date threshold) throws Exception
- Throws:
Exception
-
getPrincipal
protected Principal getPrincipal()
Gets the currentprincipalif one has been set, otherwise returnsnull.- Returns:
- the current principal
-
-