Class LibDeployerUtils
- java.lang.Object
-
- org.apache.synapse.libraries.util.LibDeployerUtils
-
public class LibDeployerUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
APP_UNZIP_DIR
-
Constructor Summary
Constructors Constructor Description LibDeployerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
createDir(String path)
static Library
createSynapseLibrary(String libPath)
static void
deployingLocalEntries(Library library, SynapseConfiguration config)
static String
extractSynapseLib(File libFile)
Extract the Synapse Library at the provided path to the java temp dir.static <T> T
getLibArtifact(Map<String,Library> librarySet, String key, Class<T> type)
static String
getQualifiedName(SynapseImport synImport)
static void
loadLibArtifacts(SynapseImport synImport, Library library)
static void
main(String[] args)
static String
readAttribute(org.apache.axiom.om.OMElement element, String attName)
Reads an attribute in the given element and returns the value of that attributestatic String
readChildText(org.apache.axiom.om.OMElement element, String ln)
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.
-
-
-
Field Detail
-
APP_UNZIP_DIR
public static final String APP_UNZIP_DIR
-
-
Method Detail
-
loadLibArtifacts
public static void loadLibArtifacts(SynapseImport synImport, Library library)
-
getLibArtifact
public static <T> T getLibArtifact(Map<String,Library> librarySet, String key, Class<T> type)
-
getQualifiedName
public static String getQualifiedName(SynapseImport synImport)
-
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 searchattName
- - attribute name- Returns:
- if the attribute found, return value. else null.
-
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 searchln
- - Child element namens
- - 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)
-
deployingLocalEntries
public static void deployingLocalEntries(Library library, SynapseConfiguration config)
-
main
public static void main(String[] args)
-
-