Package com.tangosol.config.xml
Class DocumentElementPreprocessor
- java.lang.Object
-
- com.tangosol.config.xml.DocumentElementPreprocessor
-
- All Implemented Interfaces:
DocumentPreprocessor
public class DocumentElementPreprocessor extends Object implements DocumentPreprocessor
ADocumentElementPreprocessor
is aDocumentPreprocessor
that is designed to operate with one or moreDocumentElementPreprocessor.ElementPreprocessor
s.- Since:
- Coherence 12.1.2
- Author:
- bo 2012.03.12
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DocumentElementPreprocessor.ElementPreprocessor
AnDocumentElementPreprocessor.ElementPreprocessor
provides a mechanism to examine and optionally mutate anXmlElement
prior to it being processed by aElementProcessor
.
-
Constructor Summary
Constructors Constructor Description DocumentElementPreprocessor()
Constructs aDocumentElementPreprocessor
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentElementPreprocessor
addElementPreprocessor(DocumentElementPreprocessor.ElementPreprocessor preprocessor)
boolean
preprocess(ProcessingContext context, XmlElement xmlElement)
Performs pre-processing of the anXmlElement
, optionally mutating it (or it's children) as required.
-
-
-
Constructor Detail
-
DocumentElementPreprocessor
public DocumentElementPreprocessor()
Constructs aDocumentElementPreprocessor
.
-
-
Method Detail
-
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)
-
-