com.atlassian.plugin.web.descriptors
Class AbstractWebFragmentModuleDescriptor

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor
      extended by com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor
All Implemented Interfaces:
ModuleDescriptor, Resourced, StateAware, WebFragmentModuleDescriptor, WeightedDescriptor
Direct Known Subclasses:
DefaultWebItemModuleDescriptor, DefaultWebSectionModuleDescriptor

public abstract class AbstractWebFragmentModuleDescriptor
extends AbstractModuleDescriptor
implements StateAware, WebFragmentModuleDescriptor

An abstract convenience class for web fragment descriptors.


Field Summary
protected  Condition condition
           
protected  ContextProvider contextProvider
           
protected  org.dom4j.Element element
           
protected  DefaultWebLabel label
           
protected  WebParam params
           
protected  DefaultWebLabel tooltip
           
protected  WebInterfaceManager webInterfaceManager
           
protected  int weight
           
 
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
plugin, resources, singleton
 
Fields inherited from interface com.atlassian.plugin.web.descriptors.WebFragmentModuleDescriptor
COMPOSITE_TYPE_AND, COMPOSITE_TYPE_OR
 
Constructor Summary
  AbstractWebFragmentModuleDescriptor()
           
protected AbstractWebFragmentModuleDescriptor(WebInterfaceManager webInterfaceManager)
           
 
Method Summary
 void disabled()
           
 void enabled()
           
 Condition getCondition()
           
 ContextProvider getContextProvider()
           
 java.lang.Object getModule()
           
 WebLabel getTooltip()
           
 WebLabel getWebLabel()
           
 WebParam getWebParams()
           
 int getWeight()
           
 void init(Plugin plugin, org.dom4j.Element element)
           
protected  Condition makeCondition(org.dom4j.Element element)
           
protected  Condition makeConditions(org.dom4j.Element element, int type)
          Create a condition for when this web fragment should be displayed
protected  Condition makeConditions(java.util.List elements, int type)
           
protected  ContextProvider makeContextProvider(org.dom4j.Element element)
           
 void setWebInterfaceManager(WebInterfaceManager webInterfaceManager)
           
 
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, 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.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
 

Field Detail

webInterfaceManager

protected WebInterfaceManager webInterfaceManager

element

protected org.dom4j.Element element

weight

protected int weight

condition

protected Condition condition

contextProvider

protected ContextProvider contextProvider

label

protected DefaultWebLabel label

tooltip

protected DefaultWebLabel tooltip

params

protected WebParam params
Constructor Detail

AbstractWebFragmentModuleDescriptor

protected AbstractWebFragmentModuleDescriptor(WebInterfaceManager webInterfaceManager)

AbstractWebFragmentModuleDescriptor

public AbstractWebFragmentModuleDescriptor()
Method Detail

init

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

makeConditions

protected Condition makeConditions(org.dom4j.Element element,
                                   int type)
                            throws PluginParseException
Create a condition for when this web fragment should be displayed

Parameters:
element - Element of web-section or web-item
type - logical operator type getCompositeType(java.lang.String)
Throws:
PluginParseException

makeConditions

protected Condition makeConditions(java.util.List elements,
                                   int type)
                            throws PluginParseException
Throws:
PluginParseException

makeCondition

protected Condition makeCondition(org.dom4j.Element element)
                           throws PluginParseException
Throws:
PluginParseException

makeContextProvider

protected ContextProvider makeContextProvider(org.dom4j.Element element)
                                       throws PluginParseException
Throws:
PluginParseException

enabled

public void enabled()
Specified by:
enabled in interface StateAware
Overrides:
enabled in class AbstractModuleDescriptor

disabled

public void disabled()
Specified by:
disabled in interface StateAware
Overrides:
disabled in class AbstractModuleDescriptor

getWeight

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

getModule

public java.lang.Object getModule()
Specified by:
getModule in interface ModuleDescriptor
Specified by:
getModule in interface WebFragmentModuleDescriptor
Specified by:
getModule in class AbstractModuleDescriptor

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


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.