toolbox.allegato
Class PropertyPreProcessor

Package class diagram package PropertyPreProcessor
java.lang.Object
  extended by toolbox.allegato.PropertyPreProcessor
All Implemented Interfaces:
XMLPreProcessor

public class PropertyPreProcessor
extends java.lang.Object
implements XMLPreProcessor

XMLPreProcessor implementation that performs variable substitution based on a java properties file. The properties file must be specified with the following system property: toolbox.allegato.PropertyPreProcessor.config

The FreeMarker template engine is utilised internally to perform the substitution.


Constructor Summary
PropertyPreProcessor()
          Construct a new pre-processor.
 
Method Summary
 java.io.InputStream process(java.io.InputStream is)
          Perform required processing on the given InputStream and return an InputStream suitable for parsing by an XMLProperties instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyPreProcessor

public PropertyPreProcessor()
Construct a new pre-processor.

Method Detail

process

public java.io.InputStream process(java.io.InputStream is)
                            throws ConfException
Perform required processing on the given InputStream and return an InputStream suitable for parsing by an XMLProperties instance.

Specified by:
process in interface XMLPreProcessor
Parameters:
is - InputStream containing the data to process.
Returns:
InputStream containing modified data.
Throws:
ConfException - if the stream cannot be processed.