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
  • Method Details

    • 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 model
      parent - the parent to be used for the config model
      producerId - 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 type
      deployState - the global deploy state for this model
      parent - the parent to be used for the config model
      producerId - the id to be used for the config model
      Returns:
      a model context that can be passed to a model