Class ConfigBase

  • Direct Known Subclasses:
    DBConfig, FieldConfig

    public abstract class ConfigBase
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger LOG  
    • Constructor Summary

      Constructors 
      Constructor Description
      ConfigBase()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected byte[] extractConfigData​(byte[] confData, java.lang.String xpath)
      Retrieves XML elements (determined by the used path) from the configuration.
      static java.lang.String getActiveConfig​(byte[] data, java.lang.String activePath)
      Used to determine which of the elements in the configuration file is set as active.
      protected java.lang.String stringFromXpath​(com.ximpleware.AutoPilot ap, java.lang.String xpath)
      Used to get an element by its relative xpath.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
    • Constructor Detail

      • ConfigBase

        public ConfigBase()
    • Method Detail

      • extractConfigData

        protected byte[] extractConfigData​(byte[] confData,
                                           java.lang.String xpath)
                                    throws java.io.IOException,
                                           com.ximpleware.VTDException
        Retrieves XML elements (determined by the used path) from the configuration.
        Parameters:
        confData - - prepared XML
        xpath - - path to the retrieved configuration element
        Returns:
        - the retrieved element
        Throws:
        java.io.IOException
        com.ximpleware.VTDException
      • getActiveConfig

        public static java.lang.String getActiveConfig​(byte[] data,
                                                       java.lang.String activePath)
                                                throws java.io.IOException,
                                                       com.ximpleware.VTDException
        Used to determine which of the elements in the configuration file is set as active.
        Parameters:
        data - - the configuration file
        activePath - - xpath to the element which defines the active configuration
        Returns:
        - the name of the active configuration
        Throws:
        java.io.IOException
        com.ximpleware.VTDException
      • stringFromXpath

        protected java.lang.String stringFromXpath​(com.ximpleware.AutoPilot ap,
                                                   java.lang.String xpath)
                                            throws com.ximpleware.XPathParseException
        Used to get an element by its relative xpath.
        Parameters:
        ap - - a vtd autopilot
        xpath - - xpath to the element which shall be returned
        Returns:
        - String representation of the element
        Throws:
        com.ximpleware.XPathParseException