com.xebialabs.deployit.mapper
Class MappingAgnosticStepGeneratingMapper<S extends java.io.Serializable,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,Mapping,T>
          extended by com.xebialabs.deployit.mapper.MappingAgnosticStepGeneratingMapper<S,T>
Type Parameters:
S - the type of the source artifact/resource.
T - the type of the target middleware.

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

A subclass of StepGeneratingMapper that provides the same functionality but does not pass the mapping object to the template methods.


Field Summary
 
Fields inherited from class com.xebialabs.deployit.mapper.Mapper
addedMappings, change, deletedMappings, modifiedMappings, newMappings, oldMappings
 
Constructor Summary
MappingAgnosticStepGeneratingMapper(Change<Deployment> change)
          Creates a MappingAgnosticStepGeneratingMapper for the specified deployment change that will apply default mappings.
MappingAgnosticStepGeneratingMapper(Change<Deployment> change, boolean applyDefaultMappings)
          Creates a MappingAgnosticStepGeneratingMapper for the specified deployment change.
 
Method Summary
protected  void generateAdditionStepsForAddedMapping(S newMappingSource, Mapping newMapping, T newMappingTarget, java.util.List<Step> steps)
          Overrides StepGeneratingMapper.generateAdditionStepsForAddedMapping(Serializable, Mapping, Serializable, List) to invoke generateAdditionStepsForAddedMapping(Serializable, Serializable, List).
protected abstract  void generateAdditionStepsForAddedMapping(S newMappingSource, T newMappingTarget, java.util.List<Step> steps)
          Version of StepGeneratingMapper.generateAdditionStepsForAddedMapping(Serializable, Mapping, Serializable, List) that does without the newMapping parameter.
protected  void generateAdditionStepsForModifiedMapping(S newMappingSource, Mapping newMapping, T newMappingTarget, java.util.List<Step> steps)
          Overrides StepGeneratingMapper.generateAdditionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) to invoke generateAdditionStepsForModifiedMapping(Serializable, Serializable, List).
protected  void generateAdditionStepsForModifiedMapping(S newMappingSource, T newMappingTarget, java.util.List<Step> steps)
          Version of StepGeneratingMapper.generateAdditionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) that does without the newMapping parameter.
protected  void generateDeletionStepsForDeletedMapping(S oldMappingSource, Mapping oldMapping, T oldMappingTarget, java.util.List<Step> steps)
          Overrides StepGeneratingMapper.generateDeletionStepsForDeletedMapping(Serializable, Mapping, Serializable, List) to invoke generateDeletionStepsForDeletedMapping(Serializable, Serializable, List).
protected abstract  void generateDeletionStepsForDeletedMapping(S oldMappingSource, T oldMappingTarget, java.util.List<Step> steps)
          Version of StepGeneratingMapper.generateDeletionStepsForDeletedMapping(Serializable, Mapping, Serializable, List) that does without the oldMapping parameter.
protected  void generateDeletionStepsForModifiedMapping(S newMappingSource, Mapping newMapping, T newMappingTarget, java.util.List<Step> steps)
          Overrides StepGeneratingMapper.generateDeletionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) to invoke generateDeletionStepsForModifiedMapping(Serializable, Serializable, List).
protected  void generateDeletionStepsForModifiedMapping(S oldMappingSource, T oldMappingTarget, java.util.List<Step> steps)
          Version of StepGeneratingMapper.generateDeletionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) that does without the oldMapping parameter.
 
Methods inherited from class com.xebialabs.deployit.mapper.StepGeneratingMapper
generateAdditionSteps, generateDeletionSteps
 
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

MappingAgnosticStepGeneratingMapper

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

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

MappingAgnosticStepGeneratingMapper

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

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

generateAdditionStepsForAddedMapping

protected final void generateAdditionStepsForAddedMapping(S newMappingSource,
                                                          Mapping newMapping,
                                                          T newMappingTarget,
                                                          java.util.List<Step> steps)
Overrides StepGeneratingMapper.generateAdditionStepsForAddedMapping(Serializable, Mapping, Serializable, List) to invoke generateAdditionStepsForAddedMapping(Serializable, Serializable, List).

Specified by:
generateAdditionStepsForAddedMapping in class StepGeneratingMapper<S extends java.io.Serializable,Mapping,T extends java.io.Serializable>
Parameters:
newMappingSource - the source of the new mapping. The value is identical to newMapping.getSource() but it is provided separately so that the implementor of this method does not have to cast it.
newMapping - the new mapping
newMappingTarget - the target of the new mapping. The value is identical to newMapping.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

generateAdditionStepsForAddedMapping

protected abstract void generateAdditionStepsForAddedMapping(S newMappingSource,
                                                             T newMappingTarget,
                                                             java.util.List<Step> steps)
Version of StepGeneratingMapper.generateAdditionStepsForAddedMapping(Serializable, Mapping, Serializable, List) that does without the newMapping parameter.

Parameters:
newMappingSource - the source of the new mapping.
newMappingTarget - the target of the new mapping.
steps - the list of steps to which the generated steps are to be added

generateAdditionStepsForModifiedMapping

protected final void generateAdditionStepsForModifiedMapping(S newMappingSource,
                                                             Mapping newMapping,
                                                             T newMappingTarget,
                                                             java.util.List<Step> steps)
Overrides StepGeneratingMapper.generateAdditionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) to invoke generateAdditionStepsForModifiedMapping(Serializable, Serializable, List).

Overrides:
generateAdditionStepsForModifiedMapping in class StepGeneratingMapper<S extends java.io.Serializable,Mapping,T extends java.io.Serializable>
Parameters:
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.
newMapping - 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

generateAdditionStepsForModifiedMapping

protected void generateAdditionStepsForModifiedMapping(S newMappingSource,
                                                       T newMappingTarget,
                                                       java.util.List<Step> steps)
Version of StepGeneratingMapper.generateAdditionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) that does without the newMapping parameter. The default implementation invokes generateAdditionStepsForAddedMapping(Serializable, Serializable, List).

Parameters:
newMappingSource - the new source of the modified mapping.
newMappingTarget - the new target of the modified mapping.
steps - the list of steps to which the generated steps are to be added

generateDeletionStepsForModifiedMapping

protected final void generateDeletionStepsForModifiedMapping(S newMappingSource,
                                                             Mapping newMapping,
                                                             T newMappingTarget,
                                                             java.util.List<Step> steps)
Overrides StepGeneratingMapper.generateDeletionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) to invoke generateDeletionStepsForModifiedMapping(Serializable, Serializable, List).

Overrides:
generateDeletionStepsForModifiedMapping in class StepGeneratingMapper<S extends java.io.Serializable,Mapping,T extends java.io.Serializable>
Parameters:
newMappingSource - 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.
newMapping - the old mapping
newMappingTarget - 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

generateDeletionStepsForModifiedMapping

protected void generateDeletionStepsForModifiedMapping(S oldMappingSource,
                                                       T oldMappingTarget,
                                                       java.util.List<Step> steps)
Version of StepGeneratingMapper.generateDeletionStepsForModifiedMapping(Serializable, Mapping, Serializable, List) that does without the oldMapping parameter. The default implementation invokes generateDeletionStepsForDeletedMapping(Serializable, Serializable, List).

Parameters:
oldMappingSource - the source of the new mapping.
oldMappingTarget - the target of the new mapping.
steps - the list of steps to which the generated steps are to be added

generateDeletionStepsForDeletedMapping

protected final void generateDeletionStepsForDeletedMapping(S oldMappingSource,
                                                            Mapping oldMapping,
                                                            T oldMappingTarget,
                                                            java.util.List<Step> steps)
Overrides StepGeneratingMapper.generateDeletionStepsForDeletedMapping(Serializable, Mapping, Serializable, List) to invoke generateDeletionStepsForDeletedMapping(Serializable, Serializable, List).

Specified by:
generateDeletionStepsForDeletedMapping in class StepGeneratingMapper<S extends java.io.Serializable,Mapping,T extends java.io.Serializable>
Parameters:
oldMappingSource - the source of the old 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.
oldMapping - the old 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.
steps - the list of steps to which the generated steps are to be added

generateDeletionStepsForDeletedMapping

protected abstract void generateDeletionStepsForDeletedMapping(S oldMappingSource,
                                                               T oldMappingTarget,
                                                               java.util.List<Step> steps)
Version of StepGeneratingMapper.generateDeletionStepsForDeletedMapping(Serializable, Mapping, Serializable, List) that does without the oldMapping parameter.

Parameters:
oldMappingSource - the source of the old mapping.
oldMappingTarget - the target of the old mapping.
steps - the list of steps to which the generated steps are to be added


Copyright © 2010. All Rights Reserved.