|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.parsers.XmlDescriptorParser
public class XmlDescriptorParser
Provides access to the descriptor information retrieved from an XML InputStream.
Uses the dom4jSAXReader to parse the XML stream into a document
when the parser is constructed.
XmlDescriptorParserFactory| Constructor Summary | |
|---|---|
XmlDescriptorParser(org.dom4j.Document source,
java.lang.String... applicationKeys)
Constructs a parser with an already-constructed document |
|
XmlDescriptorParser(java.io.InputStream source,
java.lang.String... applicationKeys)
Constructs a parser with a stream of an XML document for a specific application |
|
| Method Summary | |
|---|---|
Plugin |
configurePlugin(ModuleDescriptorFactory moduleDescriptorFactory,
Plugin plugin)
Sets the configuration on the plugin argument to match the configuration specified in the plugin descriptor (typically an XML file). |
protected org.dom4j.Document |
createDocument(java.io.InputStream source)
|
protected ModuleDescriptor<?> |
createModuleDescriptor(Plugin plugin,
org.dom4j.Element element,
ModuleDescriptorFactory moduleDescriptorFactory)
|
protected PluginInformation |
createPluginInformation(org.dom4j.Element element)
|
protected org.dom4j.Document |
getDocument()
|
java.lang.String |
getKey()
|
PluginInformation |
getPluginInformation()
|
int |
getPluginsVersion()
|
boolean |
isSystemPlugin()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlDescriptorParser(org.dom4j.Document source,
java.lang.String... applicationKeys)
throws PluginParseException
source - the source documentapplicationKeys - the application key to filter modules with, null for all unspecified
PluginParseException - if there is a problem reading the descriptor from the XML InputStream.
public XmlDescriptorParser(java.io.InputStream source,
java.lang.String... applicationKeys)
throws PluginParseException
source - The descriptor streamapplicationKeys - the application key to filter modules with, null for all unspecified
PluginParseException - if there is a problem reading the descriptor from the XML InputStream.| Method Detail |
|---|
protected org.dom4j.Document createDocument(java.io.InputStream source)
throws PluginParseException
PluginParseExceptionprotected org.dom4j.Document getDocument()
public Plugin configurePlugin(ModuleDescriptorFactory moduleDescriptorFactory,
Plugin plugin)
throws PluginParseException
DescriptorParser
configurePlugin in interface DescriptorParsermoduleDescriptorFactory - a factory for instantiating the required plugin modulesplugin - the plugin whose configuration will be modified
PluginParseException - if there was an error getting information about the plugin
protected ModuleDescriptor<?> createModuleDescriptor(Plugin plugin,
org.dom4j.Element element,
ModuleDescriptorFactory moduleDescriptorFactory)
throws PluginParseException
PluginParseExceptionprotected PluginInformation createPluginInformation(org.dom4j.Element element)
public java.lang.String getKey()
getKey in interface DescriptorParserpublic int getPluginsVersion()
getPluginsVersion in interface DescriptorParserpublic PluginInformation getPluginInformation()
getPluginInformation in interface DescriptorParserpublic boolean isSystemPlugin()
isSystemPlugin in interface DescriptorParser
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||