Interface DocumentPreprocessor
-
- All Known Implementing Classes:
DocumentElementPreprocessor
public interface DocumentPreprocessorADocumentPreprocessorprovides a mechanism to pre-process anXmlElement, representing part or all of anXmlDocumentprior to the saidXmlElementbeing processes using configuredElementProcessors.Rule 1: Implementations of this interface must remain stateless with respect to the
XmlElements orProcessingContextthat they are passed. That is, no state should be retained relating to either of these concepts for each method call.Rule 2: No assumptions can be made as to the number of times a
DocumentPreprocessormay be called for a particular document or element, simply because otherDocumentPreprocessors may request "re-pre-processing".Violating either of these two rules may likely result in unpredictable application behavior.
- Since:
- Coherence 12.1.2
- Author:
- bo 2012.03.12
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanpreprocess(ProcessingContext context, XmlElement xmlElement)Performs pre-processing of the anXmlElement, optionally mutating it (or it's children) as required.
-
-
-
Method Detail
-
preprocess
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.- 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)
-
-