Class DefaultMigrationInstructionGenerator
- java.lang.Object
-
- org.camunda.bpm.engine.impl.migration.DefaultMigrationInstructionGenerator
-
- All Implemented Interfaces:
MigrationInstructionGenerator
public class DefaultMigrationInstructionGenerator extends java.lang.Object implements MigrationInstructionGenerator
- Author:
- Thorben Lindhauer
-
-
Field Summary
Fields Modifier and Type Field Description protected MigrationActivityMatcher
migrationActivityMatcher
protected java.util.List<MigrationActivityValidator>
migrationActivityValidators
protected java.util.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 java.util.List<ValidatingMigrationInstruction>
generateInstructionsForActivities(java.util.Collection<ActivityImpl> sourceActivities, java.util.Collection<ActivityImpl> targetActivities, boolean updateEventTriggers, ValidatingMigrationInstructions existingInstructions)
protected boolean
isValidActivity(ActivityImpl activity)
MigrationInstructionGenerator
migrationActivityValidators(java.util.List<MigrationActivityValidator> migrationActivityValidators)
Sets the list of migration activity validators which validate that a activity is a candidate for the migration.MigrationInstructionGenerator
migrationInstructionValidators(java.util.List<MigrationInstructionValidator> migrationInstructionValidators)
Sets the list of migration instruction validators currently used by the process engine.
-
-
-
Field Detail
-
migrationActivityValidators
protected java.util.List<MigrationActivityValidator> migrationActivityValidators
-
migrationInstructionValidators
protected java.util.List<MigrationInstructionValidator> migrationInstructionValidators
-
migrationActivityMatcher
protected MigrationActivityMatcher migrationActivityMatcher
-
-
Constructor Detail
-
DefaultMigrationInstructionGenerator
public DefaultMigrationInstructionGenerator(MigrationActivityMatcher migrationActivityMatcher)
-
-
Method Detail
-
migrationActivityValidators
public MigrationInstructionGenerator migrationActivityValidators(java.util.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(java.util.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 java.util.List<ValidatingMigrationInstruction> generateInstructionsForActivities(java.util.Collection<ActivityImpl> sourceActivities, java.util.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)
-
-