com.xebialabs.deployit.mapper
Class ModificationSupportingStepGeneratingMapper<S extends java.io.Serializable,M extends Mapping,T extends java.io.Serializable>

java.lang.Object
  extended by com.xebialabs.deployit.mapper.Mapper<S,M,T>
      extended by com.xebialabs.deployit.mapper.StepGeneratingMapper<S,M,T>
          extended by com.xebialabs.deployit.mapper.ModificationSupportingStepGeneratingMapper<S,M,T>
Type Parameters:
S - the type of the source artifact/resource.
M - the type of the mapping.
T - the type of the target middleware.
Direct Known Subclasses:
ModificationSupportingMappingAgnosticStepGeneratingMapper

public abstract class ModificationSupportingStepGeneratingMapper<S extends java.io.Serializable,M extends Mapping,T extends java.io.Serializable>
extends StepGeneratingMapper<S,M,T>

Subclass of StepGeneratingMapper that can also generate modification steps for modified mappings.


Field Summary
 
Fields inherited from class com.xebialabs.deployit.mapper.Mapper
addedMappings, change, deletedMappings, modifiedMappings, newMappings, oldMappings
 
Constructor Summary
protected ModificationSupportingStepGeneratingMapper(Change<Deployment> change)
          Creates a ModificationSupportingStepGeneratingMapper for the specified deployment change that will apply default mappings.
protected ModificationSupportingStepGeneratingMapper(Change<Deployment> change, boolean applyDefaultMappings)
          Creates a ModificationSupportingStepGeneratingMapper for the specified deployment change.
 
Method Summary
protected  void generateAdditionStepsForModifiedMapping(S newSource, M newMapping, T newTarget, java.util.List<Step> steps)
          Overrides StepGeneratingMapper.generateAdditionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) to not generate any steps.
protected  void generateDeletionStepsForModifiedMapping(S oldSource, M oldMapping, T oldTarget, java.util.List<Step> steps)
          Overrides StepGeneratingMapper.generateDeletionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) to not generate any steps.
 void generateModificationSteps(java.util.List<Step> steps)
          Generates all the steps that will modify artifacts/resources in the middleware.
protected  void generateModificationStepsForModifiedMapping(S oldMappingSource, M oldVersionOfModifiedMapping, T oldMappingTarget, S newMappingSource, M newVersionOfModifiedMapping, T newMappingTarget, java.util.List<Step> steps)
          Must be implemented by a subclass to generate steps that delete an artifact/a resource from the middleware when a mapping is deleted.
 
Methods inherited from class com.xebialabs.deployit.mapper.StepGeneratingMapper
generateAdditionSteps, generateAdditionStepsForAddedMapping, generateDeletionSteps, generateDeletionStepsForDeletedMapping
 
Methods inherited from class com.xebialabs.deployit.mapper.Mapper
getAddedMappings, getAffectedTargets, getAllTargets, getDeletedMappings, getModifiedMappings, getNewMappings, getNewTargets, getOldMappings, getOldTargets, init, setDefaults
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModificationSupportingStepGeneratingMapper

protected ModificationSupportingStepGeneratingMapper(Change<Deployment> change,
                                                     boolean applyDefaultMappings)
Creates a ModificationSupportingStepGeneratingMapper for the specified deployment change.

Parameters:
change - the deployment change for which to calculate mappings.
applyDefaultMappings - default mappings will be applied iff true

ModificationSupportingStepGeneratingMapper

protected ModificationSupportingStepGeneratingMapper(Change<Deployment> change)
Creates a ModificationSupportingStepGeneratingMapper for the specified deployment change that will apply default mappings.

Parameters:
change - the deployment change for which to calculate mappings.
Method Detail

generateAdditionStepsForModifiedMapping

protected final void generateAdditionStepsForModifiedMapping(S newSource,
                                                             M newMapping,
                                                             T newTarget,
                                                             java.util.List<Step> steps)
Overrides StepGeneratingMapper.generateAdditionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) to not generate any steps.

Overrides:
generateAdditionStepsForModifiedMapping in class StepGeneratingMapper<S extends java.io.Serializable,M extends Mapping,T extends java.io.Serializable>
Parameters:
newSource - the new source of the mapping. The value is identical to newVersionOfModifiedMapping.getSource() but it is provided separately so that the implementor of this method does not have to cast it.
newMapping - the new mapping
newTarget - the new target of the mapping. The value is identical to newVersionOfModifiedMapping.getTarget() but it is provided separately so that the implementor of this method does not have to cast it.
steps - the list of steps to which the generated steps are to be added

generateDeletionStepsForModifiedMapping

protected final void generateDeletionStepsForModifiedMapping(S oldSource,
                                                             M oldMapping,
                                                             T oldTarget,
                                                             java.util.List<Step> steps)
Overrides StepGeneratingMapper.generateDeletionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) to not generate any steps.

Overrides:
generateDeletionStepsForModifiedMapping in class StepGeneratingMapper<S extends java.io.Serializable,M extends Mapping,T extends java.io.Serializable>
Parameters:
oldSource - the old source of the modified mapping. The value is identical to oldVersionOfModifiedMapping.getSource() but it is provided separately so that the implementor of this method does not have to cast it.
oldMapping - the old mapping
oldTarget - the old target of the modified mapping. The value is identical to oldVersionOfModifiedMapping.getTarget() but it is provided separately so that the implementor of this method does not have to cast it.
steps - the list of steps to which the generated steps are to be added

generateModificationSteps

public final void generateModificationSteps(java.util.List<Step> steps)
Generates all the steps that will modify artifacts/resources in the middleware.

Parameters:
steps - the list of steps to which the generated steps are to be added

generateModificationStepsForModifiedMapping

protected void generateModificationStepsForModifiedMapping(S oldMappingSource,
                                                           M oldVersionOfModifiedMapping,
                                                           T oldMappingTarget,
                                                           S newMappingSource,
                                                           M newVersionOfModifiedMapping,
                                                           T newMappingTarget,
                                                           java.util.List<Step> steps)
Must be implemented by a subclass to generate steps that delete an artifact/a resource from the middleware when a mapping is deleted.

Parameters:
oldMappingSource - the old source of the modified mapping. The value is identical to oldMapping.getSource() but it is provided separately so that the implementor of this method does not have to cast it.
oldVersionOfModifiedMapping - the old version of the modified mapping
oldMappingTarget - the target of the old mapping. The value is identical to oldMapping.getTarget() but it is provided separately so that the implementor of this method does not have to cast it.
newMappingSource - the new source of the mapping. The value is identical to newVersionOfModifiedMapping.getSource() but it is provided separately so that the implementor of this method does not have to cast it.
newVersionOfModifiedMapping - the new mapping
newMappingTarget - the new target of the mapping. The value is identical to newVersionOfModifiedMapping.getTarget() but it is provided separately so that the implementor of this method does not have to cast it.
steps - the list of steps to which the generated steps are to be added


Copyright © 2010. All Rights Reserved.