EAF 7.6 Implementation

org.enhydra.util.chiba
Class ScriptAdapter

java.lang.Object
  extended by AbstractChibaAdapter
      extended by org.enhydra.util.chiba.BaseAdapter
          extended by org.enhydra.util.chiba.ScriptAdapter
All Implemented Interfaces:
org.w3c.dom.events.EventListener

public class ScriptAdapter
extends BaseAdapter
implements org.w3c.dom.events.EventListener

Adapter for processing DWR calls and building appropriate responses. This class is not exposed through DWR. Instead a Facadeclass 'FluxFacade' will be exposed that only allows to use the dispatch method. All other methods will be hidden for security.

Version:
$Id: ScriptAdapter.java,v 1.3 2007/04/05 19:02:12 slobodan Exp $
Author:
Joern Turner, Slobodan Vujasinovic

Field Summary
 
Fields inherited from class org.enhydra.util.chiba.BaseAdapter
clean
 
Constructor Summary
ScriptAdapter()
           
 
Method Summary
 void dispatch(ChibaEvent event)
          Dispatch a ChibaEvent to trigger some XForms processing such as updating of values or execution of triggers.
protected  java.lang.String escape(java.lang.String string)
           
protected  HttpRequestHandler getNewInteractionHandler()
          return a new InteractionHandler.
 void handleEvent(org.w3c.dom.events.Event event)
          listen to processor and add a DefaultChibaEventImpl object to the EventQueue.
 void init()
          initialize the Adapter.
 void setContext(java.util.Map contextParams)
          passes Map containing arbitrary context parameters to the Adapter.
 void setUploadDestination(java.lang.String destination)
          set the upload location.
 void shutdown()
          terminates the XForms processing.
 
Methods inherited from class org.enhydra.util.chiba.BaseAdapter
isClean, setClean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptAdapter

public ScriptAdapter()
Method Detail

init

public void init()
          throws XFormsException
initialize the Adapter. This is necessary cause often the using application will need to configure the Adapter before actually using it.

Throws:
org.chiba.xml.xforms.exception.XFormsException
XFormsException

dispatch

public void dispatch(ChibaEvent event)
              throws XFormsException
Dispatch a ChibaEvent to trigger some XForms processing such as updating of values or execution of triggers.

Parameters:
event - an application specific event
Throws:
org.chiba.xml.xforms.exception.XFormsException
XFormsException
See Also:
org.chiba.adapter.DefaultChibaEventImpl

handleEvent

public void handleEvent(org.w3c.dom.events.Event event)
listen to processor and add a DefaultChibaEventImpl object to the EventQueue.

Specified by:
handleEvent in interface org.w3c.dom.events.EventListener
Parameters:
event - the handled DOMEvent

shutdown

public void shutdown()
              throws XFormsException
terminates the XForms processing. right place to do cleanup of resources.

Throws:
org.chiba.xml.xforms.exception.XFormsException
XFormsException

setUploadDestination

public void setUploadDestination(java.lang.String destination)
set the upload location. This string represents the destination (data-sink) for uploads.

Parameters:
destination - a String representing the location where to store uploaded files/data.

escape

protected java.lang.String escape(java.lang.String string)

getNewInteractionHandler

protected HttpRequestHandler getNewInteractionHandler()
                                               throws XFormsException
return a new InteractionHandler.

This method returns a new HttpRequestHandler.

Returns:
returns a new
Throws:
XFormsException

setContext

public void setContext(java.util.Map contextParams)
passes Map containing arbitrary context parameters to the Adapter.

Parameters:
contextParams - Map of arbitrary params passed to the processor

EAF 7.6 Implementation