Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.config.xml
Class DocumentElementPreprocessor

java.lang.Object
  extended by com.tangosol.config.xml.DocumentElementPreprocessor

All Implemented Interfaces:
DocumentPreprocessor

public class DocumentElementPreprocessor
extends java.lang.Object
implements DocumentPreprocessor

A DocumentElementPreprocessor is a DocumentPreprocessor that is designed to operate with one or more DocumentElementPreprocessor.ElementPreprocessors.

Since:
Coherence 12.1.2
Author:
bo 2012.03.12

Nested Class Summary
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.

 

Constructor Summary
DocumentElementPreprocessor()
          Constructs a DocumentElementPreprocessor.

 

Method Summary
 DocumentElementPreprocessor addElementPreprocessor(DocumentElementPreprocessor.ElementPreprocessor preprocessor)
          Adds an DocumentElementPreprocessor.ElementPreprocessor to the DocumentElementPreprocessor.
 boolean preprocess(ProcessingContext context, XmlElement xmlElement)
          Performs pre-processing of the an XmlElement, optionally mutating it (or it's children) as required.

 

Constructor Detail

DocumentElementPreprocessor

public DocumentElementPreprocessor()
Constructs a DocumentElementPreprocessor.

Method Detail

addElementPreprocessor

public DocumentElementPreprocessor addElementPreprocessor(DocumentElementPreprocessor.ElementPreprocessor preprocessor)
Adds an DocumentElementPreprocessor.ElementPreprocessor to the DocumentElementPreprocessor.
Parameters:
preprocessor - the DocumentElementPreprocessor.ElementPreprocessor to 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 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.

Specified by:
preprocess in interface DocumentPreprocessor
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® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


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