/** Create a new context with a different parent */ public ConfigModelContext withParent(AbstractConfigProducer newParent) { return ConfigModelContext.create(deployState, vespaModel, configModelRepoAdder, newParent, producerId); }
public ConfigModelContext with(VespaModel vespaModel) { return ConfigModelContext.create(deployState, vespaModel, configModelRepoAdder, parent, producerId); }
/** Create a new context with a different config model producer id */ public ConfigModelContext withId(String producerId) { return ConfigModelContext.create(deployState, vespaModel, configModelRepoAdder, parent, producerId); }
private ConfigModel buildModel(ModelNode node, ApplicationType applicationType, DeployState deployState, VespaModel vespaModel, AbstractConfigProducer parent, Element servicesElement) { ConfigModelBuilder builder = node.builder; ConfigModelContext context = ConfigModelContext.create(applicationType, deployState, vespaModel, this, parent, getIdString(servicesElement)); return builder.build(node, servicesElement, context); }
public void setupRouting(DeployState deployState, VespaModel vespaModel, ConfigModelRepo configModels) { if (admin != null) { Routing routing = configModels.getRouting(); if (routing == null) { routing = new Routing(ConfigModelContext.create(deployState, vespaModel, configModels, this, "routing")); configModels.add(routing); } this.routing = routing; } }
/** * Builds an instance of this component model. * This calls instantiate(...), instance.setUp(...), doBuild(instance, ...). * * @param deployState a global deployment state used for this model. * @param parent the root config producer this should be added to * @param spec the XML element this is constructed from */ public final MODEL build(DeployState deployState, VespaModel vespaModel, ConfigModelRepo configModelRepo, AbstractConfigProducer parent, Element spec) { ConfigModelContext context = ConfigModelContext.create(deployState, vespaModel, configModelRepo, parent, getIdString(spec)); return build(new DefaultModelInstanceFactory(), spec, context); }