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
ConstructorsConstructorDescriptionOsgiPluginXmlDescriptorParser(InputStream source, Iterable<InputStream> supplementalSources, Set<com.atlassian.plugin.Application> applications) Creates a DescriptorParser that can read multiple XML filesOsgiPluginXmlDescriptorParser(InputStream source, Set<com.atlassian.plugin.Application> applications) -
Method Summary
Modifier and TypeMethodDescriptioncom.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 theOsgiPluginprotected 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 theOsgiPluginMethods inherited from class com.atlassian.plugin.internal.parsers.XmlDescriptorParser
configurePlugin, createDocument, createPluginInformation, getDocument, getKey, getPluginInformation, getPluginsVersion, isSystemPlugin, mergeDocuments
-
Constructor Details
-
OsgiPluginXmlDescriptorParser
public OsgiPluginXmlDescriptorParser(InputStream source, Set<com.atlassian.plugin.Application> applications) - Parameters:
source- The XML descriptor sourceapplications- 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 XMLInputStream.
-
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 streamsupplementalSources- streams that contain additional module descriptorsapplications- 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 XMLInputStream.- 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 theOsgiPlugin- Overrides:
createModuleDescriptorin classcom.atlassian.plugin.internal.parsers.XmlDescriptorParser- Parameters:
plugin- The pluginelement- The module elementmoduleDescriptorFactory- 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 theOsgiPlugin- Specified by:
addModulein interfacecom.atlassian.plugin.parsers.DescriptorParser- Overrides:
addModulein classcom.atlassian.plugin.internal.parsers.XmlDescriptorParser
-