Package com.atlassian.plugin.metadata
Interface PluginMetadataManager
public interface PluginMetadataManager
Provides information about plugins and modules that is application host
specific. The information is not relevant to the plugins system but may be
relevant to managing the plugins.
- Since:
- 2.6 in plugin, 4.6 in API
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisOptional(ModuleDescriptor<?> moduleDescriptor) This is used to determine if a module is considered optional.booleanisOptional(Plugin plugin) This is used to determine if a plugin is considered optional.booleanisSystemProvided(Plugin plugin) This is used to determine if the plugin was provided by the host application.booleanisUserInstalled(Plugin plugin) Determines if the plugin was installed by a user.
-
Method Details
-
isUserInstalled
Determines if the plugin was installed by a user.- Parameters:
plugin- used to determine the state, not null.- Returns:
- true if the plugin was installed by a user, false otherwise.
-
isSystemProvided
This is used to determine if the plugin was provided by the host application.- Parameters:
plugin- used to determine the state, not null.- Returns:
- true if the plugin was provided by the host application, false otherwise.
-
isOptional
This is used to determine if a plugin is considered optional. If an optional plugin is disabled it should not adversely effect the host application. If anyModuleDescriptor's are not optional then the plugin is also not optional.- Parameters:
plugin- used to determine the state, not null.- Returns:
- true if the plugin can safely be disabled, false if the plugin being disabled would adversely effect the host application.
-
isOptional
This is used to determine if a module is considered optional. If an optional module is disabled it should not adversely effect the host application. A module can not be optional if its containing plugin is not optional.- Parameters:
moduleDescriptor- used to determine state, not null.- Returns:
- true if the module can safely be disabled, false if the module being disabled would adversely effect the host application.
-