Class AbstractXPathConfigurer

java.lang.Object
ch.galinet.xml.xmlmerge.config.AbstractXPathConfigurer
All Implemented Interfaces:
Configurer
Direct Known Subclasses:
PropertyXPathConfigurer

public abstract class AbstractXPathConfigurer extends Object implements Configurer
Superclass for configurers using XPathOperationFactory.
Author:
Laurent Bovet (LBO), Alex Mathey (AMA)
  • Constructor Details

    • AbstractXPathConfigurer

      public AbstractXPathConfigurer()
  • Method Details

    • setDefaultMatcher

      protected final void setDefaultMatcher(String matcherName) throws ConfigurationException
      Sets the configurer's default matcher.
      Parameters:
      matcherName - The name of the default matcher
      Throws:
      ConfigurationException - If an error occurred during configuration
    • setDefaultMapper

      protected final void setDefaultMapper(String mapperName) throws ConfigurationException
      Sets the configurer's default mapper.
      Parameters:
      mapperName - The name of the default mapper
      Throws:
      ConfigurationException - If an error occurred during configuration
    • setDefaultAction

      protected final void setDefaultAction(String actionName) throws ConfigurationException
      Sets the configurer's default action.
      Parameters:
      actionName - The name of the default action
      Throws:
      ConfigurationException - If an error occurred during configuration
    • setRootMergeAction

      protected final void setRootMergeAction(String actionName) throws ConfigurationException
      Sets the configurer's root merge action.
      Parameters:
      actionName - The name of the root merge action
      Throws:
      ConfigurationException - If an error occurred during configuration
    • addMatcher

      protected final void addMatcher(String xPath, String matcherName) throws ConfigurationException
      Adds a matcher for a given XPath expression.
      Parameters:
      xPath - An XPath expression
      matcherName - The name of the matcher to add
      Throws:
      ConfigurationException - If an error occurred during configuration
    • addAction

      protected final void addAction(String xPath, String actionName) throws ConfigurationException
      Adds an action for a given XPath expression.
      Parameters:
      xPath - An XPath expression
      actionName - The name of the action to add
      Throws:
      ConfigurationException - If an error occurred during configuration
    • addMapper

      protected final void addMapper(String xPath, String mapperName) throws ConfigurationException
      Adds an mapper for a given XPath expression.
      Parameters:
      xPath - An XPath expression
      mapperName - The name of the mapper to add
      Throws:
      ConfigurationException - If an error occurred during configuration
    • configure

      public final void configure(XmlMerge xmlMerge) throws ConfigurationException
      Configures the specified XmlMerge instance.
      Specified by:
      configure in interface Configurer
      Parameters:
      xmlMerge - An XmlMerge instance
      Throws:
      ConfigurationException
    • readConfiguration

      protected abstract void readConfiguration() throws ConfigurationException
      Reads the configuration used to configure an XmlMerge.
      Throws:
      ConfigurationException - If an error occurred during the read
    • setActionResolver

      public void setActionResolver(OperationResolver actionResolver)
      Sets the configurer's action resolver.
      Parameters:
      actionResolver - The action resolver to set
    • setMapperResolver

      public void setMapperResolver(OperationResolver mapperResolver)
      Sets the configurer's mapper resolver.
      Parameters:
      mapperResolver - The mapper resolver to set
    • setMatcherResolver

      public void setMatcherResolver(OperationResolver matcherResolver)
      Sets the configurer's matcher resolver.
      Parameters:
      matcherResolver - the matcher resolver to set