Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.config.xml
Interface DocumentElementPreprocessor.ElementPreprocessor

All Known Implementing Classes:
CacheDefaultsPreprocessor, DefaultsCreationPreprocessor, OperationalDefaultsPreprocessor, PofSerializerPreprocessor, SchemeRefPreprocessor, SystemPropertyPreprocessor, TransactionalPreprocessor
Enclosing class:
DocumentElementPreprocessor

public static interface DocumentElementPreprocessor.ElementPreprocessor

An DocumentElementPreprocessor.ElementPreprocessor provides a mechanism to examine and optionally mutate an XmlElement prior to it being processed by a ElementProcessor. DocumentElementPreprocessor.ElementPreprocessors are designed to be used when a number of similar XmlElements 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 or ProcessingContext that 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.ElementPreprocessor may be called for a particular document or element, simply because other DocumentElementPreprocessor.ElementPreprocessors may request "re-pre-processing".

Violating either of these two rules may likely result in unpredictable application behavior.


Method Summary
 boolean preprocess(ProcessingContext context, XmlElement element)
          Process an XmlElement, optionally mutating it (or it's children) if required.

 

Method Detail

preprocess

boolean preprocess(ProcessingContext context,
                   XmlElement element)
                   throws ConfigurationException
Process an XmlElement, 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 a DocumentPreprocessor.

Parameters:
context - the ProcessingContext in which the pre-processing is occuring
element - the XmlElement to preprocess
Returns:
true if the specified XmlElement should be re-preprocessed by this and other DocumentElementPreprocessor.ElementPreprocessors due to the XmlElement being modified, false otherwise.
Throws:
ConfigurationException - if during pre-processing of the XmlElement a configuration issue was discovered (or if pre-processing fails for some reason)

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.