atg.droplet
Class ArrayIncludesValue

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.ArrayIncludesValue
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class ArrayIncludesValue
extends DynamoServlet

This servlet takes an array and a value, and renders the "true" open parameter if the value is in the array, and the "false" open parameter otherwise. The array parameter can be a general Collection (Vectors, Lists, Sets), Iterator, Enumeration, Map, Dictionary or an array.

A complete description of the parameters to the ArrayIncludesValue droplet are:

array
The parameter that defines the array to be searched.
value
The parameter that defines the value to check the array for.
true
This parameter is rendered if the value is found in the array.
false
This parameter is rendered if the value is not found in the array.


Field Summary
static ParameterName ARRAY
           
static java.lang.String CLASS_VERSION
           
static ParameterName FALSE
           
static ParameterName TRUE
           
static ParameterName VALUE
           
 
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
ArrayIncludesValue()
           
 
Method Summary
 java.lang.Object getArray(DynamoHttpServletRequest pReq)
          Gets the array-like value (e.g., array, List, Enumeration) to be used by this droplet from the request.
 java.lang.Object getValue(DynamoHttpServletRequest pReq)
          Gets the value to be used by this droplet from the request.
protected  void searchArray(java.lang.Object[] pArray, java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Performs the search operation for array objects
protected  void searchCollection(java.util.Collection pArray, java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Renders the search operation for Collection objects
protected  void searchDictionary(java.util.Dictionary pDictionary, java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Renders the search operation for Dictionary objects
protected  void searchEnumeration(java.util.Enumeration pEnumeration, java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Renders the search operation for Enumeration objects
protected  void searchIterator(java.util.Iterator pIterator, java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Renders the search operation for Iterator objects
protected  void searchList(java.util.List pList, java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Renders the search operation for List objects
protected  void searchMap(java.util.Map pMap, java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Renders the search operation for Map objects
protected  void searchMapArray(java.util.Map.Entry[] pArray, java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Performs the search operation for map array objects
protected  void searchPrimitiveArray(java.lang.Object pArray, java.lang.Object pValue, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Performs the search operation for primitive array objects using the reflection methods to access values in the array.
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method provides the default implementation of service, by dispatching to conventionally named methods which begin with "do".
 
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, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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

ARRAY

public static final ParameterName ARRAY

VALUE

public static final ParameterName VALUE

TRUE

public static final ParameterName TRUE

FALSE

public static final ParameterName FALSE
Constructor Detail

ArrayIncludesValue

public ArrayIncludesValue()
Method Detail

getArray

public java.lang.Object getArray(DynamoHttpServletRequest pReq)
Gets the array-like value (e.g., array, List, Enumeration) to be used by this droplet from the request. Subclasses may override this method to extract the array by some means other than simply looking up its parameter value in the request.


getValue

public java.lang.Object getValue(DynamoHttpServletRequest pReq)
Gets the value to be used by this droplet from the request. Subclasses may override this method to extract the value by some means other than simply looking up its parameter value in the request.


service

public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
Description copied from class: DynamoServlet
This method provides the default implementation of service, by dispatching to conventionally named methods which begin with "do".

Overrides:
service in class DynamoServlet
Parameters:
pRequest - the request to be processed
pResponse - 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.

searchMapArray

protected void searchMapArray(java.util.Map.Entry[] pArray,
                              java.lang.Object pValue,
                              DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Performs the search operation for map array objects

Parameters:
pArray - the object to search
pValue - the value to search for
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response

searchArray

protected void searchArray(java.lang.Object[] pArray,
                           java.lang.Object pValue,
                           DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Performs the search operation for array objects

Parameters:
pArray - the object to search
pValue - the value to search for
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response

searchPrimitiveArray

protected void searchPrimitiveArray(java.lang.Object pArray,
                                    java.lang.Object pValue,
                                    DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
Performs the search operation for primitive array objects using the reflection methods to access values in the array. This version is slightly slower than the regular array version, but more general and works for int[] etc. arrays.

Parameters:
pArray - the object to search
pValue - the value to search for
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response

searchList

protected void searchList(java.util.List pList,
                          java.lang.Object pValue,
                          DynamoHttpServletRequest pRequest,
                          DynamoHttpServletResponse pResponse)
                   throws javax.servlet.ServletException,
                          java.io.IOException
Renders the search operation for List objects

Parameters:
pList - the object to search
pValue - the value to search for
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response

searchCollection

protected void searchCollection(java.util.Collection pArray,
                                java.lang.Object pValue,
                                DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Renders the search operation for Collection objects

Parameters:
pArray - the object to search
pValue - the value to search for
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response

searchIterator

protected void searchIterator(java.util.Iterator pIterator,
                              java.lang.Object pValue,
                              DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Renders the search operation for Iterator objects

Parameters:
pIterator - the object to search
pValue - the value to search for
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response

searchEnumeration

protected void searchEnumeration(java.util.Enumeration pEnumeration,
                                 java.lang.Object pValue,
                                 DynamoHttpServletRequest pRequest,
                                 DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Renders the search operation for Enumeration objects

Parameters:
pEnumeration - the object to search
pValue - the value to search for
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response

searchMap

protected void searchMap(java.util.Map pMap,
                         java.lang.Object pValue,
                         DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Renders the search operation for Map objects

Parameters:
pMap - the object to search
pValue - the value to search for
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response

searchDictionary

protected void searchDictionary(java.util.Dictionary pDictionary,
                                java.lang.Object pValue,
                                DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Renders the search operation for Dictionary objects

Parameters:
pDictionary - the object to search
pValue - the value to search for
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response