org.jlf.httpRequest
Class HTTPRequestDataMapper

java.lang.Object
  |
  +--org.jlf.dataMap.DataMapper
        |
        +--org.jlf.httpRequest.HTTPRequestDataMapper

public class HTTPRequestDataMapper
extends DataMapper

This class is used to map HTTP post requests to data mapped objects.

See Also:
DataMapper

Field Summary
protected  AbstractProcessor processor
          Holds the HTTP Request servlet.
static java.lang.String REQUEST_DATA_STORE
           
static java.lang.String SESSION_DATA_STORE
           
 
Fields inherited from class org.jlf.dataMap.DataMapper
dataArray, dataLocation
 
Constructor Summary
HTTPRequestDataMapper()
          Allow the default constructor, but please use a parameterized constructor!
HTTPRequestDataMapper(AbstractProcessor processor)
          Constructs a new data mapper which references back to the DataLocation who created it.
 
Method Summary
 void close()
          Close the data mapper so it can clean up any resources it may have allocated.
 void commitWrites()
          Nothing to do here, not a data sink.
protected  boolean constructDataArrayFromHttpRequest(java.lang.String httpObjectName)
          Helper method to construct a DataArray from the HTTP input form.
protected  DataMappedObject constructObjectFromDataArray(java.lang.String dataMappedObjectClass)
          Helper method to map an individual object from an HTTP input form to a DataMappedObject.
 java.util.Vector findBySearchCriteria(DataMappedObject dmo, java.lang.String criteriaKey)
          Nothing to do here, search criteria is kind of meaningless for a simple HTTP get/post
 javax.servlet.http.HttpServletRequest getRequest()
          Returns the HTTP Request object.
 javax.servlet.http.HttpServletResponse getResponse()
          Returns the HTTP Response object.
protected  javax.servlet.http.HttpSession getSession()
          Retrieves (or creates if not yet created) the user's session info.
protected  void mapObject(java.lang.String httpObject, java.lang.String dataMappedObjectClass)
          Helper method to map an individual object from an HTTP input form to a DataMappedObject.
 void mapObjects()
          Maps all objects from the Processor into request or session objects.
 void write(DataMappedObject dmo, Relationship relationship)
          Nothing to do here, not a data sink.
 
Methods inherited from class org.jlf.dataMap.DataMapper
findDataAttributeForReplacementString, getCascadedRelationships, getDataLocation, replaceAttributeParameters, rollbackWrites, setDataLocation, stringForDataAttributeReplacement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_DATA_STORE

public static final java.lang.String SESSION_DATA_STORE
See Also:
Constant Field Values

REQUEST_DATA_STORE

public static final java.lang.String REQUEST_DATA_STORE
See Also:
Constant Field Values

processor

protected AbstractProcessor processor
Holds the HTTP Request servlet.

Constructor Detail

HTTPRequestDataMapper

public HTTPRequestDataMapper()
Allow the default constructor, but please use a parameterized constructor!


HTTPRequestDataMapper

public HTTPRequestDataMapper(AbstractProcessor processor)
Constructs a new data mapper which references back to the DataLocation who created it.

Method Detail

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Returns the HTTP Request object.


getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Returns the HTTP Response object.


getSession

protected javax.servlet.http.HttpSession getSession()
Retrieves (or creates if not yet created) the user's session info.


close

public void close()
Close the data mapper so it can clean up any resources it may have allocated. Nothing to close here.

Specified by:
close in class DataMapper

findBySearchCriteria

public java.util.Vector findBySearchCriteria(DataMappedObject dmo,
                                             java.lang.String criteriaKey)
Nothing to do here, search criteria is kind of meaningless for a simple HTTP get/post

Specified by:
findBySearchCriteria in class DataMapper

write

public void write(DataMappedObject dmo,
                  Relationship relationship)
Nothing to do here, not a data sink.

Specified by:
write in class DataMapper

commitWrites

public void commitWrites()
Nothing to do here, not a data sink.

Specified by:
commitWrites in class DataMapper

constructDataArrayFromHttpRequest

protected boolean constructDataArrayFromHttpRequest(java.lang.String httpObjectName)
Helper method to construct a DataArray from the HTTP input form.


constructObjectFromDataArray

protected DataMappedObject constructObjectFromDataArray(java.lang.String dataMappedObjectClass)
Helper method to map an individual object from an HTTP input form to a DataMappedObject.


mapObject

protected void mapObject(java.lang.String httpObject,
                         java.lang.String dataMappedObjectClass)
Helper method to map an individual object from an HTTP input form to a DataMappedObject.


mapObjects

public void mapObjects()
Maps all objects from the Processor into request or session objects.