atg.droplet.xml
Class NodeForEach

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.ForEach
                              extended by atg.droplet.xml.NodeForEach
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 NodeForEach
extends ForEach

Select a set of DOM nodes using a pattern and iterate over them.

These are the parameters for the NodeForEach droplet:

Input Paramaters
 
node (required)
This parameter specifies the DOM node to be passed to this droplet. If it is a Document node, then the selection is made relative to the root element of the document.

select (optional)
The pattern used to select the nodes to be iterated over. This pattern can be any XPath expression, see http://www.w3.org/TR/xpath (1999-11-16). If no pattern is provided then select all the element children of the target node.

Other Parameters
 
output
startOutput
endOutput
etc.
All standard output and open parameter definitions are inherited from the ForEach droplet.

There are no failure or unset oparams for the NodeForEach droplet, but the node is required, and there can be errors in the execution of the XML query. For example, there will be an error if the select parameter is an illegal XPath expression. If an error occurs during node selection, the resulting array will be null, and the empty oparam will be rendered. If error logging is enabled, the details of the exception will be written to the log.


Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String DEFAULT_XPATH_EXPRESSION
          The default XPath expression to use when the select parameter is unset.
static java.lang.String NODE_PARAM
          The name of the node input parameter
static java.lang.String SELECT_PARAM
          The name of the select input parameter
 
Fields inherited from class atg.droplet.ForEach
ARRAY, COUNT, DEBUG, ELEMENT, ELEMENT_NAME, EMPTY, INDEX, INDEX_NAME, KEY, OUTPUT, OUTPUT_END, OUTPUT_START, REVERSE_ORDER, SIZE, SORT_PROPERTIES
 
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
NodeForEach()
           
 
Method Summary
 java.lang.Object getArray(DynamoHttpServletRequest pReq)
          Gets the array-like value (e.g., array, Vector, Enumeration) to be used by this droplet from the request.
 atg.xml.tools.XMLToolsFactory getXmlToolsFactory()
          Get the XMLToolsFactory used by this component.
 void setXmlToolsFactory(atg.xml.tools.XMLToolsFactory pXMLToolsFactory)
          Set the XMLToolsFactory to be used by this component.
 
Methods inherited from class atg.droplet.ForEach
getSortedArray, service, serviceArray, serviceCollection, serviceDictionary, serviceEnumeration, serviceIndexedList, serviceIterator, serviceMap, serviceMapArray, servicePrimitiveArray, setElementParameter
 
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

NODE_PARAM

public static java.lang.String NODE_PARAM
The name of the node input parameter


SELECT_PARAM

public static java.lang.String SELECT_PARAM
The name of the select input parameter


DEFAULT_XPATH_EXPRESSION

public static java.lang.String DEFAULT_XPATH_EXPRESSION
The default XPath expression to use when the select parameter is unset.

Constructor Detail

NodeForEach

public NodeForEach()
Method Detail

setXmlToolsFactory

public void setXmlToolsFactory(atg.xml.tools.XMLToolsFactory pXMLToolsFactory)
Set the XMLToolsFactory to be used by this component.


getXmlToolsFactory

public atg.xml.tools.XMLToolsFactory getXmlToolsFactory()
Get the XMLToolsFactory used by this component.


getArray

public java.lang.Object getArray(DynamoHttpServletRequest pReq)
Gets the array-like value (e.g., array, Vector, Enumeration) to be used by this droplet from the request. This implementation uses an XPath query.

Overrides:
getArray in class ForEach