public final class OsgiPluginFactory extends AbstractPluginFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
OsgiPluginFactory.DefaultPluginTransformerFactory |
static interface |
OsgiPluginFactory.PluginTransformerFactory |
descriptorParserFactory| Constructor and Description |
|---|
OsgiPluginFactory(String pluginDescriptorFileName,
Set<Application> applications,
OsgiPersistentCache persistentCache,
OsgiContainerManager osgi,
PluginEventManager pluginEventManager)
Default constructor
|
OsgiPluginFactory(String pluginDescriptorFileName,
Set<Application> applications,
OsgiPersistentCache persistentCache,
OsgiContainerManager osgi,
PluginEventManager pluginEventManager,
OsgiPluginFactory.PluginTransformerFactory pluginTransformerFactory)
Constructor for implementations that want to override the DefaultPluginTransformer with a custom implementation
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
protected InputStream |
getDescriptorInputStream(PluginArtifact pluginArtifact) |
protected Predicate<Integer> |
isValidPluginsVersion() |
getPluginKeyFromDescriptor, hasDescriptorpublic OsgiPluginFactory(String pluginDescriptorFileName, Set<Application> applications, OsgiPersistentCache persistentCache, OsgiContainerManager osgi, PluginEventManager pluginEventManager)
public OsgiPluginFactory(String pluginDescriptorFileName, Set<Application> applications, OsgiPersistentCache persistentCache, OsgiContainerManager osgi, PluginEventManager pluginEventManager, OsgiPluginFactory.PluginTransformerFactory pluginTransformerFactory)
public String canCreate(PluginArtifact pluginArtifact) throws PluginParseException
AbstractPluginFactorycanCreate in interface PluginFactorycanCreate in class AbstractPluginFactorypluginArtifact - The artifact to testPluginParseException - If there are exceptions parsing the plugin configuration when
the deployer should have been able to deploy the pluginprotected InputStream getDescriptorInputStream(PluginArtifact pluginArtifact)
getDescriptorInputStream in class AbstractPluginFactoryprotected Predicate<Integer> isValidPluginsVersion()
isValidPluginsVersion in class AbstractPluginFactorypublic Plugin create(PluginArtifact pluginArtifact, ModuleDescriptorFactory moduleDescriptorFactory) throws PluginParseException
pluginArtifact - the plugin artifact to deploymoduleDescriptorFactory - The factory for plugin modulesPluginParseException - If the descriptor cannot be parsedIllegalArgumentException - If the plugin descriptor isn't found, and the plugin key and bundle version aren't
specified in the manifestpublic ModuleDescriptor<?> createModule(Plugin plugin, org.dom4j.Element module, ModuleDescriptorFactory moduleDescriptorFactory)
PluginFactory
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.