|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor<T>
public abstract class AbstractWebFragmentModuleDescriptor<T>
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 |
|---|
moduleClass, moduleClassName, moduleFactory, plugin, resources, singleton |
| Fields inherited from interface com.atlassian.plugin.web.descriptors.WebFragmentModuleDescriptor |
|---|
COMPOSITE_TYPE_AND, COMPOSITE_TYPE_OR |
| Constructor Summary | |
|---|---|
|
AbstractWebFragmentModuleDescriptor()
|
|
AbstractWebFragmentModuleDescriptor(ModuleFactory moduleClassFactory,
WebInterfaceManager webInterfaceManager)
|
protected |
AbstractWebFragmentModuleDescriptor(WebInterfaceManager webInterfaceManager)
|
| Method Summary | |
|---|---|
void |
disabled()
Disables the module descriptor. |
void |
enabled()
Enables the descriptor by loading the module class. |
boolean |
equals(Object obj)
Compares the specified object with this module descriptor for equality. |
Condition |
getCondition()
|
ContextProvider |
getContextProvider()
Returns the ContextProvider that augments the context used to render a web module. |
WebLabel |
getTooltip()
|
WebLabel |
getWebLabel()
|
WebParam |
getWebParams()
|
int |
getWeight()
|
int |
hashCode()
Returns the hash code value for this module descriptor. |
void |
init(Plugin plugin,
org.dom4j.Element element)
Initialise a module given it's parent plugin and the XML element representing the module. |
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(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, getModule, 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, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.atlassian.plugin.ModuleDescriptor |
|---|
destroy, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModule, getModuleClass, getName, getParams, getPlugin, getPluginKey, isEnabledByDefault, isSystemModule, satisfiesMinJavaVersion |
| Methods inherited from interface com.atlassian.plugin.Resourced |
|---|
getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation |
| Field Detail |
|---|
protected WebInterfaceManager webInterfaceManager
protected org.dom4j.Element element
protected int weight
protected Condition condition
protected ContextProvider contextProvider
protected DefaultWebLabel label
protected DefaultWebLabel tooltip
protected WebParam params
| Constructor Detail |
|---|
protected AbstractWebFragmentModuleDescriptor(WebInterfaceManager webInterfaceManager)
public AbstractWebFragmentModuleDescriptor()
public AbstractWebFragmentModuleDescriptor(ModuleFactory moduleClassFactory,
WebInterfaceManager webInterfaceManager)
| Method Detail |
|---|
public void init(Plugin plugin,
org.dom4j.Element element)
throws PluginParseException
ModuleDescriptor
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.
init in interface ModuleDescriptor<T>init in class AbstractModuleDescriptor<T>plugin - The plugin that the module belongs to. Must not be null.element - XML element representing the module. Must not be null.
PluginParseException - Can be thrown if an error occurs while
parsing the XML element.
protected Condition makeConditions(org.dom4j.Element element,
int type)
throws PluginParseException
element - Element of web-section or web-itemtype - logical operator type
PluginParseException
protected Condition makeConditions(List elements,
int type)
throws PluginParseException
PluginParseException
protected Condition makeCondition(org.dom4j.Element element)
throws PluginParseException
PluginParseException
protected ContextProvider makeContextProvider(org.dom4j.Element element)
throws PluginParseException
PluginParseExceptionpublic void enabled()
AbstractModuleDescriptor
enabled in interface StateAwareenabled in class AbstractModuleDescriptor<T>public void disabled()
AbstractModuleDescriptor
disabled in interface StateAwaredisabled in class AbstractModuleDescriptor<T>public int getWeight()
getWeight in interface WebFragmentModuleDescriptor<T>getWeight in interface WeightedDescriptorpublic WebLabel getWebLabel()
getWebLabel in interface WebFragmentModuleDescriptor<T>public WebLabel getTooltip()
getTooltip in interface WebFragmentModuleDescriptor<T>public void setWebInterfaceManager(WebInterfaceManager webInterfaceManager)
public Condition getCondition()
getCondition in interface ConditionalDescriptorgetCondition in interface WebFragmentModuleDescriptor<T>public ContextProvider getContextProvider()
ContextAware
getContextProvider in interface ContextAwarepublic WebParam getWebParams()
getWebParams in interface WebFragmentModuleDescriptor<T>public boolean equals(Object obj)
ModuleDescriptorCompares the specified object with this module descriptor for equality.
Returns true if the given object is also a module descriptor and the two descriptors have the same
"complete key" as determined by ModuleDescriptor.getCompleteKey().
equals in interface ModuleDescriptor<T>equals in class AbstractModuleDescriptor<T>obj - object to be compared for equality with this module descriptor.
public int hashCode()
ModuleDescriptor
getCompleteKey() == null ? 0 : getCompleteKey().hashCode()
This ensures that d1.equals(d2) implies that
d1.hashCode()==d2.hashCode() for any two Module Descriptors
d1 and d2, as required by the general
contract of Object.hashCode.
hashCode in interface ModuleDescriptor<T>hashCode in class AbstractModuleDescriptor<T>Object.hashCode(),
Object.equals(Object),
ModuleDescriptor.equals(Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||