ch.elca.el4j.services.xmlmerge.config
Class ConfigurableXmlMerge

java.lang.Object
  extended by ch.elca.el4j.services.xmlmerge.config.ConfigurableXmlMerge
All Implemented Interfaces:
XmlMerge

public class ConfigurableXmlMerge
extends Object
implements XmlMerge

XmlMerge wrapper applying a configurer on the wrapped instance.

Author:
Laurent Bovet (LBO), Alex Mathey (AMA)
File-location:
ConfigurableXmlMerge
Last check-in date:
2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873

Constructor Summary
ConfigurableXmlMerge(Configurer configurer)
          Creates a default XmlMerge instance and configures it with the given configurer.
ConfigurableXmlMerge(XmlMerge wrappedXmlMerge, Configurer configurer)
          Applies a configurer on a wrapped XmlMerge instance.
 
Method Summary
 Document merge(Document[] sources)
          Merges the given Document sources.
 InputStream merge(InputStream[] sources)
          Merges the given InputStream sources.
 String merge(String[] sources)
          Merges the given String sources.
 void setRootMapper(Mapper rootMapper)
          Sets the Mapper which will be applied to the root element.
 void setRootMergeAction(MergeAction rootMergeAction)
          Sets the MergeAction which will be applied to the root element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurableXmlMerge

public ConfigurableXmlMerge(Configurer configurer)
                     throws ConfigurationException
Creates a default XmlMerge instance and configures it with the given configurer.

Parameters:
configurer - The configurer used to configure the XmlMerge instance
Throws:
ConfigurationException - If an error occurred during configuration

ConfigurableXmlMerge

public ConfigurableXmlMerge(XmlMerge wrappedXmlMerge,
                            Configurer configurer)
                     throws ConfigurationException
Applies a configurer on a wrapped XmlMerge instance.

Parameters:
wrappedXmlMerge - The wrapped XmlMerge instance to configure
configurer - The configurer to apply
Throws:
ConfigurationException - If an error occurred during configuration
Method Detail

merge

public InputStream merge(InputStream[] sources)
                  throws AbstractXmlMergeException
Merges the given InputStream sources.

Specified by:
merge in interface XmlMerge
Parameters:
sources - Array of InputStream sources to merge
Returns:
InputStream corresponding to the merged sources
Throws:
AbstractXmlMergeException - If an error occurred during the merge

merge

public Document merge(Document[] sources)
               throws AbstractXmlMergeException
Merges the given Document sources.

Specified by:
merge in interface XmlMerge
Parameters:
sources - Array of Document sources to merge
Returns:
Document corresponding to the merged sources
Throws:
AbstractXmlMergeException - If an error occurred during the merge

merge

public String merge(String[] sources)
             throws AbstractXmlMergeException
Merges the given String sources.

Specified by:
merge in interface XmlMerge
Parameters:
sources - Array of String sources to merge
Returns:
String corresponding to the merged sources
Throws:
AbstractXmlMergeException - If an error occurred during the merge

setRootMapper

public void setRootMapper(Mapper rootMapper)
Sets the Mapper which will be applied to the root element.

Specified by:
setRootMapper in interface XmlMerge
Parameters:
rootMapper - The Mapper which will be applied to the root element

setRootMergeAction

public void setRootMergeAction(MergeAction rootMergeAction)
Sets the MergeAction which will be applied to the root element.

Specified by:
setRootMergeAction in interface XmlMerge
Parameters:
rootMergeAction - The MergeAction which will be applied to the root element


Copyright © 2005-2011 ELCA. All Rights Reserved.