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.ElementPreprocessors.- Since:
- Coherence 12.1.2
- Author:
- bo 2012.03.12
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAnDocumentElementPreprocessor.ElementPreprocessorprovides a mechanism to examine and optionally mutate anXmlElementprior to it being processed by aElementProcessor. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanpreprocess(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.ElementPreprocessorto 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
XmlElementoutside the scope of the providedXmlElement. eg: Attempting to modify any of the parents of the providedXmlElementmay result in undefined and unexpected behavior. Only mutations of theXmlElementitself or children is permitted.- Specified by:
preprocessin interfaceDocumentPreprocessor- Parameters:
context- theProcessingContextin which theXmlElementis being pre-processedxmlElement- theXmlElementto pre-process- Returns:
trueif the specifiedXmlElementshould be reconsidered either by this or otherDocumentPreprocessors for re-preprocessing due to mutations on theXmlElement,falseotherwise.- Throws:
ConfigurationException- if during pre-processing of theXmlElementa configuration issue was discovered (or if pre-processing fails for some reason)
-