org.springframework.extensions.webscripts
Class AbstractRuntimeContainer

java.lang.Object
  extended by org.springframework.extensions.webscripts.AbstractRuntimeContainer
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener, Container, RuntimeContainer
Direct Known Subclasses:
PresentationContainer

public abstract class AbstractRuntimeContainer
extends Object
implements RuntimeContainer, org.springframework.context.ApplicationListener, org.springframework.context.ApplicationContextAware

Encapsulates a Container within which the Web Script Runtime executes. Container examples - presentation (web tier), repository (server tier)

Author:
dcaruana

Field Summary
protected  org.springframework.context.ApplicationContext applicationContext
           
 
Constructor Summary
AbstractRuntimeContainer()
           
 
Method Summary
 boolean authenticate(Authenticator auth, Description.RequiredAuthentication required)
          Pre-authenticate container, if required
protected  org.springframework.context.ApplicationContext getApplicationContext()
          Gets the Application Context
 ConfigService getConfigService()
          Gets the Config Service
 FormatRegistry getFormatRegistry()
          Gets the response format registry
 String getName()
          Gets the name of the Container
 Registry getRegistry()
          Gets the registry of Web Scripts
 Description.RequiredAuthentication getRequiredAuthentication()
          Gets the required container authentication level (for matching web scripts)
 Map<String,Object> getScriptParameters()
          Gets parameters for the Script Processor
 ScriptProcessorRegistry getScriptProcessorRegistry()
          Gets the Script Processor Registry
 SearchPath getSearchPath()
          Gets the Search Path
 Map<String,Object> getTemplateParameters()
          Gets parameters for the Template Processor
 TemplateProcessorRegistry getTemplateProcessorRegistry()
          Gets the Template Processor Registry
 void onApplicationEvent(org.springframework.context.ApplicationEvent event)
           
 void reset()
          Re-initialise the Web Script Container
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setConfigService(ConfigService configService)
           
 void setFormatRegistry(FormatRegistry formatRegistry)
           
 void setName(String name)
           
 void setRegistry(Registry registry)
           
 void setScriptObjects(Map<String,Object> scriptObjects)
           
 void setScriptProcessorRegistry(ScriptProcessorRegistry scriptProcessorRegistry)
           
 void setSearchPath(SearchPath searchPath)
           
 void setTemplateObjects(Map<String,Object> templateObjects)
           
 void setTemplateProcessorRegistry(TemplateProcessorRegistry templateProcessorRegistry)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.extensions.webscripts.RuntimeContainer
executeScript
 
Methods inherited from interface org.springframework.extensions.webscripts.Container
getDescription
 

Field Detail

applicationContext

protected org.springframework.context.ApplicationContext applicationContext
Constructor Detail

AbstractRuntimeContainer

public AbstractRuntimeContainer()
Method Detail

setName

public void setName(String name)
Parameters:
name -

setFormatRegistry

public void setFormatRegistry(FormatRegistry formatRegistry)
Parameters:
formatRegistry -

setRegistry

public void setRegistry(Registry registry)
Parameters:
registry -

setScriptProcessorRegistry

public void setScriptProcessorRegistry(ScriptProcessorRegistry scriptProcessorRegistry)
Parameters:
scriptProcessorRegistry -

setTemplateProcessorRegistry

public void setTemplateProcessorRegistry(TemplateProcessorRegistry templateProcessorRegistry)
Parameters:
templateProcessorRegistry -

setSearchPath

public void setSearchPath(SearchPath searchPath)
Parameters:
searchPath -

setConfigService

public void setConfigService(ConfigService configService)
Parameters:
configService -

setScriptObjects

public void setScriptObjects(Map<String,Object> scriptObjects)
Parameters:
scriptObjects -

setTemplateObjects

public void setTemplateObjects(Map<String,Object> templateObjects)
Parameters:
templateObjects -

getName

public String getName()
Description copied from interface: Container
Gets the name of the Container

Specified by:
getName in interface Container
Returns:
name

getScriptParameters

public Map<String,Object> getScriptParameters()
Description copied from interface: Container
Gets parameters for the Script Processor

Specified by:
getScriptParameters in interface Container
Returns:
parameters

getTemplateParameters

public Map<String,Object> getTemplateParameters()
Description copied from interface: Container
Gets parameters for the Template Processor

Specified by:
getTemplateParameters in interface Container
Returns:
parameters

getFormatRegistry

public FormatRegistry getFormatRegistry()
Description copied from interface: Container
Gets the response format registry

Specified by:
getFormatRegistry in interface Container
Returns:
response format registry

getRegistry

public Registry getRegistry()
Description copied from interface: Container
Gets the registry of Web Scripts

Specified by:
getRegistry in interface Container
Returns:
registry of web scripts

getConfigService

public ConfigService getConfigService()
Description copied from interface: Container
Gets the Config Service

Specified by:
getConfigService in interface Container
Returns:
config service

getScriptProcessorRegistry

public ScriptProcessorRegistry getScriptProcessorRegistry()
Description copied from interface: Container
Gets the Script Processor Registry

Specified by:
getScriptProcessorRegistry in interface Container
Returns:
script processor registry

getTemplateProcessorRegistry

public TemplateProcessorRegistry getTemplateProcessorRegistry()
Description copied from interface: Container
Gets the Template Processor Registry

Specified by:
getTemplateProcessorRegistry in interface Container
Returns:
template processor registry

getSearchPath

public SearchPath getSearchPath()
Description copied from interface: Container
Gets the Search Path

Specified by:
getSearchPath in interface Container
Returns:
search path

reset

public void reset()
Description copied from interface: Container
Re-initialise the Web Script Container

Specified by:
reset in interface Container

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getApplicationContext

protected org.springframework.context.ApplicationContext getApplicationContext()
Gets the Application Context

Returns:
application context

getRequiredAuthentication

public Description.RequiredAuthentication getRequiredAuthentication()
Description copied from interface: RuntimeContainer
Gets the required container authentication level (for matching web scripts)

Specified by:
getRequiredAuthentication in interface RuntimeContainer
Returns:
the required authentication level

authenticate

public boolean authenticate(Authenticator auth,
                            Description.RequiredAuthentication required)
Description copied from interface: RuntimeContainer
Pre-authenticate container, if required

Specified by:
authenticate in interface RuntimeContainer


Copyright © 2009 SpringSource, Inc. All Rights Reserved.