com.atlassian.plugin.web.descriptors
Class AbstractWebFragmentModuleDescriptor
java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor
- All Implemented Interfaces:
- ModuleDescriptor<Void>, Resourced, StateAware, ConditionalDescriptor, ContextAware, WebFragmentModuleDescriptor, WeightedDescriptor
- Direct Known Subclasses:
- DefaultWebItemModuleDescriptor, DefaultWebSectionModuleDescriptor
public abstract class AbstractWebFragmentModuleDescriptor
- extends AbstractModuleDescriptor<Void>
- implements StateAware, WebFragmentModuleDescriptor
An abstract convenience class for web fragment descriptors.
| Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
assertModuleClassImplements, destroy, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModule, getModuleClass, getName, getParams, getPlugin, getPluginKey, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, provideValidationRules, satisfiesMinJavaVersion, setPlugin, toString |
| Methods inherited from interface com.atlassian.plugin.ModuleDescriptor |
destroy, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModule, getModuleClass, getName, getParams, getPlugin, getPluginKey, isEnabledByDefault, isSystemModule, satisfiesMinJavaVersion |
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
AbstractWebFragmentModuleDescriptor
protected AbstractWebFragmentModuleDescriptor(WebInterfaceManager webInterfaceManager)
AbstractWebFragmentModuleDescriptor
public AbstractWebFragmentModuleDescriptor()
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.
Since atlassian-plugins v2.2, you can no longer load classes from the
plugin in this method, because the OSGi bundle that they will live in is
not built yet. Load classes in the
AbstractModuleDescriptor.enabled()
method instead.
- Specified by:
init in interface ModuleDescriptor<Void>- Overrides:
init in class AbstractModuleDescriptor<Void>
- Parameters:
plugin - The plugin that the module belongs to. Must not be null.element - XML element representing the module. Must not be null.
- Throws:
PluginParseException - Can be thrown if an error occurs while
parsing the XML element.
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-itemtype - logical operator type
ConditionElementParser#get(String)
- Throws:
PluginParseException
makeConditions
protected Condition makeConditions(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()
- Description copied from class:
AbstractModuleDescriptor
- Enables the descriptor by loading the module class. Classes overriding
this method MUST call super.enabled() before their own enabling code.
- Specified by:
enabled in interface StateAware- Overrides:
enabled in class AbstractModuleDescriptor<Void>
disabled
public void disabled()
- Description copied from class:
AbstractModuleDescriptor
- Disables the module descriptor. Classes overriding this method MUST call
super.disabled() after their own disabling code.
- Specified by:
disabled in interface StateAware- Overrides:
disabled in class AbstractModuleDescriptor<Void>
getWeight
public int getWeight()
- Specified by:
getWeight in interface WebFragmentModuleDescriptor- Specified by:
getWeight in interface WeightedDescriptor
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 ConditionalDescriptor- Specified by:
getCondition in interface WebFragmentModuleDescriptor
getContextProvider
public ContextProvider getContextProvider()
- Description copied from interface:
ContextAware
- Returns the ContextProvider that augments the context used to render a
web module.
- Specified by:
getContextProvider in interface ContextAware
getWebParams
public WebParam getWebParams()
- Specified by:
getWebParams in interface WebFragmentModuleDescriptor
Copyright © 2011 Atlassian. All Rights Reserved.