public class SimpleModel extends Object implements org.azyva.dragom.model.Model, org.azyva.dragom.model.ModelNodeBuilderFactory, org.azyva.dragom.model.MutableModel
Model and MutableModel based on
Config and optionnally MutableConfig.
In addition to Config, initialization Properties can be provided to an instance of SimpleModel in order to override properties defined within Config. This allows customizing a Model locally, such as specifying a different base URL for an SCM repository.
Initialization Properties that have the "org.azyva.dragom.model-property." prefix are
considered first, with inheritance. Only if the property is not found among
initialization Properties will real Model properties be considered.
Note that properties defined in such a way cannot be defined only for a
specific node, contrary to real Model properties.
The fact that initialization Properties can be specified does not violate the general principle that a Model is static since initialization Properties are not meant to change between tool invocations.
Note that NodePlugin's provided by Model can use runtime properties
provided by RuntimePropertiesPlugin since the behavior of NodePlugin's
can be tool-invocation-specific.
org.azyva.dragom.model.impl.simple| Constructor and Description |
|---|
SimpleModel(org.azyva.dragom.model.config.Config config,
Properties propertiesInit)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.azyva.dragom.model.ClassificationNodeBuilder |
createClassificationNodeBuilder() |
org.azyva.dragom.model.ModuleBuilder |
createModuleBuilder() |
org.azyva.dragom.model.MutableClassificationNode |
createMutableClassificationNodeRoot() |
org.azyva.dragom.model.Module |
findModuleByArtifactGroupId(org.azyva.dragom.model.ArtifactGroupId artifactGroupId)
Finds and returns the
Module whose build produces an
ArtifactGroupId. |
org.azyva.dragom.model.ClassificationNode |
getClassificationNode(org.azyva.dragom.model.NodePath nodePath)
At each step while following the path of {SimpleClassificationNode},
SimpleClassificationNode.getSimpleClassificationNodeChildDynamic(java.lang.String) is
used so that new SimpleClassificationNode can be dynamically created if
required. |
org.azyva.dragom.model.ClassificationNode |
getClassificationNodeRoot() |
Properties |
getInitProperties()
Returns the initialization properties that were used when creating this
SimpleModel.
|
org.azyva.dragom.model.Module |
getModule(org.azyva.dragom.model.NodePath nodePath)
This method uses
getClassificationNode(org.azyva.dragom.model.NodePath) to get the parent
SimpleClassificationNode. |
public SimpleModel(org.azyva.dragom.model.config.Config config,
Properties propertiesInit)
This is the only way to instantiate a new SimpleModel. However, once
instantiated, a SimpleModel can be completed dynamically using
ModelNodeBuilderFactory methods to create new SimpleNode's.
config - Config.propertiesInit - Initialization properties.public Properties getInitProperties()
This method is not part of Model and is therefore intended to be used
by the other classes that make up the SimpleModel, namely SimpleNode.
Initialization properties should be considered read-only.
public org.azyva.dragom.model.ClassificationNode getClassificationNodeRoot()
getClassificationNodeRoot in interface org.azyva.dragom.model.Modelpublic org.azyva.dragom.model.ClassificationNode getClassificationNode(org.azyva.dragom.model.NodePath nodePath)
SimpleClassificationNode.getSimpleClassificationNodeChildDynamic(java.lang.String) is
used so that new SimpleClassificationNode can be dynamically created if
required.getClassificationNode in interface org.azyva.dragom.model.ModelnodePath - NodePath of the ClassificationNode to return. Must be partial.public org.azyva.dragom.model.Module getModule(org.azyva.dragom.model.NodePath nodePath)
getClassificationNode(org.azyva.dragom.model.NodePath) to get the parent
SimpleClassificationNode. It then uses
SimpleClassificationNode.getSimpleModuleChildDynamic(java.lang.String) to get the
requested SimpleModule which therefore can be dynamically created if required.getModule in interface org.azyva.dragom.model.ModelnodePath - NodePath of the Module to return. Must not be partial.public org.azyva.dragom.model.Module findModuleByArtifactGroupId(org.azyva.dragom.model.ArtifactGroupId artifactGroupId)
Module whose build produces an
ArtifactGroupId.
First, FindModuleByArtifactGroupIdModuleNodeVisitor is used to find a
Module among those that are already created.
If an existing Module could not be found,
FindModuleThroughClassificationNodeByArtifactGroupIdClassificationNodeVisitor
is used to ask the exising ClassificationNode's about such a Module.
In all cases the mapping between the ArtifactGroupId and the found Module is cached and used to speed up subsequent requests for the same ArtifactGroupId.
findModuleByArtifactGroupId in interface org.azyva.dragom.model.ModelartifactGroupId - ArtifactGroupId for which to find a Module.public org.azyva.dragom.model.ClassificationNodeBuilder createClassificationNodeBuilder()
createClassificationNodeBuilder in interface org.azyva.dragom.model.ModelNodeBuilderFactorypublic org.azyva.dragom.model.ModuleBuilder createModuleBuilder()
createModuleBuilder in interface org.azyva.dragom.model.ModelNodeBuilderFactorypublic org.azyva.dragom.model.MutableClassificationNode createMutableClassificationNodeRoot()
createMutableClassificationNodeRoot in interface org.azyva.dragom.model.MutableModelCopyright © 2015–2016 AZYVA INC.. All rights reserved.