com.atlassian.plugin.web.descriptors
Class DefaultWebItemModuleDescriptor<T>

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
      extended by com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor<T>
          extended by com.atlassian.plugin.web.descriptors.DefaultWebItemModuleDescriptor<T>
All Implemented Interfaces:
ModuleDescriptor<T>, Resourced, StateAware, WebFragmentModuleDescriptor<T>, WebItemModuleDescriptor<T>, WeightedDescriptor

public class DefaultWebItemModuleDescriptor<T>
extends AbstractWebFragmentModuleDescriptor<T>
implements WebItemModuleDescriptor<T>

Represents a pluggable link.


Field Summary
 
Fields inherited from class com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor
condition, contextProvider, element, label, params, tooltip, webInterfaceManager, weight
 
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
moduleClassName, plugin, resources, singleton
 
Fields inherited from interface com.atlassian.plugin.web.descriptors.WebFragmentModuleDescriptor
COMPOSITE_TYPE_AND, COMPOSITE_TYPE_OR
 
Constructor Summary
DefaultWebItemModuleDescriptor()
           
DefaultWebItemModuleDescriptor(WebInterfaceManager webInterfaceManager)
           
 
Method Summary
 void enabled()
           
 WebIcon getIcon()
           
 WebLink getLink()
           
 T getModule()
           
 java.lang.String getSection()
           
 java.lang.String getStyleClass()
          Returns the item style as a "class" String consisting of one or more style classes.
 void init(Plugin plugin, org.dom4j.Element element)
           
 
Methods inherited from class com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor
disabled, getCondition, getContextProvider, getTooltip, getWebLabel, getWebParams, getWeight, makeCondition, makeConditions, makeConditions, makeContextProvider, setWebInterfaceManager
 
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, destroy, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getName, getParams, getPlugin, getPluginKey, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, provideValidationRules, satisfiesMinJavaVersion, setPlugin, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.plugin.web.descriptors.WebFragmentModuleDescriptor
getCondition, getContextProvider, getTooltip, getWebLabel, getWebParams, getWeight
 
Methods inherited from interface com.atlassian.plugin.ModuleDescriptor
destroy, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getName, getParams, getPlugin, getPluginKey, isEnabledByDefault, isSystemModule, satisfiesMinJavaVersion
 
Methods inherited from interface com.atlassian.plugin.Resourced
getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation
 
Methods inherited from interface com.atlassian.plugin.StateAware
disabled
 

Constructor Detail

DefaultWebItemModuleDescriptor

public DefaultWebItemModuleDescriptor(WebInterfaceManager webInterfaceManager)

DefaultWebItemModuleDescriptor

public DefaultWebItemModuleDescriptor()
Method Detail

init

public void init(Plugin plugin,
                 org.dom4j.Element element)
          throws PluginParseException
Specified by:
init in interface ModuleDescriptor<T>
Overrides:
init in class AbstractWebFragmentModuleDescriptor<T>
Throws:
PluginParseException

getSection

public java.lang.String getSection()
Specified by:
getSection in interface WebItemModuleDescriptor<T>

getLink

public WebLink getLink()
Specified by:
getLink in interface WebItemModuleDescriptor<T>

getIcon

public WebIcon getIcon()
Specified by:
getIcon in interface WebItemModuleDescriptor<T>

getStyleClass

public java.lang.String getStyleClass()
Description copied from interface: WebItemModuleDescriptor
Returns the item style as a "class" String consisting of one or more style classes. The default value returned should be an empty String rather than null.

Where possible, use of this method is preferred over getIcon as it allows more flexibility for CSS-based web element styling and class-based JavaScript behaviour.

Specified by:
getStyleClass in interface WebItemModuleDescriptor<T>
Returns:
space-separated list of style classes

enabled

public void enabled()
Specified by:
enabled in interface StateAware
Overrides:
enabled in class AbstractWebFragmentModuleDescriptor<T>

getModule

public T getModule()
Specified by:
getModule in interface ModuleDescriptor<T>
Specified by:
getModule in class AbstractModuleDescriptor<T>


Copyright © 2009 Atlassian. All Rights Reserved.