org.springframework.extensions.webscripts
Class ConfigModel

java.lang.Object
  extended by 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
 class ConfigModel.ScopedConfigMap
          Map to allow access to scoped config in a unified way for scripts and templates.
 
Field Summary
protected  ConfigService configService
           
protected  Map<String,ConfigElement> globalConfig
           
protected  String scriptConfig
           
 
Constructor Summary
ConfigModel(ConfigService configService, String scriptConfig)
           
 
Method Summary
 Map<String,ConfigElement> getGlobal()
          Retrieves the global configuration as a Map.
 Map<String,ConfigElement> getScoped()
          Retrieves scoped configuration as a Map.
abstract  Object getScript()
          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 Detail

configService

protected ConfigService configService

globalConfig

protected Map<String,ConfigElement> globalConfig

scriptConfig

protected String scriptConfig
Constructor Detail

ConfigModel

public ConfigModel(ConfigService configService,
                   String scriptConfig)
Method Detail

getGlobal

public Map<String,ConfigElement> getGlobal()
Retrieves the global configuration as a Map.

Returns:
Map of the global config

getScoped

public Map<String,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


Copyright © 2009 SpringSource, Inc. All Rights Reserved.