Package com.tangosol.config.xml
Class DocumentElementPreprocessor
java.lang.Object
com.tangosol.config.xml.DocumentElementPreprocessor
- All Implemented Interfaces:
DocumentPreprocessor
A
DocumentElementPreprocessor
is a DocumentPreprocessor
that is designed to operate with one or more DocumentElementPreprocessor.ElementPreprocessor
s.- Since:
- Coherence 12.1.2
- Author:
- bo 2012.03.12
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
AnDocumentElementPreprocessor.ElementPreprocessor
provides a mechanism to examine and optionally mutate anXmlElement
prior to it being processed by aElementProcessor
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
preprocess
(ProcessingContext context, XmlElement xmlElement) Performs pre-processing of the anXmlElement
, optionally mutating it (or it's children) as required.
-
Constructor Details
-
DocumentElementPreprocessor
public DocumentElementPreprocessor()Constructs aDocumentElementPreprocessor
.
-
-
Method Details
-
addElementPreprocessor
public DocumentElementPreprocessor addElementPreprocessor(DocumentElementPreprocessor.ElementPreprocessor preprocessor) - Parameters:
preprocessor
- theDocumentElementPreprocessor.ElementPreprocessor
to add- Returns:
- the
DocumentElementPreprocessor
(this) to support fluent-style calls
-
preprocess
public boolean preprocess(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException Performs pre-processing of the anXmlElement
, optionally mutating it (or it's children) as required.Implementations of this interface may traverse and/or perform any mutations on the specified
XmlElement
.Note: It is illegal to modify an
XmlElement
outside the scope of the providedXmlElement
. eg: Attempting to modify any of the parents of the providedXmlElement
may result in undefined and unexpected behavior. Only mutations of theXmlElement
itself or children is permitted.- Specified by:
preprocess
in interfaceDocumentPreprocessor
- Parameters:
context
- theProcessingContext
in which theXmlElement
is being pre-processedxmlElement
- theXmlElement
to pre-process- Returns:
true
if the specifiedXmlElement
should be reconsidered either by this or otherDocumentPreprocessor
s for re-preprocessing due to mutations on theXmlElement
,false
otherwise.- Throws:
ConfigurationException
- if during pre-processing of theXmlElement
a configuration issue was discovered (or if pre-processing fails for some reason)
-