com.atlassian.plugin.parsers
Interface DescriptorParser

All Known Implementing Classes:
OsgiPluginXmlDescriptorParser, XmlDescriptorParser

public interface DescriptorParser

Interface for parsing a plugin descriptor file, e.g. atlassian-plugin.xml.

See Also:
XmlDescriptorParser, DescriptorParserFactory

Method Summary
 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).
 String getKey()
           
 PluginInformation getPluginInformation()
           
 int getPluginsVersion()
           
 boolean isSystemPlugin()
          Deprecated. The parser will set the SystemPlugin flag within the configurePlugin() method, so there is no need to use this externally. See PLUG-415. Deprecated since 2.3.0
 

Method Detail

configurePlugin

Plugin configurePlugin(ModuleDescriptorFactory moduleDescriptorFactory,
                       Plugin plugin)
                       throws PluginParseException
Sets the configuration on the plugin argument to match the configuration specified in the plugin descriptor (typically an XML file).

Parameters:
moduleDescriptorFactory - a factory for instantiating the required plugin modules
plugin - the plugin whose configuration will be modified
Returns:
the original plugin with the configuration changed and the module descriptors added
Throws:
PluginParseException - if there was an error getting information about the plugin

getKey

String getKey()
Returns:
the key of the plugin specified in the descriptor

isSystemPlugin

boolean isSystemPlugin()
Deprecated. The parser will set the SystemPlugin flag within the configurePlugin() method, so there is no need to use this externally. See PLUG-415. Deprecated since 2.3.0

Returns:
true if this plugin is marked as a system plugin in the descriptor. This should only be acted on by plugin loaders which can trust their plugins implicitly (e.g. a classpath plugin loader).

getPluginsVersion

int getPluginsVersion()
Returns:
The version of the plugin system expected by this plugin. If unknown, it is assumed to be 1.

getPluginInformation

PluginInformation getPluginInformation()


Copyright © 2010 Atlassian. All Rights Reserved.