public interface PluginFactory
| Modifier and Type | Method and Description |
|---|---|
String |
canCreate(PluginArtifact pluginArtifact)
Determines if this factory can handle this artifact.
|
Plugin |
create(PluginArtifact pluginArtifact,
ModuleDescriptorFactory moduleDescriptorFactory)
Deploys the plugin artifact by instantiating the plugin and configuring it.
|
ModuleDescriptor<?> |
createModule(Plugin plugin,
org.dom4j.Element module,
ModuleDescriptorFactory moduleDescriptorFactory)
If this factory is capable of loading a plugin of the type passed, attempt to create a module descriptor.
|
String canCreate(PluginArtifact pluginArtifact) throws PluginParseException
pluginArtifact - The artifact to testPluginParseException - If there are exceptions parsing the plugin configuration when
the deployer should have been able to deploy the pluginPlugin create(PluginArtifact pluginArtifact, ModuleDescriptorFactory moduleDescriptorFactory) throws PluginParseException
canCreate(PluginArtifact) call returned the plugin keypluginArtifact - the plugin artifact to deploymoduleDescriptorFactory - the factory for the module descriptorsPluginParseException - if the plugin could not be parsedModuleDescriptor<?> createModule(Plugin plugin, org.dom4j.Element module, ModuleDescriptorFactory moduleDescriptorFactory)
If capable, always return a ModuleDescriptor, even if it indicates a failure case. Caller is responsible for
handling exceptional ModuleDescriptor.
Implementors should use (plugin instanceof <plugin-class>) to determine their capability;
subclasses of implementors should override this if special handling is required.
plugin - that the module will be a member ofmodule - to createmoduleDescriptorFactory - basic factory, may be overriddenCopyright © 2019 Atlassian. All rights reserved.