com.mizar.faces.ajax.servlet
Class AjaxHandler

java.lang.Object
  extended by com.mizar.faces.ajax.servlet.AjaxHandler
Direct Known Subclasses:
AjaxServletHandler, CurrentRowHandler, FeatureSearchHandler, GeocoderHandler, MapClickHandler, PingHandler, SearchAreaHandler, UpdateGeometryHandler

public abstract class AjaxHandler
extends java.lang.Object

This is the base abstract class for handlers used by AjaxPhaseListener AjaxServlet handlers should extend AjaxServletHandler which extends this class.


Field Summary
protected  org.apache.commons.logging.Log _Logger
           
 
Constructor Summary
AjaxHandler()
           
 
Method Summary
 javax.persistence.EntityManager getEm()
           
 org.apache.commons.logging.Log getLogger()
           
static double[] getOrdinates(java.lang.String wkt)
           
abstract  boolean processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process a request and create a response
 void writeResponse(javax.servlet.http.HttpServletResponse response, java.lang.String outStr)
          This method may be called from within the implemented processRequest method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_Logger

protected org.apache.commons.logging.Log _Logger
Constructor Detail

AjaxHandler

public AjaxHandler()
Method Detail

processRequest

public abstract boolean processRequest(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
Process a request and create a response

Parameters:
request -
response -
Returns:
true if the request is finished, false if the system should continue

getLogger

public org.apache.commons.logging.Log getLogger()

writeResponse

public void writeResponse(javax.servlet.http.HttpServletResponse response,
                          java.lang.String outStr)
This method may be called from within the implemented processRequest method.

Parameters:
response - as passed in the processRequest method
outStr - the string to include in the response

getOrdinates

public static double[] getOrdinates(java.lang.String wkt)
Parameters:
ordinatesWKTLike - a string of ordinates formatted as per the WKT standard but without the leading geometry type.
Returns:
the ordinates as an array of doubles

getEm

public javax.persistence.EntityManager getEm()