public class ConfigArtifactVersionMapperPluginImpl extends ModulePluginAbstractImpl implements org.azyva.dragom.model.plugin.ArtifactVersionMapperPlugin
ArtifactVersionMapperPlugin.
This implementation uses regular expression mappings defined with runtime properties, providing a high degree of flexibility.
Mapping groups are supported so that the actual mapping list for individual
Module's can be constructed from reusable sublists.
It also allows some dynamic behavior such as existence-based mapping, meaning that following a tentative mapping, the existence of the resulting Version is verified and if the Version does not exist the next mapping is used. This behavior is available for ArtifactVersion to Version mapping.
Also when mapping a Version to ArtifactVersion a "PHASE" runtime property can be used to build the resulting ArtifactVersion.
These dynamic behaviors, together with the use of NewDynamicVersionPhasePluginFactory and PhaseSelectStaticVersionPluginImpl, are useful for implementing phased development where the ArtifactVersion associated with a Version changes from one phase to the next. And during such a phase transition, a static Version is created to freeze the sources for the current phase and then the ArtifactVersion is transitioned to the next phase.
There is possibly room for performance optimization as for each call to a map method, the mappings are built from the runtime properties, even if they have not changed. If optimization if considered, care will need to be taken as runtime properties can easily change.
| Constructor and Description |
|---|
ConfigArtifactVersionMapperPluginImpl(org.azyva.dragom.model.Module module) |
| Modifier and Type | Method and Description |
|---|---|
org.azyva.dragom.model.Version |
mapArtifactVersionToVersion(org.azyva.dragom.model.ArtifactVersion artifactVersion) |
org.azyva.dragom.model.ArtifactVersion |
mapVersionToArtifactVersion(org.azyva.dragom.model.Version version) |
getModule, toStringgetNodepublic ConfigArtifactVersionMapperPluginImpl(org.azyva.dragom.model.Module module)
public org.azyva.dragom.model.Version mapArtifactVersionToVersion(org.azyva.dragom.model.ArtifactVersion artifactVersion)
mapArtifactVersionToVersion in interface org.azyva.dragom.model.plugin.ArtifactVersionMapperPluginpublic org.azyva.dragom.model.ArtifactVersion mapVersionToArtifactVersion(org.azyva.dragom.model.Version version)
mapVersionToArtifactVersion in interface org.azyva.dragom.model.plugin.ArtifactVersionMapperPluginCopyright © 2015–2016 AZYVA INC.. All rights reserved.