|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.web.descriptors.DefaultAbstractWebFragmentModuleDescriptor<T>
public class DefaultAbstractWebFragmentModuleDescriptor<T>
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<T> 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 plugin or module is deactivated. |
void |
enabled()
Called by the plugin manager when a plugin or module is activated. |
java.lang.String |
getCompleteKey()
The complete key for this module, including the plugin key. |
Condition |
getCondition()
|
ContextProvider |
getContextProvider()
|
protected WebFragmentModuleDescriptor<T> |
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()
|
T |
getModule()
The particular module object created by this plugin. |
java.lang.Class<T> |
getModuleClass()
The class of the module this descriptor creates. |
java.lang.String |
getName()
A simple string name for this descriptor. |
java.util.Map<java.lang.String,java.lang.String> |
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)
Get a ResourceDescriptor of a particular type and name. |
java.util.List<ResourceDescriptor> |
getResourceDescriptors()
Get a list of all the descriptors. |
java.util.List<ResourceDescriptor> |
getResourceDescriptors(java.lang.String type)
Get a list of all descriptors of a particular type. |
ResourceLocation |
getResourceLocation(java.lang.String type,
java.lang.String name)
Get a ResourceLocation of a particular type and 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)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAbstractWebFragmentModuleDescriptor(WebFragmentModuleDescriptor<T> abstractDescriptor)
| Method Detail |
|---|
public void enabled()
StateAware
enabled in interface StateAwarepublic void disabled()
StateAware
disabled in interface StateAwareprotected WebFragmentModuleDescriptor<T> getDecoratedDescriptor()
public int getWeight()
getWeight in interface WebFragmentModuleDescriptor<T>getWeight in interface WeightedDescriptorpublic java.lang.String getKey()
ModuleDescriptor
getKey in interface ModuleDescriptor<T>ModuleDescriptor.getCompleteKey(),
ModuleDescriptor.getPluginKey()public T getModule()
ModuleDescriptor
getModule in interface ModuleDescriptor<T>ModuleDescriptor.getModuleClass()public java.lang.String getI18nNameKey()
ModuleDescriptorModuleDescriptor.getName() when using internationalisation.
getI18nNameKey in interface ModuleDescriptor<T>public java.lang.String getDescriptionKey()
ModuleDescriptorModuleDescriptor.getDescription() when using internationalisation.
getDescriptionKey in interface ModuleDescriptor<T>public Plugin getPlugin()
getPlugin in interface ModuleDescriptor<T>public 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 WebFragmentModuleDescriptor<T>public ContextProvider getContextProvider()
getContextProvider in interface WebFragmentModuleDescriptor<T>public WebParam getWebParams()
getWebParams in interface WebFragmentModuleDescriptor<T>public java.lang.String getCompleteKey()
ModuleDescriptorFormat is plugin.key:module.key
getCompleteKey in interface ModuleDescriptor<T>ModuleDescriptor.getKey(),
ModuleDescriptor.getPluginKey()public java.lang.String getPluginKey()
ModuleDescriptor
getPluginKey in interface ModuleDescriptor<T>ModuleDescriptor.getKey(),
ModuleDescriptor.getCompleteKey()public java.lang.String getName()
ModuleDescriptor
getName in interface ModuleDescriptor<T>public java.lang.String getDescription()
ModuleDescriptor
getDescription in interface ModuleDescriptor<T>public java.lang.Class<T> getModuleClass()
ModuleDescriptor
getModuleClass in interface ModuleDescriptor<T>ModuleDescriptor.getModule()
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>plugin - The plugin that the module belongs to.element - XML element representing the module.
PluginParseException - Can be thrown if an error occurs while parsing the XML element.public boolean isEnabledByDefault()
ModuleDescriptor
isEnabledByDefault in interface ModuleDescriptor<T>true if this plugin module is enabled by default.public boolean isSystemModule()
ModuleDescriptor
isSystemModule in interface ModuleDescriptor<T>true if this plugin module is a "system" plugin that shouldn't be made visible/disableable to the user.public void destroy(Plugin plugin)
ModuleDescriptor
destroy in interface ModuleDescriptor<T>plugin - TODO: The plugin parameter is redundant. The ModuleDescriptor must know its parent plugin in order to implement getPlugin()public java.lang.Float getMinJavaVersion()
getMinJavaVersion in interface ModuleDescriptor<T>public boolean satisfiesMinJavaVersion()
ModuleDescriptor
satisfiesMinJavaVersion in interface ModuleDescriptor<T>public java.util.Map<java.lang.String,java.lang.String> getParams()
getParams in interface ModuleDescriptor<T>public java.util.List<ResourceDescriptor> getResourceDescriptors()
Resourceddescriptors.
Note: since 2.2 this list must be immutable, previously modifying this list could modify the underlying list.
getResourceDescriptors in interface Resourcedpublic java.util.List<ResourceDescriptor> getResourceDescriptors(java.lang.String type)
Resourceddescriptors of a particular type.
Note: since 2.2 this list must be immutable, previously this list was modifiable but modifications would not be reflected in the underlying list.
getResourceDescriptors in interface Resourced
public ResourceLocation getResourceLocation(java.lang.String type,
java.lang.String name)
ResourcedResourceLocation of a particular type and name.
getResourceLocation in interface Resourced
public ResourceDescriptor getResourceDescriptor(java.lang.String type,
java.lang.String name)
ResourcedResourceDescriptor of a particular type and name.
getResourceDescriptor in interface Resourcedpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||