Package com.yahoo.config.model
Class ConfigModelContext
- java.lang.Object
-
- com.yahoo.config.model.ConfigModelContext
-
public final class ConfigModelContext extends Object
This class contains a context that is passed to a model builder, and can be used to retrieve the application package, logger etc.- Author:
- Ulf Lilleengen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigModelContext.ApplicationType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConfigModelContext
create(ConfigModelContext.ApplicationType applicationType, DeployState deployState, VespaModel vespaModel, ConfigModelRepoAdder configModelRepoAdder, AbstractConfigProducer<?> parent, String producerId)
Create an application context from an application type, a parent producer and an id.static ConfigModelContext
create(DeployState deployState, VespaModel vespaModel, ConfigModelRepoAdder configModelRepoAdder, AbstractConfigProducer<?> parent, String producerId)
Create an application context from a parent producer and an id.com.yahoo.config.model.api.ModelContext.FeatureFlags
featureFlags()
com.yahoo.config.application.api.ApplicationPackage
getApplicationPackage()
ConfigModelContext.ApplicationType
getApplicationType()
ConfigModelRepoAdder
getConfigModelRepoAdder()
Returns write access to the config model repo, or null (only) if this is improperly initialized during testingcom.yahoo.config.application.api.DeployLogger
getDeployLogger()
DeployState
getDeployState()
AbstractConfigProducer<?>
getParentProducer()
String
getProducerId()
com.yahoo.config.model.api.ModelContext.Properties
properties()
VespaModel
vespaModel()
ConfigModelContext
with(VespaModel vespaModel)
ConfigModelContext
withId(String producerId)
Create a new context with a different config model producer idConfigModelContext
withParent(AbstractConfigProducer<?> newParent)
Create a new context with a different parent
-
-
-
Method Detail
-
getApplicationPackage
public com.yahoo.config.application.api.ApplicationPackage getApplicationPackage()
-
getProducerId
public String getProducerId()
-
getParentProducer
public AbstractConfigProducer<?> getParentProducer()
-
getDeployLogger
public com.yahoo.config.application.api.DeployLogger getDeployLogger()
-
getDeployState
public DeployState getDeployState()
-
getApplicationType
public ConfigModelContext.ApplicationType getApplicationType()
-
vespaModel
public VespaModel vespaModel()
-
properties
public com.yahoo.config.model.api.ModelContext.Properties properties()
-
featureFlags
public com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags()
-
getConfigModelRepoAdder
public ConfigModelRepoAdder getConfigModelRepoAdder()
Returns write access to the config model repo, or null (only) if this is improperly initialized during testing
-
withParent
public ConfigModelContext withParent(AbstractConfigProducer<?> newParent)
Create a new context with a different parent
-
withId
public ConfigModelContext withId(String producerId)
Create a new context with a different config model producer id
-
with
public ConfigModelContext with(VespaModel vespaModel)
-
create
public static ConfigModelContext create(DeployState deployState, VespaModel vespaModel, ConfigModelRepoAdder configModelRepoAdder, AbstractConfigProducer<?> parent, String producerId)
Create an application context from a parent producer and an id.- Parameters:
deployState
- the global deploy state for this modelparent
- the parent to be used for the config modelproducerId
- the id to be used for the config model- Returns:
- a model context that can be passed to a model
-
create
public static ConfigModelContext create(ConfigModelContext.ApplicationType applicationType, DeployState deployState, VespaModel vespaModel, ConfigModelRepoAdder configModelRepoAdder, AbstractConfigProducer<?> parent, String producerId)
Create an application context from an application type, a parent producer and an id.- Parameters:
applicationType
- the application typedeployState
- the global deploy state for this modelparent
- the parent to be used for the config modelproducerId
- the id to be used for the config model- Returns:
- a model context that can be passed to a model
-
-