Class ConfigModelBuilder<MODEL extends ConfigModel>
- java.lang.Object
-
- com.yahoo.component.AbstractComponent
-
- com.yahoo.config.model.builder.xml.ConfigModelBuilder<MODEL>
-
- All Implemented Interfaces:
com.yahoo.component.Component
,com.yahoo.config.model.api.ConfigModelPlugin
,java.lang.Comparable<com.yahoo.component.Component>
- Direct Known Subclasses:
AdminModel.BuilderV2
,AdminModel.BuilderV4
,ContainerModelBuilder
,Content.Builder
,DomRoutingBuilder
,GenericServicesBuilder
,LegacyConfigModelBuilder
,ModelBuilderAddingAccessControlFilter
public abstract class ConfigModelBuilder<MODEL extends ConfigModel> extends com.yahoo.component.AbstractComponent implements com.yahoo.config.model.api.ConfigModelPlugin
Builds a config model using DOM parsers- Since:
- 5.1.10
- Author:
- vegardh
-
-
Constructor Summary
Constructors Constructor Description ConfigModelBuilder(java.lang.Class<MODEL> configModelClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description MODEL
build(ConfigModelInstanceFactory<MODEL> factory, org.w3c.dom.Element spec, ConfigModelContext context)
Builds an instance of this component model.MODEL
build(DeployState deployState, VespaModel vespaModel, ConfigModelRepo configModelRepo, AbstractConfigProducer parent, org.w3c.dom.Element spec)
Builds an instance of this component model.abstract void
doBuild(MODEL model, org.w3c.dom.Element spec, ConfigModelContext modelContext)
boolean
equals(java.lang.Object other)
java.lang.Class<MODEL>
getModelClass()
abstract java.util.List<ConfigModelId>
handlesElements()
Method that must return the XML elements this builder handles.
-
-
-
Constructor Detail
-
ConfigModelBuilder
public ConfigModelBuilder(java.lang.Class<MODEL> configModelClass)
-
-
Method Detail
-
handlesElements
public abstract java.util.List<ConfigModelId> handlesElements()
Method that must return the XML elements this builder handles. Subclasses must implement this in order to get called when one of the elements have been encountered when parsing.- Returns:
- A list of elements that this builder handles.
-
doBuild
public abstract void doBuild(MODEL model, org.w3c.dom.Element spec, ConfigModelContext modelContext)
Convenience hook called frombuild(com.yahoo.config.model.deploy.DeployState, com.yahoo.vespa.model.VespaModel, com.yahoo.config.model.ConfigModelRepo, com.yahoo.config.model.producer.AbstractConfigProducer, org.w3c.dom.Element)
. Implement this method to build a config model.- Parameters:
spec
- The XML element that this builder should handle.modelContext
- A model context that contains the application package and other data needed by the config model constructor.
-
build
public final MODEL build(DeployState deployState, VespaModel vespaModel, ConfigModelRepo configModelRepo, AbstractConfigProducer parent, org.w3c.dom.Element spec)
Builds an instance of this component model. This calls instantiate(...), instance.setUp(...), doBuild(instance, ...).- Parameters:
deployState
- a global deployment state used for this model.parent
- the root config producer this should be added tospec
- the XML element this is constructed from
-
build
public MODEL build(ConfigModelInstanceFactory<MODEL> factory, org.w3c.dom.Element spec, ConfigModelContext context)
Builds an instance of this component model. This calls instantiate(...), instance.setUp(...), doBuild(instance, ...).- Parameters:
factory
- A factory capable of creating models.spec
- the XML element this is constructed fromcontext
- A context object containing various data used by builders.
-
getModelClass
public java.lang.Class<MODEL> getModelClass()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
-