|
||||||||||
| 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 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(File descriptorFile)
Build a jbi descriptor from a file archive. |
static Descriptor |
buildDescriptor(InputStream stream)
Build a jbi descriptor from the specified stream |
static Descriptor |
buildDescriptor(URL url)
Build a jbi descriptor from the specified URL |
static void |
checkDescriptor(Descriptor descriptor)
Check validity of the JBI descriptor. |
static void |
copyInputStream(InputStream in,
OutputStream out)
Copy in stream to an out stream |
static QName |
createQName(Element element,
String qualifiedName)
Creates a QName instance from the given namespace context for the given qualifiedName |
static String |
getDescriptorAsText(File descriptorFile)
Retrieves the jbi descriptor as a string |
static String |
getDescriptorAsText(URL descriptorURL)
Retrieves the jbi descriptor as a string |
static String |
getElementText(Element element)
Returns the text of the element |
static Element |
getFirstChildElement(Node parent)
Get the first child element |
static Element |
getNextSiblingElement(Element el)
Get the next sibling element |
static String |
recursiveGetAttributeValue(Element element,
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 String DESCRIPTOR_FILE
| Constructor Detail |
|---|
public DescriptorFactory()
| Method Detail |
|---|
public static Descriptor buildDescriptor(File descriptorFile)
descriptorFile - path to the jbi descriptor, or to the root directory
public static Descriptor buildDescriptor(URL url)
url - url to the jbi descriptor
public static Descriptor buildDescriptor(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
Exception - if the descriptor is not validpublic static String getDescriptorAsText(File descriptorFile)
descriptorFile - path to the jbi descriptor, or to the root directory
public static String getDescriptorAsText(URL descriptorURL)
descriptorURL - URL pointing to the JBI descriptor
public static void copyInputStream(InputStream in,
OutputStream out)
throws IOException
in - out -
IOException
public static QName createQName(Element element,
String qualifiedName)
element - the element to use as the namespace contextqualifiedName - the fully qualified name
public static String recursiveGetAttributeValue(Element element,
String attributeName)
public static String getElementText(Element element)
public static Element getFirstChildElement(Node parent)
parent -
public static Element getNextSiblingElement(Element el)
el -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||