Class OsgiPluginXmlDescriptorParser

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

public class OsgiPluginXmlDescriptorParser extends com.atlassian.plugin.internal.parsers.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

    Constructors
    Constructor
    Description
    OsgiPluginXmlDescriptorParser(InputStream source, Iterable<InputStream> supplementalSources, Set<com.atlassian.plugin.Application> applications)
    Creates a DescriptorParser that can read multiple XML files
    OsgiPluginXmlDescriptorParser(InputStream source, Set<com.atlassian.plugin.Application> applications)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.atlassian.plugin.ModuleDescriptor<?>
    addModule(com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element module)
    Passes module descriptor elements back to the OsgiPlugin
    protected com.atlassian.plugin.ModuleDescriptor<?>
    createModuleDescriptor(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory)
    Passes module descriptor elements back to the OsgiPlugin

    Methods inherited from class com.atlassian.plugin.internal.parsers.XmlDescriptorParser

    configurePlugin, createDocument, createPluginInformation, getDocument, getKey, getPluginInformation, getPluginsVersion, isSystemPlugin, mergeDocuments

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OsgiPluginXmlDescriptorParser

      public OsgiPluginXmlDescriptorParser(InputStream source, Set<com.atlassian.plugin.Application> applications)
      Parameters:
      source - The XML descriptor source
      applications - The application keys to limit modules to, null for only unspecified
      Throws:
      com.atlassian.plugin.PluginParseException - if there is a problem reading the descriptor from the XML InputStream.
    • OsgiPluginXmlDescriptorParser

      public OsgiPluginXmlDescriptorParser(InputStream source, Iterable<InputStream> supplementalSources, Set<com.atlassian.plugin.Application> applications)
      Creates a DescriptorParser that can read multiple XML files
      Parameters:
      source - The descriptor stream
      supplementalSources - streams that contain additional module descriptors
      applications - the application key to filter modules with, null for all unspecified
      Throws:
      com.atlassian.plugin.PluginParseException - if there is a problem reading the descriptor from the XML InputStream.
      Since:
      3.2.16
  • Method Details

    • createModuleDescriptor

      protected com.atlassian.plugin.ModuleDescriptor<?> createModuleDescriptor(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element, com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory)
      Passes module descriptor elements back to the OsgiPlugin
      Overrides:
      createModuleDescriptor in class com.atlassian.plugin.internal.parsers.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:
      com.atlassian.plugin.PluginParseException
    • addModule

      public com.atlassian.plugin.ModuleDescriptor<?> addModule(com.atlassian.plugin.ModuleDescriptorFactory moduleDescriptorFactory, com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element module)
      Passes module descriptor elements back to the OsgiPlugin
      Specified by:
      addModule in interface com.atlassian.plugin.parsers.DescriptorParser
      Overrides:
      addModule in class com.atlassian.plugin.internal.parsers.XmlDescriptorParser