Class OsgiPluginXmlDescriptorParser
java.lang.Object
com.atlassian.plugin.internal.parsers.XmlDescriptorParser
com.atlassian.plugin.osgi.factory.OsgiPluginXmlDescriptorParser
- All Implemented Interfaces:
DescriptorParser
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<Application> applications) Creates a DescriptorParser that can read multiple XML filesOsgiPluginXmlDescriptorParser(InputStream source, Set<Application> applications) -
Method Summary
Modifier and TypeMethodDescriptionaddModule(ModuleDescriptorFactory moduleDescriptorFactory, Plugin plugin, Element module) Passes module descriptor elements back to theOsgiPluginprotected ModuleDescriptor<?>createModuleDescriptor(Plugin plugin, Element element, 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, parseChildModulesFromSource
-
Constructor Details
-
OsgiPluginXmlDescriptorParser
- Parameters:
source- The XML descriptor sourceapplications- The application keys to limit modules to, null for only unspecified- Throws:
PluginParseException- if there is a problem reading the descriptor from the XMLInputStream.
-
OsgiPluginXmlDescriptorParser
public OsgiPluginXmlDescriptorParser(InputStream source, Iterable<InputStream> supplementalSources, Set<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:
PluginParseException- if there is a problem reading the descriptor from the XMLInputStream.- Since:
- 3.2.16
-
-
Method Details
-
createModuleDescriptor
protected ModuleDescriptor<?> createModuleDescriptor(Plugin plugin, Element element, ModuleDescriptorFactory moduleDescriptorFactory) Passes module descriptor elements back to theOsgiPlugin- Overrides:
createModuleDescriptorin classXmlDescriptorParser- Parameters:
plugin- The pluginelement- The module elementmoduleDescriptorFactory- The module descriptor factory- Returns:
- The module, or null if the module cannot be found
- Throws:
PluginParseException
-
addModule
public ModuleDescriptor<?> addModule(ModuleDescriptorFactory moduleDescriptorFactory, Plugin plugin, Element module) Passes module descriptor elements back to theOsgiPlugin- Specified by:
addModulein interfaceDescriptorParser- Overrides:
addModulein classXmlDescriptorParser
-