atg.droplet.xml
Class NodeForEach
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.nucleus.TimedOperationService
atg.nucleus.servlet.ServletService
atg.nucleus.servlet.HttpServletService
atg.servlet.DynamoServlet
atg.droplet.ForEach
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 interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
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.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 |
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.
NodeForEach
public NodeForEach()
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