Package com.yahoo.config.model
Class ConfigModelContext
java.lang.Object
com.yahoo.config.model.ConfigModelContext
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
-
Method Summary
Modifier and TypeMethodDescriptioncom.yahoo.config.provision.ClusterInfo.Builder
Returns a cluster info builder pre-populated with info known in this context.static ConfigModelContext
create
(ConfigModelContext.ApplicationType applicationType, DeployState deployState, VespaModel vespaModel, ConfigModelRepoAdder configModelRepoAdder, TreeConfigProducer<AnyConfigProducer> 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, TreeConfigProducer<AnyConfigProducer> parent, String producerId) Create an application context from a parent producer and an id.com.yahoo.config.model.api.ModelContext.FeatureFlags
com.yahoo.config.application.api.ApplicationPackage
Returns write access to the config model repo, or null (only) if this is improperly initialized during testingcom.yahoo.config.application.api.DeployLogger
com.yahoo.config.model.api.ModelContext.Properties
with
(VespaModel vespaModel) Create a new context with a different config model producer idwithParent
(TreeConfigProducer<AnyConfigProducer> newParent) Create a new context with a different parent
-
Method Details
-
getApplicationPackage
public com.yahoo.config.application.api.ApplicationPackage getApplicationPackage() -
getProducerId
-
getParentProducer
-
getDeployLogger
public com.yahoo.config.application.api.DeployLogger getDeployLogger() -
getDeployState
-
getApplicationType
-
vespaModel
-
properties
public com.yahoo.config.model.api.ModelContext.Properties properties() -
featureFlags
public com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags() -
getConfigModelRepoAdder
Returns write access to the config model repo, or null (only) if this is improperly initialized during testing -
withParent
Create a new context with a different parent -
withId
Create a new context with a different config model producer id -
with
-
clusterInfo
public com.yahoo.config.provision.ClusterInfo.Builder clusterInfo()Returns a cluster info builder pre-populated with info known in this context. -
create
public static ConfigModelContext create(DeployState deployState, VespaModel vespaModel, ConfigModelRepoAdder configModelRepoAdder, TreeConfigProducer<AnyConfigProducer> 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, TreeConfigProducer<AnyConfigProducer> 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
-