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
ADocumentElementPreprocessoris aDocumentPreprocessorthat is designed to operate with one or moreDocumentElementPreprocessor.ElementPreprocessors.- Since:
- Coherence 12.1.2
- Author:
- bo 2012.03.12
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDocumentElementPreprocessor.ElementPreprocessorAnDocumentElementPreprocessor.ElementPreprocessorprovides a mechanism to examine and optionally mutate anXmlElementprior 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 DocumentElementPreprocessoraddElementPreprocessor(DocumentElementPreprocessor.ElementPreprocessor preprocessor)booleanpreprocess(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.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)
-
-