Package com.atlassian.plugin.metadata
Class DefaultPluginMetadataManager
java.lang.Object
com.atlassian.plugin.metadata.DefaultPluginMetadataManager
- All Implemented Interfaces:
PluginMetadataManager
@Immutable
public final class DefaultPluginMetadataManager
extends Object
implements PluginMetadataManager
A default implementation that uses the
ClasspathFilePluginMetadata
plugin metadata implementation to resolve the application provided plugin metadata.- Since:
- 2.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisOptional(ModuleDescriptor<?> moduleDescriptor) A module is determined to be optional if the host application has not indicated to the plugins system that it is required.booleanisOptional(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.booleanisSystemProvided(Plugin plugin) A plugin is determined to be "system" ifisUserInstalled(com.atlassian.plugin.Plugin)is false.booleanisUserInstalled(Plugin plugin) A plugin is determined to be non-user ifPlugin.isBundledPlugin()is true or if the host application has indicated to the plugins system that a plugin was provided by it.
-
Constructor Details
-
DefaultPluginMetadataManager
public DefaultPluginMetadataManager()Production ctor. Loads from the class path.
-
-
Method Details
-
isUserInstalled
A plugin is determined to be non-user ifPlugin.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.
- Specified by:
isUserInstalledin interfacePluginMetadataManager
-
isSystemProvided
A plugin is determined to be "system" ifisUserInstalled(com.atlassian.plugin.Plugin)is false.- Specified by:
isSystemProvidedin interfacePluginMetadataManager
-
isOptional
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.- Specified by:
isOptionalin interfacePluginMetadataManager
-
isOptional
A module is determined to be optional if the host application has not indicated to the plugins system that it is required. If the call toisOptionalwith the module descriptor's plugin isfalse, then this method will also returnfalse. Also if the module descriptor is annotated withCannotDisablethen it can not be optional.- Specified by:
isOptionalin interfacePluginMetadataManager
-