Class ConfigModel

java.lang.Object
org.springframework.extensions.webscripts.ConfigModel
Direct Known Subclasses:
ScriptConfigModel, TemplateConfigModel

public abstract class ConfigModel extends Object
Abstract base class used for objects that represent configuration as a root object in a script or template model.
Author:
gavinc
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    Map to allow access to scoped config in a unified way for scripts and templates.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.extensions.config.ConfigService
     
    protected Map<String,org.springframework.extensions.config.ConfigElement>
     
    protected String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConfigModel(org.springframework.extensions.config.ConfigService configService, String scriptConfig)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<String,org.springframework.extensions.config.ConfigElement>
    Retrieves the global configuration as a Map.
    Map<String,org.springframework.extensions.config.ConfigElement>
    Retrieves scoped configuration as a Map.
    abstract Object
    Retrieves the script configuration.
    It's up to the subclass what is returned to represent script config.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • configService

      protected org.springframework.extensions.config.ConfigService configService
    • globalConfig

      protected Map<String,org.springframework.extensions.config.ConfigElement> globalConfig
    • scriptConfig

      protected String scriptConfig
  • Constructor Details

    • ConfigModel

      public ConfigModel(org.springframework.extensions.config.ConfigService configService, String scriptConfig)
  • Method Details

    • getGlobal

      public Map<String,org.springframework.extensions.config.ConfigElement> getGlobal()
      Retrieves the global configuration as a Map.
      Returns:
      Map of the global config
    • getScoped

      public Map<String,org.springframework.extensions.config.ConfigElement> getScoped()
      Retrieves scoped configuration as a Map.
      Returns:
      Map of the scoped config
    • getScript

      public abstract Object getScript()
      Retrieves the script configuration.
      It's up to the subclass what is returned to represent script config.
      Returns:
      script configuration