Class Merger

java.lang.Object
org.jboss.jca.common.metadata.merge.Merger

public class Merger extends Object
A Merger.
Author:
Stefano Maestri
  • Field Details

  • Constructor Details

    • Merger

      public Merger()
  • Method Details

    • mergeConfigProperties

      public List<ConfigProperty> mergeConfigProperties(Map<String,String> ijProperties, List<ConfigProperty> original)
      Merge ironJacamar's properties with connector's one returning a List of COnnector's properties
      Parameters:
      ijProperties - ironjacamar's extension style properties
      original - standard connector's properties
      Returns:
      merged standard connector's properties (ironjacamar's setting overwrite the standard's one. No new property is added)
    • mergeConnectorWithCommonIronJacamar

      public Connector mergeConnectorWithCommonIronJacamar(Activation ij, Connector conn)
      Merge a Connector and a Activation passing also Matcher to identify AdminObject and ConnectionDefinition to merge inside the passed objects
      Parameters:
      ij - the Activation object
      conn - Connector object
      Returns:
      The merged Connector
    • mergeConnectorAndDs

      public Connector mergeConnectorAndDs(CommonDataSource cds, Connector connector) throws IllegalArgumentException, Exception
      Merge a connector with a DataSource metadata
      Parameters:
      cds - the datasource it is one of interface extending CommonDataSource. IOW it can be both DataSource or XaDataSource
      connector - the connector to merge
      Returns:
      the connector with mapped properties taken forn ds
      Throws:
      IllegalArgumentException - if version is't 1.0, 1.5 or 1.6
      Exception - in case of error
    • encodeConfigProperty

      public static String encodeConfigProperty(String propertyValue)
      Encodes a config property. Replaces all occurences of ';' with ENCODED_SEMICOLON.
      Parameters:
      propertyValue - a property value
      Returns:
      the encoded property value
    • decodeConfigProperty

      public static String decodeConfigProperty(String encodedValue)
      Decodes a config property. Replaces all occurences of ENCODED_SEMICOLON with ';'.
      Parameters:
      encodedValue - an encoded property value
      Returns:
      the original property value