Class AbstractRuntimeContainer

java.lang.Object
org.springframework.extensions.webscripts.AbstractRuntimeContainer
All Implemented Interfaces:
EventListener, org.springframework.beans.factory.Aware, 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 Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
  • Constructor Details

    • AbstractRuntimeContainer

      public AbstractRuntimeContainer()
  • Method Details

    • setName

      public void setName(String name)
      Parameters:
      name - String
    • setFormatRegistry

      public void setFormatRegistry(FormatRegistry formatRegistry)
      Parameters:
      formatRegistry - FormatRegistry
    • setRegistry

      public void setRegistry(Registry registry)
      Parameters:
      registry - Registry
    • setScriptProcessorRegistry

      public void setScriptProcessorRegistry(ScriptProcessorRegistry scriptProcessorRegistry)
      Parameters:
      scriptProcessorRegistry - ScriptProcessorRegistry
    • setTemplateProcessorRegistry

      public void setTemplateProcessorRegistry(TemplateProcessorRegistry templateProcessorRegistry)
      Parameters:
      templateProcessorRegistry - TemplateProcessorRegistry
    • setScriptParameterFactoryRegistry

      public void setScriptParameterFactoryRegistry(ScriptParameterFactoryRegistry scriptParameterFactoryRegistry)
      Parameters:
      scriptParameterFactoryRegistry - ScriptParameterFactoryRegistry
    • setSearchPath

      public void setSearchPath(SearchPath searchPath)
      Parameters:
      searchPath - SearchPath
    • setConfigService

      public void setConfigService(org.springframework.extensions.config.ConfigService configService)
      Parameters:
      configService - ConfigService
    • setScriptObjects

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

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

      public void setAllowCallbacks(boolean allowCallbacks)
      Parameters:
      allowCallbacks - try to enable callback methods, such as json_callback
    • allowCallbacks

      public boolean allowCallbacks()
      Description copied from interface: Container
      Returns if this container should allow callback methods such as json_callback
      Specified by:
      allowCallbacks in interface Container
      Returns:
      true if this container should allow callback methods such as json_callback, false otherwise
    • 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 org.springframework.extensions.config.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
    • getScriptParameterFactoryRegistry

      public ScriptParameterFactoryRegistry getScriptParameterFactoryRegistry()
      Description copied from interface: Container
      Get the Script Parameter Factory Registry
      Specified by:
      getScriptParameterFactoryRegistry in interface Container
      Returns:
      script parameter factory 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
      Parameters:
      auth - Authenticator
      required - RequiredAuthentication