@Immutable public final class DefaultPluginMetadataManager extends Object implements PluginMetadataManager
ClasspathFilePluginMetadata
plugin metadata implementation to resolve the application provided plugin metadata.| Constructor and Description |
|---|
DefaultPluginMetadataManager()
Production ctor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isOptional(ModuleDescriptor<?> moduleDescriptor)
A module is determined to be optional if the host application has not
indicated to the plugins system that it is required.
|
boolean |
isOptional(Plugin plugin)
A plugin is determined to be optional if the host application has not
indicated to the plugins system that it is required or if any of its
modules have been flagged as not optional.
|
boolean |
isSystemProvided(Plugin plugin)
A plugin is determined to be "system" if
isUserInstalled(com.atlassian.plugin.Plugin) is false. |
boolean |
isUserInstalled(Plugin plugin)
A plugin is determined to be non-user if
Plugin.isBundledPlugin() is true or if the
host application has indicated to the plugins system that a plugin was
provided by it. |
public DefaultPluginMetadataManager()
public boolean isUserInstalled(Plugin plugin)
Plugin.isBundledPlugin() is true or if the
host application has indicated to the plugins system that a plugin was
provided by it.
NOTE: If a user has upgraded a bundled plugin then the decision of whether it is user installed plugin is determined by if the application has indicated to the plugins system that a plugin was provided or not.
isUserInstalled in interface PluginMetadataManagerplugin - used to determine the state, not null.public boolean isSystemProvided(Plugin plugin)
isUserInstalled(com.atlassian.plugin.Plugin) is false.isSystemProvided in interface PluginMetadataManagerplugin - used to determine the state, not null.public boolean isOptional(Plugin plugin)
isOptional in interface PluginMetadataManagerplugin - used to determine the state, not null.public boolean isOptional(ModuleDescriptor<?> moduleDescriptor)
isOptional with the module descriptor's plugin is false,
then this method will also return false. Also if the module
descriptor is annotated with
CannotDisable then it can not be
optional.isOptional in interface PluginMetadataManagermoduleDescriptor - used to determine state, not null.Copyright © 2019 Atlassian. All rights reserved.