com.atlassian.plugin.osgi.factory
Class OsgiPluginXmlDescriptorParser

java.lang.Object
  extended by com.atlassian.plugin.parsers.XmlDescriptorParser
      extended by com.atlassian.plugin.osgi.factory.OsgiPluginXmlDescriptorParser
All Implemented Interfaces:
DescriptorParser

public class OsgiPluginXmlDescriptorParser
extends XmlDescriptorParser

Descriptor parser that handles special tasks for osgi plugins such as recording the originating module descriptor elements. Must only be used with OsgiPlugin instances.

Since:
2.1.2

Constructor Summary
OsgiPluginXmlDescriptorParser(InputStream source, String... applicationKeys)
           
 
Method Summary
protected  ModuleDescriptor<?> createModuleDescriptor(Plugin plugin, org.dom4j.Element element, ModuleDescriptorFactory moduleDescriptorFactory)
          Passes module descriptor elements back to the OsgiPlugin
 
Methods inherited from class com.atlassian.plugin.parsers.XmlDescriptorParser
configurePlugin, createDocument, createPluginInformation, getDocument, getKey, getPluginInformation, getPluginsVersion, isSystemPlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiPluginXmlDescriptorParser

public OsgiPluginXmlDescriptorParser(InputStream source,
                                     String... applicationKeys)
                              throws PluginParseException
Parameters:
source - The XML descriptor source
applicationKeys - The application keys to limit modules to, null for only unspecified
Throws:
PluginParseException - if there is a problem reading the descriptor from the XML InputStream.
Method Detail

createModuleDescriptor

protected ModuleDescriptor<?> createModuleDescriptor(Plugin plugin,
                                                     org.dom4j.Element element,
                                                     ModuleDescriptorFactory moduleDescriptorFactory)
                                              throws PluginParseException
Passes module descriptor elements back to the OsgiPlugin

Overrides:
createModuleDescriptor in class XmlDescriptorParser
Parameters:
plugin - The plugin
element - The module element
moduleDescriptorFactory - The module descriptor factory
Returns:
The module, or null if the module cannot be found
Throws:
PluginParseException


Copyright © 2012 Atlassian. All Rights Reserved.