objectivehtml.struts
Class ObjectiveHtmlServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.apache.struts.action.ActionServlet
                    |
                    +--objectivehtml.struts.ObjectiveHtmlServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ObjectiveHtmlServlet
extends org.apache.struts.action.ActionServlet

This class is the "Controller" for the OHtml-Struts framework.

See Also:
Serialized Form

Field Summary
protected  ActionMap m_objActionMap
          The map of ohtml-action directives
protected  FormConfigMap m_objFormConfigMap
          The map of ohtml-form directives
protected  java.lang.String m_sOHtmlConfigFile
          The file with the ohtml directives
protected  java.lang.String m_sResult
          The request name where the result object is held
 
Fields inherited from class org.apache.struts.action.ActionServlet
actions, application, bufferSize, config, content, dataSources, debug, defaultLocale, factoryClass, formBeanClass, formBeans, forwardClass, forwards, internal, internalName, locale, mappingClass, mappings, maxFileSize, multipartClass, nocache, registrations, servletMapping, servletName, tempDir, validate, validating
 
Constructor Summary
ObjectiveHtmlServlet()
           
 
Method Summary
 void configureObjectiveHtml()
          Parses the configuration file(s) for the OHtml-Struts framework and sets all the directives in the appropriate member variables.
 void connectObjects(HtmlForm objForm, Connections objConnections, javax.servlet.http.HttpServletRequest objRequest)
          This connects the slots and signals specified from the directives.
 ActionMap getActionMap()
          Gets the map of ohtml-action directives.
 FormConfigMap getFormConfigMap()
          Gets the map of ohtml-form directives.
 java.lang.String getResult()
          Gets the name of the request object where the result data is to be stored.
 void init()
          Initialize this servlet with the directives from the ohtml configuration files.
 void initObjectiveHtml()
          Does the remaining initialization operations needed for OHtml.
protected  void initObjectiveHtmlParams()
          Initializes the ohtml startup parameters.
 HtmlForm newFormInstance(java.lang.String sName)
          Creates a new HtmlForm object based on the ohtml-form directives specified in the configuration file.
 void processObjectiveHtmlAction(Action objAction, javax.servlet.http.HttpServletRequest objRequest)
          This method processed an Objective Html Action.
 java.lang.String processPath(javax.servlet.http.HttpServletRequest objRequest)
          Overrides the parent version of method to make it public.
 void setActionMap(ActionMap objActionMap)
          Sets the map of ohtml-action directives.
 void setFormConfigMap(FormConfigMap objFormConfigMap)
          Sets the map of ohtml-form directives.
 void setResult(java.lang.String sResult)
          Sets the name of the request object where the result data is to be stored.
 
Methods inherited from class org.apache.struts.action.ActionServlet
addDataSource, addFormBean, addForward, addMapping, addServletMapping, destroy, destroyActions, destroyApplication, destroyDataSources, destroyInternal, doGet, doPost, findDataSource, findFormBean, findForward, findMapping, getBufferSize, getDebug, getFormBeanClass, getForwardClass, getMappingClass, getMaxFileSize, getMultipartClass, getResources, getTempDir, initActions, initApplication, initDataSources, initDebug, initDigester, initDigesterOld, initInternal, initMapping, initOther, initServlet, initUpload, log, process, processActionCreate, processActionForm, processActionForward, processActionPerform, processContent, processForward, processInclude, processLocale, processMapping, processNoCache, processPopulate, processPreprocess, processValidate, reload, removeFormBean, removeForward, removeMapping, setBufferSize, setFormBeanClass, setForwardClass, setMappingClass, setMaxFileSize, setMultipartClass, setTempDir
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_sOHtmlConfigFile

protected java.lang.String m_sOHtmlConfigFile
The file with the ohtml directives

m_sResult

protected java.lang.String m_sResult
The request name where the result object is held

m_objFormConfigMap

protected FormConfigMap m_objFormConfigMap
The map of ohtml-form directives

m_objActionMap

protected ActionMap m_objActionMap
The map of ohtml-action directives
Constructor Detail

ObjectiveHtmlServlet

public ObjectiveHtmlServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Initialize this servlet with the directives from the ohtml configuration files. It first calls the parent init() method to initialize all the Struts configurations.
Overrides:
init in class org.apache.struts.action.ActionServlet
Throws:
javax.servlet.ServletException - if we cannot configure ourselves correctly

initObjectiveHtmlParams

protected void initObjectiveHtmlParams()
Initializes the ohtml startup parameters.

setResult

public void setResult(java.lang.String sResult)
Sets the name of the request object where the result data is to be stored.
Parameters:
sResult - the name of the request object

getResult

public java.lang.String getResult()
Gets the name of the request object where the result data is to be stored.
Returns:
the name of the request object

setFormConfigMap

public void setFormConfigMap(FormConfigMap objFormConfigMap)
Sets the map of ohtml-form directives.
Parameters:
sFormConfigMap - the map of ohtml-form directives

getFormConfigMap

public FormConfigMap getFormConfigMap()
Gets the map of ohtml-form directives.
Returns:
the map of ohtml-form directives

setActionMap

public void setActionMap(ActionMap objActionMap)
Sets the map of ohtml-action directives.
Parameters:
sActionMap - the map of ohtml-action directives

getActionMap

public ActionMap getActionMap()
Gets the map of ohtml-action directives.
Returns:
the map of ohtml-action directives

configureObjectiveHtml

public void configureObjectiveHtml()
                            throws javax.servlet.ServletException
Parses the configuration file(s) for the OHtml-Struts framework and sets all the directives in the appropriate member variables.
Throws:
javax.servlet.ServletException - if the configuration files cannot be processed

initObjectiveHtml

public void initObjectiveHtml()
                       throws javax.servlet.ServletException
Does the remaining initialization operations needed for OHtml.
Throws:
javax.servlet.ServletException - if the initialization fails

newFormInstance

public HtmlForm newFormInstance(java.lang.String sName)
                         throws javax.servlet.ServletException
Creates a new HtmlForm object based on the ohtml-form directives specified in the configuration file.
Parameters:
sName - the name of the form to instantiate
Throws:
javax.servlet.ServletException - if something goes wrong

processObjectiveHtmlAction

public void processObjectiveHtmlAction(Action objAction,
                                       javax.servlet.http.HttpServletRequest objRequest)
                                throws javax.servlet.ServletException
This method processed an Objective Html Action.
Parameters:
objAction - the action object to process
objRequest - the current request object
Throws:
javax.servlet.ServletException - if something goes wrong

connectObjects

public void connectObjects(HtmlForm objForm,
                           Connections objConnections,
                           javax.servlet.http.HttpServletRequest objRequest)
                    throws javax.servlet.ServletException
This connects the slots and signals specified from the directives.
Parameters:
objForm - the form that is currently is context
objConnections - the list of connection directives
objRequest - the current request object
Throws:
javax.servlet.ServletException - if something goes wrong

processPath

public java.lang.String processPath(javax.servlet.http.HttpServletRequest objRequest)
Overrides the parent version of method to make it public.
Overrides:
processPath in class org.apache.struts.action.ActionServlet
Parameters:
objRequest - the current request object
Returns:
the path we will use to identify an action mapping