com.atlassian.plugin.metadata
Interface PluginMetadataManager

All Known Implementing Classes:
DefaultPluginMetadataManager

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

Method Summary
 boolean isOptional(ModuleDescriptor<?> moduleDescriptor)
          This is used to determine if a module is considered optional.
 boolean isOptional(Plugin plugin)
          This is used to determine if a plugin is considered optional.
 boolean isUserInstalled(Plugin plugin)
          This is used to determine if the plugin was provided by the host application or provided by a user.
 

Method Detail

isUserInstalled

boolean isUserInstalled(Plugin plugin)
This is used to determine if the plugin was provided by the host application or provided by a user.

Parameters:
plugin - used to determine the state, not null.
Returns:
true if the plugin was not provided by the host application, false otherwise.

isOptional

boolean isOptional(Plugin plugin)
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 any ModuleDescriptor'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

boolean isOptional(ModuleDescriptor<?> moduleDescriptor)
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.


Copyright © 2011 Atlassian. All Rights Reserved.