Class TimerDeclarationImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.jobexecutor.JobDeclaration<ExecutionEntity,TimerEntity>
-
- org.camunda.bpm.engine.impl.jobexecutor.TimerDeclarationImpl
-
- All Implemented Interfaces:
java.io.Serializable
public class TimerDeclarationImpl extends JobDeclaration<ExecutionEntity,TimerEntity>
- Author:
- Tom Baeyens, Daniel Meyer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Expression
description
protected java.lang.String
eventScopeActivityId
protected boolean
isInterruptingTimer
protected java.lang.Boolean
isParallelMultiInstance
protected java.lang.String
rawJobHandlerConfiguration
protected java.lang.String
repeat
protected TimerDeclarationType
type
-
Fields inherited from class org.camunda.bpm.engine.impl.jobexecutor.JobDeclaration
activity, exclusive, jobConfiguration, jobDefinitionId, jobHandlerConfiguration, jobHandlerType, jobPriorityProvider
-
-
Constructor Summary
Constructors Constructor Description TimerDeclarationImpl(Expression expression, TimerDeclarationType type, java.lang.String jobHandlerType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TimerEntity
createStartTimerInstance(java.lang.String deploymentId)
TimerEntity
createTimer(java.lang.String deploymentId)
TimerEntity
createTimer(ExecutionEntity execution)
TimerEntity
createTimerInstance(ExecutionEntity execution)
static java.util.Map<java.lang.String,TimerDeclarationImpl>
getDeclarationsForScope(PvmScope scope)
java.lang.String
getEventScopeActivityId()
java.lang.String
getRepeat()
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,TimerDeclarationImpl>>
getTimeoutListenerDeclarationsForScope(PvmScope scope)
protected void
initializeConfiguration(ExecutionEntity context, TimerEntity job)
boolean
isInterruptingTimer()
protected TimerEntity
newJobInstance(ExecutionEntity execution)
protected void
postInitialize(ExecutionEntity execution, TimerEntity timer)
general callback to override any configuration after the defaults have been appliedprotected java.lang.String
prepareRepeat(java.lang.String dueDate)
java.lang.String
resolveAndSetDuedate(ExecutionEntity context, TimerEntity job, boolean creationDateBased)
protected ExecutionEntity
resolveExecution(ExecutionEntity context)
Returns the execution in which context the job is created.protected JobHandlerConfiguration
resolveJobHandlerConfiguration(ExecutionEntity context)
protected void
scheduleTimer(TimerEntity timer)
void
setEventScopeActivityId(java.lang.String eventScopeActivityId)
void
setInterruptingTimer(boolean isInterruptingTimer)
void
setRawJobHandlerConfiguration(java.lang.String rawJobHandlerConfiguration)
void
updateJob(TimerEntity timer)
-
Methods inherited from class org.camunda.bpm.engine.impl.jobexecutor.JobDeclaration
createJobInstance, getActivity, getActivityId, getJobConfiguration, getJobDefinitionId, getJobHandlerType, getJobPriorityProvider, getProcessDefinition, isExclusive, reconfigure, resolveDueDate, resolveExclusive, resolveJobDefinitionId, resolveJobHandler, resolveJobHandlerType, resolveRetries, setActivity, setExclusive, setJobConfiguration, setJobDefinitionId, setJobPriorityProvider
-
-
-
-
Field Detail
-
description
protected Expression description
-
type
protected TimerDeclarationType type
-
repeat
protected java.lang.String repeat
-
isInterruptingTimer
protected boolean isInterruptingTimer
-
eventScopeActivityId
protected java.lang.String eventScopeActivityId
-
isParallelMultiInstance
protected java.lang.Boolean isParallelMultiInstance
-
rawJobHandlerConfiguration
protected java.lang.String rawJobHandlerConfiguration
-
-
Constructor Detail
-
TimerDeclarationImpl
public TimerDeclarationImpl(Expression expression, TimerDeclarationType type, java.lang.String jobHandlerType)
-
-
Method Detail
-
isInterruptingTimer
public boolean isInterruptingTimer()
-
setInterruptingTimer
public void setInterruptingTimer(boolean isInterruptingTimer)
-
getRepeat
public java.lang.String getRepeat()
-
setEventScopeActivityId
public void setEventScopeActivityId(java.lang.String eventScopeActivityId)
-
getEventScopeActivityId
public java.lang.String getEventScopeActivityId()
-
newJobInstance
protected TimerEntity newJobInstance(ExecutionEntity execution)
- Specified by:
newJobInstance
in classJobDeclaration<ExecutionEntity,TimerEntity>
-
setRawJobHandlerConfiguration
public void setRawJobHandlerConfiguration(java.lang.String rawJobHandlerConfiguration)
-
updateJob
public void updateJob(TimerEntity timer)
-
initializeConfiguration
protected void initializeConfiguration(ExecutionEntity context, TimerEntity job)
-
resolveAndSetDuedate
public java.lang.String resolveAndSetDuedate(ExecutionEntity context, TimerEntity job, boolean creationDateBased)
-
postInitialize
protected void postInitialize(ExecutionEntity execution, TimerEntity timer)
Description copied from class:JobDeclaration
general callback to override any configuration after the defaults have been applied- Overrides:
postInitialize
in classJobDeclaration<ExecutionEntity,TimerEntity>
-
prepareRepeat
protected java.lang.String prepareRepeat(java.lang.String dueDate)
-
createTimerInstance
public TimerEntity createTimerInstance(ExecutionEntity execution)
-
createStartTimerInstance
public TimerEntity createStartTimerInstance(java.lang.String deploymentId)
-
createTimer
public TimerEntity createTimer(java.lang.String deploymentId)
-
createTimer
public TimerEntity createTimer(ExecutionEntity execution)
-
scheduleTimer
protected void scheduleTimer(TimerEntity timer)
-
resolveExecution
protected ExecutionEntity resolveExecution(ExecutionEntity context)
Description copied from class:JobDeclaration
Returns the execution in which context the job is created. The execution is used to determine the job's priority based on a BPMN activity the execution is currently executing. May be null.- Specified by:
resolveExecution
in classJobDeclaration<ExecutionEntity,TimerEntity>
-
resolveJobHandlerConfiguration
protected JobHandlerConfiguration resolveJobHandlerConfiguration(ExecutionEntity context)
- Specified by:
resolveJobHandlerConfiguration
in classJobDeclaration<ExecutionEntity,TimerEntity>
-
getDeclarationsForScope
public static java.util.Map<java.lang.String,TimerDeclarationImpl> getDeclarationsForScope(PvmScope scope)
- Returns:
- all timers declared in the given scope
-
getTimeoutListenerDeclarationsForScope
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,TimerDeclarationImpl>> getTimeoutListenerDeclarationsForScope(PvmScope scope)
- Returns:
- all timeout listeners declared in the given scope
-
-