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.component.Deconstructable,com.yahoo.config.model.api.ConfigModelPlugin,Comparable<com.yahoo.component.Component>
- Direct Known Subclasses:
AdminModel.BuilderV2,AdminModel.BuilderV4,ContainerModelBuilder,Content.Builder,DomRoutingBuilder,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
- Author:
- vegardh
-
Field Summary
Fields inherited from class com.yahoo.component.AbstractComponent
isDeconstructable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(ConfigModelInstanceFactory<MODEL> factory, Element spec, ConfigModelContext context) Builds an instance of this component model.final MODELbuild(DeployState deployState, VespaModel vespaModel, ConfigModelRepo configModelRepo, TreeConfigProducer<AnyConfigProducer> parent, Element spec) Builds an instance of this component model.abstract voiddoBuild(MODEL model, Element spec, ConfigModelContext modelContext) booleanabstract List<ConfigModelId>Method that must return the XML elements this builder handles.Methods inherited from class com.yahoo.component.AbstractComponent
clone, compareTo, deconstruct, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString
-
Constructor Details
-
ConfigModelBuilder
-
-
Method Details
-
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
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.TreeConfigProducer<com.yahoo.config.model.producer.AnyConfigProducer>, org.w3c.dom.Element). Implement this method to build a config model.- Parameters:
spec- the XML element that this builder should handlemodelContext- 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, TreeConfigProducer<AnyConfigProducer> parent, 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, 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
-
equals
-