public class XmlDescriptorParser extends Object implements DescriptorParser
SAXReader to parse the XML stream into a document
when the parser is constructed.XmlDescriptorParserFactory| Constructor and Description |
|---|
XmlDescriptorParser(org.dom4j.Document source,
Set<Application> applications)
Constructs a parser with an already-constructed document
|
XmlDescriptorParser(InputStream source,
Set<Application> applications)
Constructs a parser with a stream of an XML document for a specific application
|
| Modifier and Type | Method and Description |
|---|---|
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 static org.dom4j.Document |
createDocument(InputStream source) |
protected ModuleDescriptor<?> |
createModuleDescriptor(Plugin plugin,
org.dom4j.Element element,
ModuleDescriptorFactory moduleDescriptorFactory) |
protected PluginInformation |
createPluginInformation() |
protected org.dom4j.Document |
getDocument() |
String |
getKey() |
PluginInformation |
getPluginInformation() |
int |
getPluginsVersion() |
boolean |
isSystemPlugin() |
public XmlDescriptorParser(org.dom4j.Document source,
Set<Application> applications)
throws PluginParseException
source - the source documentapplications - the application key to filter modules with, null for all unspecifiedPluginParseException - if there is a problem reading the descriptor from the XML InputStream.public XmlDescriptorParser(InputStream source, Set<Application> applications) throws PluginParseException
source - The descriptor streamapplications - the application key to filter modules with, null for all unspecifiedPluginParseException - if there is a problem reading the descriptor from the XML InputStream.protected static org.dom4j.Document createDocument(InputStream source) throws PluginParseException
PluginParseExceptionprotected org.dom4j.Document getDocument()
public Plugin configurePlugin(ModuleDescriptorFactory moduleDescriptorFactory, Plugin plugin) throws PluginParseException
DescriptorParserconfigurePlugin in interface DescriptorParsermoduleDescriptorFactory - a factory for instantiating the required plugin modulesplugin - the plugin whose configuration will be modifiedPluginParseException - if there was an error getting information about the pluginprotected ModuleDescriptor<?> createModuleDescriptor(Plugin plugin, org.dom4j.Element element, ModuleDescriptorFactory moduleDescriptorFactory) throws PluginParseException
PluginParseExceptionprotected PluginInformation createPluginInformation()
public String getKey()
getKey in interface DescriptorParserpublic int getPluginsVersion()
getPluginsVersion in interface DescriptorParserpublic PluginInformation getPluginInformation()
getPluginInformation in interface DescriptorParserpublic boolean isSystemPlugin()
isSystemPlugin in interface DescriptorParserCopyright © 2014 Atlassian. All rights reserved.