Class LibDeployerUtils


  • public class LibDeployerUtils
    extends Object
    • Field Detail

      • APP_UNZIP_DIR

        public static final String APP_UNZIP_DIR
    • Constructor Detail

      • LibDeployerUtils

        public LibDeployerUtils()
    • Method Detail

      • createSynapseLibrary

        public static Library createSynapseLibrary​(String libPath)
      • loadLibArtifacts

        public static void loadLibArtifacts​(SynapseImport synImport,
                                            Library library)
      • readAttribute

        public static String readAttribute​(org.apache.axiom.om.OMElement element,
                                           String attName)
        Reads an attribute in the given element and returns the value of that attribute
        Parameters:
        element - - Element to search
        attName - - attribute name
        Returns:
        if the attribute found, return value. else null.
      • readChildText

        public static String readChildText​(org.apache.axiom.om.OMElement element,
                                           String ln)
      • readChildText

        public static String readChildText​(org.apache.axiom.om.OMElement element,
                                           String ln,
                                           String ns)
        Reads a text node which is in a child element of the given element and returns the text value.
        Parameters:
        element - - Element to search
        ln - - Child element name
        ns - - Child element namespace
        Returns:
        if the child text element found, return text value. else null.
      • extractSynapseLib

        public static String extractSynapseLib​(File libFile)
                                        throws SynapseException
        Extract the Synapse Library at the provided path to the java temp dir. Return the extracted location
        Parameters:
        libFile - - Synapse Lib archive file
        Returns:
        - extracted location
        Throws:
        SynapseException - - error on extraction
      • createDir

        public static void createDir​(String path)
      • main

        public static void main​(String[] args)