org.springframework.extensions.webscripts
Class WebScriptProcessor

java.lang.Object
  extended by org.springframework.extensions.surf.render.AbstractProcessor
      extended by org.springframework.extensions.webscripts.WebScriptProcessor
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener, Processor

public class WebScriptProcessor
extends AbstractProcessor

The WebScriptRenderer is an implementation of Renderable which describes a rendering engine that the Web Framework can use to execute a web script.

A WebScriptRenderer can be used to execute a web script for any purpose so long as an appropriate RendererContext instance is passed to it.

Most commonly, the RendererContext passed in will describe a Component.

The renderer supports "full page refresh" link backs to a webscript. The LocalWebScriptResponse object is responsable for encoding compatible links via the scripturl() template method.

Author:
muzquiano, kevinr

Field Summary
static String WEBSCRIPT_SERVICE_SERVLET
          The WebScript service servlet path
 
Constructor Summary
WebScriptProcessor()
           
 
Method Summary
 void executeBody(ProcessorContext pc)
          Executes the "body" of the processor output using the given processor context.
 void executeHeader(ProcessorContext pc)
          Executes the "header" of the processor output using the given processor context.
 boolean exists(ProcessorContext pc)
          Indicates whether the engine responsible for processing the body of the processor exists.
 LocalWebScriptRuntimeContainer getContainer()
          Gets the container bean.
 Registry getRegistry()
          Gets the web scripts registry.
 void init(org.springframework.context.ApplicationContext applicationContext)
          Initialisation hook point.
 void setContainer(LocalWebScriptRuntimeContainer containerBean)
          Sets the container bean.
 
Methods inherited from class org.springframework.extensions.surf.render.AbstractProcessor
execute, executeFooter, getProperty, getRenderingDescriptor, getRenderingDescriptor, onApplicationEvent, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEBSCRIPT_SERVICE_SERVLET

public static final String WEBSCRIPT_SERVICE_SERVLET
The WebScript service servlet path

See Also:
Constant Field Values
Constructor Detail

WebScriptProcessor

public WebScriptProcessor()
Method Detail

init

public void init(org.springframework.context.ApplicationContext applicationContext)
Description copied from interface: Processor
Initialisation hook point. This will be called exactly once when the processor is instantiated. It does not have access to request time information.

Specified by:
init in interface Processor
Overrides:
init in class AbstractProcessor
Parameters:
applicationContext - the application context

getRegistry

public Registry getRegistry()
Gets the web scripts registry.

Returns:
the registry

setContainer

public void setContainer(LocalWebScriptRuntimeContainer containerBean)
Sets the container bean.

Parameters:
containerBean - the new container bean

getContainer

public LocalWebScriptRuntimeContainer getContainer()
Gets the container bean.

Returns:
the container bean

executeHeader

public void executeHeader(ProcessorContext pc)
                   throws RendererExecutionException
Description copied from interface: Processor
Executes the "header" of the processor output using the given processor context.

Specified by:
executeHeader in interface Processor
Overrides:
executeHeader in class AbstractProcessor
Parameters:
pc - processorContext
Throws:
RendererExecutionException

executeBody

public void executeBody(ProcessorContext pc)
                 throws RendererExecutionException
Description copied from interface: Processor
Executes the "body" of the processor output using the given processor context.

Specified by:
executeBody in interface Processor
Specified by:
executeBody in class AbstractProcessor
Parameters:
pc - processorContext
Throws:
RendererExecutionException

exists

public boolean exists(ProcessorContext pc)
Description copied from interface: Processor
Indicates whether the engine responsible for processing the body of the processor exists.

Returns:


Copyright © 2009 SpringSource, Inc. All Rights Reserved.