Class ConfigModelContext


  • public final class ConfigModelContext
    extends java.lang.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 Detail

      • getApplicationPackage

        public com.yahoo.config.application.api.ApplicationPackage getApplicationPackage()
      • getProducerId

        public java.lang.String getProducerId()
      • getDeployLogger

        public com.yahoo.config.application.api.DeployLogger getDeployLogger()
      • properties

        public com.yahoo.config.model.api.ModelContext.Properties properties()
      • getConfigModelRepoAdder

        public ConfigModelRepoAdder getConfigModelRepoAdder()
        Returns write access to the config model repo, or null (only) if this is improperly initialized during testing
      • withId

        public ConfigModelContext withId​(java.lang.String producerId)
        Create a new context with a different config model producer id
      • create

        public static ConfigModelContext create​(DeployState deployState,
                                                VespaModel vespaModel,
                                                ConfigModelRepoAdder configModelRepoAdder,
                                                AbstractConfigProducer parent,
                                                java.lang.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,
                                                java.lang.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