Class BatchSetRemovalTimeJobHandler
- java.lang.Object
-
- org.camunda.bpm.engine.impl.batch.AbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
-
- org.camunda.bpm.engine.impl.batch.removaltime.BatchSetRemovalTimeJobHandler
-
- All Implemented Interfaces:
BatchJobHandler<SetRemovalTimeBatchConfiguration>,OptimisticLockingListener,JobHandler<BatchJobConfiguration>
public class BatchSetRemovalTimeJobHandler extends AbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
- Author:
- Tassilo Weidner
-
-
Field Summary
Fields Modifier and Type Field Description static BatchJobDeclarationJOB_DECLARATION
-
Constructor Summary
Constructors Constructor Description BatchSetRemovalTimeJobHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddRemovalTime(java.lang.String instanceId, java.util.Date removalTime, CommandContext commandContext)protected java.util.DatecalculateRemovalTime(HistoricBatchEntity batch, CommandContext commandContext)protected SetRemovalTimeBatchConfigurationcreateJobConfiguration(SetRemovalTimeBatchConfiguration configuration, java.util.List<java.lang.String> batchIds)voidexecuteHandler(SetRemovalTimeBatchConfiguration batchConfiguration, ExecutionEntity execution, CommandContext commandContext, java.lang.String tenantId)protected HistoricBatchEntityfindBatchById(java.lang.String instanceId, CommandContext commandContext)protected ByteArrayEntityfindByteArrayById(java.lang.String byteArrayId, CommandContext commandContext)protected java.lang.StringgetHistoryRemovalTimeStrategy(CommandContext commandContext)JobDeclaration<BatchJobContext,MessageEntity>getJobDeclaration()Get the job declaration for batch jobs.protected SetRemovalTimeJsonConvertergetJsonConverterInstance()protected java.util.DategetOrCalculateRemovalTime(SetRemovalTimeBatchConfiguration batchConfiguration, HistoricBatchEntity instance, CommandContext commandContext)java.lang.StringgetType()protected booleanhasBaseTime(HistoricBatchEntity instance, CommandContext commandContext)protected booleanisDmnEnabled(CommandContext commandContext)protected booleanisEnded(HistoricBatchEntity instance)protected booleanisStrategyEnd(CommandContext commandContext)protected booleanisStrategyStart(CommandContext commandContext)-
Methods inherited from class org.camunda.bpm.engine.impl.batch.AbstractBatchJobHandler
createBatchJob, createJobEntities, createJobs, deleteJobs, execute, failedOperation, getEntityType, newConfiguration, onDelete, postProcessJob, readConfiguration, sanitizeMappings, saveConfiguration, writeConfiguration
-
-
-
-
Field Detail
-
JOB_DECLARATION
public static final BatchJobDeclaration JOB_DECLARATION
-
-
Method Detail
-
executeHandler
public void executeHandler(SetRemovalTimeBatchConfiguration batchConfiguration, ExecutionEntity execution, CommandContext commandContext, java.lang.String tenantId)
- Specified by:
executeHandlerin classAbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
-
getOrCalculateRemovalTime
protected java.util.Date getOrCalculateRemovalTime(SetRemovalTimeBatchConfiguration batchConfiguration, HistoricBatchEntity instance, CommandContext commandContext)
-
addRemovalTime
protected void addRemovalTime(java.lang.String instanceId, java.util.Date removalTime, CommandContext commandContext)
-
hasBaseTime
protected boolean hasBaseTime(HistoricBatchEntity instance, CommandContext commandContext)
-
isEnded
protected boolean isEnded(HistoricBatchEntity instance)
-
isStrategyStart
protected boolean isStrategyStart(CommandContext commandContext)
-
isStrategyEnd
protected boolean isStrategyEnd(CommandContext commandContext)
-
getHistoryRemovalTimeStrategy
protected java.lang.String getHistoryRemovalTimeStrategy(CommandContext commandContext)
-
isDmnEnabled
protected boolean isDmnEnabled(CommandContext commandContext)
-
calculateRemovalTime
protected java.util.Date calculateRemovalTime(HistoricBatchEntity batch, CommandContext commandContext)
-
findByteArrayById
protected ByteArrayEntity findByteArrayById(java.lang.String byteArrayId, CommandContext commandContext)
-
findBatchById
protected HistoricBatchEntity findBatchById(java.lang.String instanceId, CommandContext commandContext)
-
getJobDeclaration
public JobDeclaration<BatchJobContext,MessageEntity> getJobDeclaration()
Description copied from interface:BatchJobHandlerGet the job declaration for batch jobs.- Specified by:
getJobDeclarationin interfaceBatchJobHandler<SetRemovalTimeBatchConfiguration>- Specified by:
getJobDeclarationin classAbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>- Returns:
- the batch job declaration
-
createJobConfiguration
protected SetRemovalTimeBatchConfiguration createJobConfiguration(SetRemovalTimeBatchConfiguration configuration, java.util.List<java.lang.String> batchIds)
- Specified by:
createJobConfigurationin classAbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
-
getJsonConverterInstance
protected SetRemovalTimeJsonConverter getJsonConverterInstance()
- Specified by:
getJsonConverterInstancein classAbstractBatchJobHandler<SetRemovalTimeBatchConfiguration>
-
getType
public java.lang.String getType()
-
-