atg.droplet
Class Compare

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.droplet.Compare
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class Compare
extends DynamoServlet

The Compare servlet renders one of its oparms based on the relative values of the obj1 and obj2 input params. It takes as parameters:

obj1
the first object to be compared. the object must be an instance of comparable. think of this object as the left side of the equation or inequation. e.g. obj1 > obj2
obj2
the second object to be compared. the object must be an instance of comparable. think of this object as the right side of the equation or inequation. e.g. obj1 > obj2
It renders the following oparams:
output
In the output param, we set the param value which is the value returned by calling compare(obj1, obj2), converted to a String.
greaterthan
This oparam is rendered if obj1 > obj2.
lessthan
This oparam is rendered if obj1 < obj2.
equal
This oparam is rendered if obj1 == obj2.
noncomparable
This oparam is rendered the objects cannot be compared.
default
This oparam is rendered if no other oparam has been handled, or if either parameter is null.


Field Summary
static java.lang.String CLASS_VERSION
           
static ParameterName DEFAULT
           
static ParameterName EQUAL
           
static ParameterName GREATERTHAN
           
static ParameterName LESSTHAN
           
static ParameterName NONCOMPARABLE
           
static ParameterName OBJ1
           
static ParameterName OBJ2
           
 
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
 
Fields inherited from class atg.nucleus.servlet.ServletService
SERVLET_INFO_KEY
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
Compare()
           
 
Method Summary
 void service(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes)
          Render the Compare
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, init, setServletInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION

OBJ1

public static final ParameterName OBJ1

OBJ2

public static final ParameterName OBJ2

DEFAULT

public static final ParameterName DEFAULT

EQUAL

public static final ParameterName EQUAL

GREATERTHAN

public static final ParameterName GREATERTHAN

LESSTHAN

public static final ParameterName LESSTHAN

NONCOMPARABLE

public static final ParameterName NONCOMPARABLE
Constructor Detail

Compare

public Compare()
Method Detail

service

public void service(DynamoHttpServletRequest pReq,
                    DynamoHttpServletResponse pRes)
             throws javax.servlet.ServletException,
                    java.io.IOException
Render the Compare

Overrides:
service in class DynamoServlet
Parameters:
pReq - the request to be processed
pRes - the response object for this request
Throws:
javax.servlet.ServletException - an application specific error occurred processing this request
java.io.IOException - an error occurred reading data from the request or writing data to the response.