org.jahia.utils
Class ActionHandler

java.lang.Object
  extended by org.jahia.utils.ActionHandler

public class ActionHandler
extends java.lang.Object

Class ActionHandler: determines the method to invoke for an Application (typically a Web Application), given an action.

Version:
1.1
Author:
Stephane Boury, Jerome Tamiotti

Constructor Summary
ActionHandler(java.lang.String propsFile, java.lang.String theClass)
          Class constructor: builds the hashtable by reading a flat file.
 
Method Summary
 java.lang.Object call(java.lang.Object instanceOfClass, java.lang.String action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Calls the appropriate method given the action.
 java.lang.Object call(java.lang.String action, javax.servlet.http.HttpServletRequest request)
          Calls the appropriate method given the action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionHandler

public ActionHandler(java.lang.String propsFile,
                     java.lang.String theClass)
Class constructor: builds the hashtable by reading a flat file.

Parameters:
propsFile - the full path to the file containing pairs of "action - method name"
theClass - the name of the Class on which to call the methods
Method Detail

call

public java.lang.Object call(java.lang.String action,
                             javax.servlet.http.HttpServletRequest request)
                      throws java.lang.NullPointerException
Calls the appropriate method given the action.

Parameters:
action - the action that triggers the method to call
request - the request parameter for the method
Throws:
java.lang.NullPointerException

call

public java.lang.Object call(java.lang.Object instanceOfClass,
                             java.lang.String action,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws java.lang.NullPointerException
Calls the appropriate method given the action.

Parameters:
action - the action that triggers the method to call
request - the request parameter for the method
response - the response parameter for the method
Throws:
java.lang.NullPointerException


Copyright © 1999-2008 Jahia Ltd. All Rights Reserved.