org.apache.jetspeed.ajax
Class AjaxRequestServiceImpl

java.lang.Object
  extended by org.apache.jetspeed.ajax.AjaxRequestServiceImpl
All Implemented Interfaces:
org.apache.jetspeed.ajax.AjaxRequestService

public class AjaxRequestServiceImpl
extends Object
implements org.apache.jetspeed.ajax.AjaxRequestService

Provides a generic way to handle a Ajax request/response. Useful for AJAX since the processing can be broken down into actions and builders


Field Summary
protected static String AJAX_PROCESSOR
           
protected static String CONTENT_TYPE
           
protected static String DEFAULT_ERROR
           
protected  String defaultAction
           
protected  org.apache.commons.logging.Log log
          Logger
protected  Map objects
           
protected static String URL_PARAMETER_NAME
           
protected  String urlParameterName
           
protected  org.apache.velocity.app.VelocityEngine velocityEngine
           
protected  org.apache.velocity.tools.generic.EscapeTool velocityEscTool
           
 
Constructor Summary
AjaxRequestServiceImpl(Map objects, org.apache.velocity.app.VelocityEngine velocityEngine)
           
AjaxRequestServiceImpl(Map objects, org.apache.velocity.app.VelocityEngine velocityEngine, String urlParameterName)
           
 
Method Summary
protected  void buildError(org.apache.jetspeed.request.RequestContext requestContext)
           
 Map getActionMap()
           
 void process(org.apache.jetspeed.request.RequestContext requestContext)
           
protected  boolean processAction(org.apache.jetspeed.ajax.AjaxAction action, org.apache.jetspeed.request.RequestContext requestContext, Map resultMap)
           
protected  void processBuilder(org.apache.jetspeed.ajax.AjaxBuilder builder, Map inputMap, org.apache.jetspeed.request.RequestContext requestContext, boolean actionSuccessFlag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

protected static final String CONTENT_TYPE
See Also:
Constant Field Values

AJAX_PROCESSOR

protected static final String AJAX_PROCESSOR
See Also:
Constant Field Values

DEFAULT_ERROR

protected static final String DEFAULT_ERROR
See Also:
Constant Field Values

URL_PARAMETER_NAME

protected static final String URL_PARAMETER_NAME
See Also:
Constant Field Values

log

protected org.apache.commons.logging.Log log
Logger


objects

protected Map objects

velocityEngine

protected org.apache.velocity.app.VelocityEngine velocityEngine

urlParameterName

protected String urlParameterName

defaultAction

protected String defaultAction

velocityEscTool

protected org.apache.velocity.tools.generic.EscapeTool velocityEscTool
Constructor Detail

AjaxRequestServiceImpl

public AjaxRequestServiceImpl(Map objects,
                              org.apache.velocity.app.VelocityEngine velocityEngine)

AjaxRequestServiceImpl

public AjaxRequestServiceImpl(Map objects,
                              org.apache.velocity.app.VelocityEngine velocityEngine,
                              String urlParameterName)
Method Detail

process

public void process(org.apache.jetspeed.request.RequestContext requestContext)
             throws org.apache.jetspeed.ajax.AJAXException
Specified by:
process in interface org.apache.jetspeed.ajax.AjaxRequestService
Throws:
org.apache.jetspeed.ajax.AJAXException

processAction

protected boolean processAction(org.apache.jetspeed.ajax.AjaxAction action,
                                org.apache.jetspeed.request.RequestContext requestContext,
                                Map resultMap)
                         throws Exception
Throws:
Exception

processBuilder

protected void processBuilder(org.apache.jetspeed.ajax.AjaxBuilder builder,
                              Map inputMap,
                              org.apache.jetspeed.request.RequestContext requestContext,
                              boolean actionSuccessFlag)

buildError

protected void buildError(org.apache.jetspeed.request.RequestContext requestContext)

getActionMap

public Map getActionMap()
Specified by:
getActionMap in interface org.apache.jetspeed.ajax.AjaxRequestService
Returns:
Returns the objects.


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.