|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.jbi.deployer.descriptor.DescriptorFactory
public class DescriptorFactory
Factory to read a JBI descriptor from a file, url or stream.
| Field Summary | |
|---|---|
static java.lang.String |
DESCRIPTOR_FILE
The location of the JBI descriptor in a JBI artifact. |
| Constructor Summary | |
|---|---|
DescriptorFactory()
|
|
| Method Summary | |
|---|---|
static Descriptor |
buildDescriptor(byte[] bytes)
Build a jbi descriptor from the specified binary data. |
static Descriptor |
buildDescriptor(java.io.File descriptorFile)
Build a jbi descriptor from a file archive. |
static Descriptor |
buildDescriptor(java.io.InputStream stream)
Build a jbi descriptor from the specified stream |
static Descriptor |
buildDescriptor(java.net.URL url)
Build a jbi descriptor from the specified URL |
static void |
checkDescriptor(Descriptor descriptor)
Check validity of the JBI descriptor. |
static void |
copyInputStream(java.io.InputStream in,
java.io.OutputStream out)
Copy in stream to an out stream |
static javax.xml.namespace.QName |
createQName(org.w3c.dom.Element element,
java.lang.String qualifiedName)
Creates a QName instance from the given namespace context for the given qualifiedName |
static java.lang.String |
getDescriptorAsText(java.io.File descriptorFile)
Retrieves the jbi descriptor as a string |
static java.lang.String |
getDescriptorAsText(java.net.URL descriptorURL)
Retrieves the jbi descriptor as a string |
static java.lang.String |
getElementText(org.w3c.dom.Element element)
Returns the text of the element |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node parent)
Get the first child element |
static org.w3c.dom.Element |
getNextSiblingElement(org.w3c.dom.Element el)
Get the next sibling element |
static java.lang.String |
recursiveGetAttributeValue(org.w3c.dom.Element element,
java.lang.String attributeName)
Recursive method to find a given attribute value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DESCRIPTOR_FILE
| Constructor Detail |
|---|
public DescriptorFactory()
| Method Detail |
|---|
public static Descriptor buildDescriptor(java.io.File descriptorFile)
descriptorFile - path to the jbi descriptor, or to the root directory
public static Descriptor buildDescriptor(java.net.URL url)
url - url to the jbi descriptor
public static Descriptor buildDescriptor(java.io.InputStream stream)
stream - input stream to the jbi descriptor
public static Descriptor buildDescriptor(byte[] bytes)
bytes - hold the content of the JBI descriptor xml document
public static void checkDescriptor(Descriptor descriptor)
descriptor - the descriptor to check
java.lang.Exception - if the descriptor is not validpublic static java.lang.String getDescriptorAsText(java.io.File descriptorFile)
descriptorFile - path to the jbi descriptor, or to the root directory
public static java.lang.String getDescriptorAsText(java.net.URL descriptorURL)
descriptorURL - URL pointing to the JBI descriptor
public static void copyInputStream(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
in - out -
java.io.IOException
public static javax.xml.namespace.QName createQName(org.w3c.dom.Element element,
java.lang.String qualifiedName)
element - the element to use as the namespace contextqualifiedName - the fully qualified name
public static java.lang.String recursiveGetAttributeValue(org.w3c.dom.Element element,
java.lang.String attributeName)
public static java.lang.String getElementText(org.w3c.dom.Element element)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node parent)
parent -
public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Element el)
el -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||