Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.config.xml
Interface DocumentPreprocessor

All Known Implementing Classes:
DocumentElementPreprocessor

public interface DocumentPreprocessor

A DocumentPreprocessor provides a mechanism to pre-process an XmlElement, representing part or all of an XmlDocument prior to the said XmlElement being processes using configured ElementProcessors.

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 a DocumentPreprocessor may be called for a particular document or element, simply because other DocumentPreprocessors 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
 boolean preprocess(ProcessingContext context, XmlElement xmlElement)
          Performs pre-processing of the an XmlElement, 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 an XmlElement, 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 XmlElement outside the scope of the provided XmlElement. eg: Attempting to modify any of the parents of the provided XmlElement may result in undefined and unexpected behavior. Only mutations of the XmlElement itself or children is permitted.

Parameters:
context - the ProcessingContext in which the XmlElement is being pre-processed
xmlElement - the XmlElement to pre-process
Returns:
true if the specified XmlElement should be reconsidered either by this or other DocumentPreprocessors for re-preprocessing due to mutations on the XmlElement, 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® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


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