Class DefaultMigrationInstructionGenerator
- java.lang.Object
-
- org.camunda.bpm.engine.impl.migration.DefaultMigrationInstructionGenerator
-
- All Implemented Interfaces:
MigrationInstructionGenerator
public class DefaultMigrationInstructionGenerator extends Object implements MigrationInstructionGenerator
- Author:
- Thorben Lindhauer
-
-
Field Summary
Fields Modifier and Type Field Description protected MigrationActivityMatcher
migrationActivityMatcher
protected List<MigrationActivityValidator>
migrationActivityValidators
protected List<MigrationInstructionValidator>
migrationInstructionValidators
-
Constructor Summary
Constructors Constructor Description DefaultMigrationInstructionGenerator(MigrationActivityMatcher migrationActivityMatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidatingMigrationInstructions
generate(ProcessDefinitionImpl sourceProcessDefinition, ProcessDefinitionImpl targetProcessDefinition, boolean updateEventTriggers)
Generate all migration instructions for mapped activities between two process definitions.void
generate(ScopeImpl sourceScope, ScopeImpl targetScope, ProcessDefinitionImpl sourceProcessDefinition, ProcessDefinitionImpl targetProcessDefinition, ValidatingMigrationInstructions existingInstructions, boolean updateEventTriggers)
protected List<ValidatingMigrationInstruction>
generateInstructionsForActivities(Collection<ActivityImpl> sourceActivities, Collection<ActivityImpl> targetActivities, boolean updateEventTriggers, ValidatingMigrationInstructions existingInstructions)
protected boolean
isValidActivity(ActivityImpl activity)
MigrationInstructionGenerator
migrationActivityValidators(List<MigrationActivityValidator> migrationActivityValidators)
Sets the list of migration activity validators which validate that a activity is a candidate for the migration.MigrationInstructionGenerator
migrationInstructionValidators(List<MigrationInstructionValidator> migrationInstructionValidators)
Sets the list of migration instruction validators currently used by the process engine.
-
-
-
Field Detail
-
migrationActivityValidators
protected List<MigrationActivityValidator> migrationActivityValidators
-
migrationInstructionValidators
protected List<MigrationInstructionValidator> migrationInstructionValidators
-
migrationActivityMatcher
protected MigrationActivityMatcher migrationActivityMatcher
-
-
Constructor Detail
-
DefaultMigrationInstructionGenerator
public DefaultMigrationInstructionGenerator(MigrationActivityMatcher migrationActivityMatcher)
-
-
Method Detail
-
migrationActivityValidators
public MigrationInstructionGenerator migrationActivityValidators(List<MigrationActivityValidator> migrationActivityValidators)
Description copied from interface:MigrationInstructionGenerator
Sets the list of migration activity validators which validate that a activity is a candidate for the migration.- Specified by:
migrationActivityValidators
in interfaceMigrationInstructionGenerator
- Parameters:
migrationActivityValidators
- the list of validators to check- Returns:
- this generator instance
-
migrationInstructionValidators
public MigrationInstructionGenerator migrationInstructionValidators(List<MigrationInstructionValidator> migrationInstructionValidators)
Description copied from interface:MigrationInstructionGenerator
Sets the list of migration instruction validators currently used by the process engine. Implementations may use these to restrict the search space.- Specified by:
migrationInstructionValidators
in interfaceMigrationInstructionGenerator
- Returns:
- this
-
generate
public ValidatingMigrationInstructions generate(ProcessDefinitionImpl sourceProcessDefinition, ProcessDefinitionImpl targetProcessDefinition, boolean updateEventTriggers)
Description copied from interface:MigrationInstructionGenerator
Generate all migration instructions for mapped activities between two process definitions. A activity can be mapped if theMigrationActivityMatcher
matches it with an activity from the target process definition.- Specified by:
generate
in interfaceMigrationInstructionGenerator
- Parameters:
sourceProcessDefinition
- the source process definitiontargetProcessDefinition
- the target process definiton- Returns:
- the list of generated instructions
-
generateInstructionsForActivities
protected List<ValidatingMigrationInstruction> generateInstructionsForActivities(Collection<ActivityImpl> sourceActivities, Collection<ActivityImpl> targetActivities, boolean updateEventTriggers, ValidatingMigrationInstructions existingInstructions)
-
generate
public void generate(ScopeImpl sourceScope, ScopeImpl targetScope, ProcessDefinitionImpl sourceProcessDefinition, ProcessDefinitionImpl targetProcessDefinition, ValidatingMigrationInstructions existingInstructions, boolean updateEventTriggers)
-
isValidActivity
protected boolean isValidActivity(ActivityImpl activity)
-
-