Interface DocumentElementPreprocessor.ElementPreprocessor
-
- All Known Implementing Classes:
CacheDefaultsPreprocessor,DefaultsCreationPreprocessor,ExtendPreprocessor,OperationalDefaultsPreprocessor,PofSerializerPreprocessor,SchemeRefPreprocessor,SystemPropertyPreprocessor,TCPAcceptorPreprocessor,TransactionalPreprocessor,ViewSchemePreprocessor
- Enclosing class:
- DocumentElementPreprocessor
public static interface DocumentElementPreprocessor.ElementPreprocessorAnDocumentElementPreprocessor.ElementPreprocessorprovides a mechanism to examine and optionally mutate anXmlElementprior to it being processed by aElementProcessor.DocumentElementPreprocessor.ElementPreprocessors are designed to be used when a number of similarXmlElements in a document need to be pre-processed, ie: on an element-by-element basis, instead of an entire document being processed.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 an
DocumentElementPreprocessor.ElementPreprocessormay be called for a particular document or element, simply because otherDocumentElementPreprocessor.ElementPreprocessors may request "re-pre-processing".Violating either of these two rules may likely result in unpredictable application behavior.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanpreprocess(ProcessingContext context, XmlElement element)Process anXmlElement, optionally mutating it (or it's children) if required.
-
-
-
Method Detail
-
preprocess
boolean preprocess(ProcessingContext context, XmlElement element) throws ConfigurationException
Process anXmlElement, optionally mutating it (or it's children) if required.Note: An implementation of this interface should avoid attempting to traverse child
XmlElements. If you wish to manually traverse or change the entire document, you should instead use aDocumentPreprocessor.- Parameters:
context- theProcessingContextin which the pre-processing is occurringelement- theXmlElementto preprocess- Returns:
trueif the specifiedXmlElementshould be re-preprocessed by this and otherDocumentElementPreprocessor.ElementPreprocessors due to theXmlElementbeing modified,falseotherwise.- Throws:
ConfigurationException- if during pre-processing of theXmlElementa configuration issue was discovered (or if pre-processing fails for some reason)
-
-