com.atlassian.plugin.factories
Class XmlDynamicPluginFactory

java.lang.Object
  extended by com.atlassian.plugin.factories.AbstractPluginFactory
      extended by com.atlassian.plugin.factories.XmlDynamicPluginFactory
All Implemented Interfaces:
PluginFactory

public final class XmlDynamicPluginFactory
extends AbstractPluginFactory

Deploys plugins that consist of an XML descriptor file.

Since:
2.1.0

Field Summary
 
Fields inherited from class com.atlassian.plugin.factories.AbstractPluginFactory
applications, descriptorParserFactory, log
 
Constructor Summary
XmlDynamicPluginFactory(Application application)
           
XmlDynamicPluginFactory(java.util.Set<Application> applications)
           
 
Method Summary
 java.lang.String canCreate(PluginArtifact pluginArtifact)
          Determines if this deployer can handle this artifact by looking for the plugin descriptor
 Plugin create(PluginArtifact pluginArtifact, ModuleDescriptorFactory moduleDescriptorFactory)
          Deploys the plugin artifact
protected  java.io.InputStream getDescriptorInputStream(PluginArtifact pluginArtifact)
           
protected  com.google.common.base.Predicate<java.lang.Integer> isValidPluginsVersion()
           
 
Methods inherited from class com.atlassian.plugin.factories.AbstractPluginFactory
create, getPluginKeyFromDescriptor, hasDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDynamicPluginFactory

public XmlDynamicPluginFactory(Application application)
Parameters:
application - The application key to use to choose modules
Since:
3.0

XmlDynamicPluginFactory

public XmlDynamicPluginFactory(java.util.Set<Application> applications)
Parameters:
applications - The application key to use to choose modules
Since:
3.0
Method Detail

getDescriptorInputStream

protected java.io.InputStream getDescriptorInputStream(PluginArtifact pluginArtifact)
Specified by:
getDescriptorInputStream in class AbstractPluginFactory

isValidPluginsVersion

protected com.google.common.base.Predicate<java.lang.Integer> isValidPluginsVersion()
Specified by:
isValidPluginsVersion in class AbstractPluginFactory

canCreate

public java.lang.String canCreate(PluginArtifact pluginArtifact)
                           throws PluginParseException
Description copied from class: AbstractPluginFactory
Determines if this deployer can handle this artifact by looking for the plugin descriptor

Specified by:
canCreate in interface PluginFactory
Overrides:
canCreate in class AbstractPluginFactory
Parameters:
pluginArtifact - The artifact to test
Returns:
The plugin key, null if it cannot load the plugin
Throws:
PluginParseException - If there are exceptions parsing the plugin configuration when the deployer should have been able to deploy the plugin

create

public Plugin create(PluginArtifact pluginArtifact,
                     ModuleDescriptorFactory moduleDescriptorFactory)
              throws PluginParseException
Deploys the plugin artifact

Parameters:
pluginArtifact - the plugin artifact to deploy
moduleDescriptorFactory - The factory for plugin modules
Returns:
The instantiated and populated plugin
Throws:
PluginParseException - If the descriptor cannot be parsed
Since:
2.2.0


Copyright © 2013 Atlassian. All Rights Reserved.