com.atlassian.plugin.web.descriptors
Class DefaultAbstractWebFragmentModuleDescriptor

java.lang.Object
  extended by com.atlassian.plugin.web.descriptors.DefaultAbstractWebFragmentModuleDescriptor
All Implemented Interfaces:
ModuleDescriptor, Resourced, StateAware, WebFragmentModuleDescriptor, WeightedDescriptor

public class DefaultAbstractWebFragmentModuleDescriptor
extends java.lang.Object
implements StateAware, WebFragmentModuleDescriptor

Wrapper for WebFragmentModuleDescriptor, so that it could be extended by application specific wrappers to provide additional methods.


Field Summary
 
Fields inherited from interface com.atlassian.plugin.web.descriptors.WebFragmentModuleDescriptor
COMPOSITE_TYPE_AND, COMPOSITE_TYPE_OR
 
Constructor Summary
DefaultAbstractWebFragmentModuleDescriptor(WebFragmentModuleDescriptor abstractDescriptor)
           
 
Method Summary
 void destroy(Plugin plugin)
          Override this if your plugin needs to clean up when it's been removed.
 void disabled()
          Called by the plugin manager when the module is deactivated.
 void enabled()
          Called by the plugin manager when the module is activated.
 java.lang.String getCompleteKey()
          The complete key for this module, including the plugin key.
 Condition getCondition()
           
 ContextProvider getContextProvider()
           
protected  WebFragmentModuleDescriptor getDecoratedDescriptor()
           
 java.lang.String getDescription()
          A simple description of this descriptor.
 java.lang.String getDescriptionKey()
          Key used to override ModuleDescriptor.getDescription() when using internationalisation.
 java.lang.String getI18nNameKey()
          Key used to override ModuleDescriptor.getName() when using internationalisation.
 java.lang.String getKey()
          The key for this module, unique within the plugin.
 java.lang.Float getMinJavaVersion()
           
 java.lang.Object getModule()
          The particular module object created by this plugin.
 java.lang.Class getModuleClass()
          The class of the module this descriptor creates.
 java.lang.String getName()
          A simple string name for this descriptor.
 java.util.Map getParams()
           
 Plugin getPlugin()
           
 java.lang.String getPluginKey()
          The plugin key for this module, derived from the complete key
 ResourceDescriptor getResourceDescriptor(java.lang.String type, java.lang.String name)
           
 java.util.List getResourceDescriptors()
           
 java.util.List getResourceDescriptors(java.lang.String type)
           
 ResourceLocation getResourceLocation(java.lang.String type, java.lang.String name)
           
 WebLabel getTooltip()
           
 WebLabel getWebLabel()
           
 WebParam getWebParams()
           
 int getWeight()
           
 void init(Plugin plugin, org.dom4j.Element element)
          Initialise a module given it's parent plugin and the XML element representing the module.
 boolean isEnabledByDefault()
          Whether or not this plugin module is enabled by default.
 boolean isSystemModule()
          Whether or not this plugin module is a "system" plugin that shouldn't be made visible/disableable to the user
 boolean satisfiesMinJavaVersion()
          If a min java version has been specified this will return true if the running jvm is >= to the specified version.
 void setWebInterfaceManager(WebInterfaceManager webInterfaceManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAbstractWebFragmentModuleDescriptor

public DefaultAbstractWebFragmentModuleDescriptor(WebFragmentModuleDescriptor abstractDescriptor)
Method Detail

enabled

public void enabled()
Description copied from interface: StateAware
Called by the plugin manager when the module is activated. Modules that are active when the plugin manager is initialised will have this method called at that time.

Specified by:
enabled in interface StateAware

disabled

public void disabled()
Description copied from interface: StateAware
Called by the plugin manager when the module is deactivated. This method will only be called if the plugin is deactivated while the application is running: stopping the server will not cause this method to be called on any plugins.

Specified by:
disabled in interface StateAware

getDecoratedDescriptor

protected WebFragmentModuleDescriptor getDecoratedDescriptor()

getWeight

public int getWeight()
Specified by:
getWeight in interface WebFragmentModuleDescriptor
Specified by:
getWeight in interface WeightedDescriptor

getKey

public java.lang.String getKey()
Description copied from interface: ModuleDescriptor
The key for this module, unique within the plugin.

Specified by:
getKey in interface ModuleDescriptor

getModule

public java.lang.Object getModule()
Description copied from interface: ModuleDescriptor
The particular module object created by this plugin.

Specified by:
getModule in interface ModuleDescriptor
Specified by:
getModule in interface WebFragmentModuleDescriptor

getI18nNameKey

public java.lang.String getI18nNameKey()
Description copied from interface: ModuleDescriptor
Key used to override ModuleDescriptor.getName() when using internationalisation.

Specified by:
getI18nNameKey in interface ModuleDescriptor
Returns:
the i18n key. May be null.

getDescriptionKey

public java.lang.String getDescriptionKey()
Description copied from interface: ModuleDescriptor
Key used to override ModuleDescriptor.getDescription() when using internationalisation.

Specified by:
getDescriptionKey in interface ModuleDescriptor
Returns:
the i18n key. May be null.

getPlugin

public Plugin getPlugin()
Specified by:
getPlugin in interface ModuleDescriptor
Returns:
The plugin this module descriptor is associated with

getWebLabel

public WebLabel getWebLabel()
Specified by:
getWebLabel in interface WebFragmentModuleDescriptor

getTooltip

public WebLabel getTooltip()
Specified by:
getTooltip in interface WebFragmentModuleDescriptor

setWebInterfaceManager

public void setWebInterfaceManager(WebInterfaceManager webInterfaceManager)

getCondition

public Condition getCondition()
Specified by:
getCondition in interface WebFragmentModuleDescriptor

getContextProvider

public ContextProvider getContextProvider()
Specified by:
getContextProvider in interface WebFragmentModuleDescriptor

getWebParams

public WebParam getWebParams()
Specified by:
getWebParams in interface WebFragmentModuleDescriptor

getCompleteKey

public java.lang.String getCompleteKey()
Description copied from interface: ModuleDescriptor
The complete key for this module, including the plugin key.

Format is plugin.key:module.key

Specified by:
getCompleteKey in interface ModuleDescriptor

getPluginKey

public java.lang.String getPluginKey()
Description copied from interface: ModuleDescriptor
The plugin key for this module, derived from the complete key

Specified by:
getPluginKey in interface ModuleDescriptor

getName

public java.lang.String getName()
Description copied from interface: ModuleDescriptor
A simple string name for this descriptor.

Specified by:
getName in interface ModuleDescriptor

getDescription

public java.lang.String getDescription()
Description copied from interface: ModuleDescriptor
A simple description of this descriptor.

Specified by:
getDescription in interface ModuleDescriptor

getModuleClass

public java.lang.Class getModuleClass()
Description copied from interface: ModuleDescriptor
The class of the module this descriptor creates.

Specified by:
getModuleClass in interface ModuleDescriptor

init

public void init(Plugin plugin,
                 org.dom4j.Element element)
          throws PluginParseException
Description copied from interface: ModuleDescriptor
Initialise a module given it's parent plugin and the XML element representing the module.

Specified by:
init in interface ModuleDescriptor
Throws:
PluginParseException

isEnabledByDefault

public boolean isEnabledByDefault()
Description copied from interface: ModuleDescriptor
Whether or not this plugin module is enabled by default.

Specified by:
isEnabledByDefault in interface ModuleDescriptor
Returns:

isSystemModule

public boolean isSystemModule()
Description copied from interface: ModuleDescriptor
Whether or not this plugin module is a "system" plugin that shouldn't be made visible/disableable to the user

Specified by:
isSystemModule in interface ModuleDescriptor
Returns:

destroy

public void destroy(Plugin plugin)
Description copied from interface: ModuleDescriptor
Override this if your plugin needs to clean up when it's been removed.

Specified by:
destroy in interface ModuleDescriptor

getMinJavaVersion

public java.lang.Float getMinJavaVersion()
Specified by:
getMinJavaVersion in interface ModuleDescriptor

satisfiesMinJavaVersion

public boolean satisfiesMinJavaVersion()
Description copied from interface: ModuleDescriptor
If a min java version has been specified this will return true if the running jvm is >= to the specified version. If this is not set then it is treated as not having a preference.

Specified by:
satisfiesMinJavaVersion in interface ModuleDescriptor
Returns:
true if satisfied, false otherwise.

getParams

public java.util.Map getParams()
Specified by:
getParams in interface ModuleDescriptor

getResourceDescriptors

public java.util.List getResourceDescriptors()
Specified by:
getResourceDescriptors in interface Resourced

getResourceDescriptors

public java.util.List getResourceDescriptors(java.lang.String type)
Specified by:
getResourceDescriptors in interface Resourced

getResourceLocation

public ResourceLocation getResourceLocation(java.lang.String type,
                                            java.lang.String name)
Specified by:
getResourceLocation in interface Resourced

getResourceDescriptor

public ResourceDescriptor getResourceDescriptor(java.lang.String type,
                                                java.lang.String name)
Specified by:
getResourceDescriptor in interface Resourced


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.