|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.web.descriptors.DefaultAbstractWebFragmentModuleDescriptor
public class DefaultAbstractWebFragmentModuleDescriptor
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 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. |
String |
getCompleteKey()
The complete key for this module, including the plugin key. |
Condition |
getCondition()
|
ContextProvider |
getContextProvider()
|
protected WebFragmentModuleDescriptor |
getDecoratedDescriptor()
|
String |
getDescription()
A simple description of this descriptor. |
String |
getDescriptionKey()
Key used to override ModuleDescriptor.getDescription() when using
internationalisation. |
String |
getI18nNameKey()
Key used to override ModuleDescriptor.getName() when using internationalisation. |
String |
getKey()
The key for this module, unique within the plugin. |
Float |
getMinJavaVersion()
|
Void |
getModule()
The particular module object created by this plugin. |
Class<Void> |
getModuleClass()
The class of the module this descriptor creates. |
String |
getName()
A simple string name for this descriptor. |
Map<String,String> |
getParams()
|
Plugin |
getPlugin()
|
String |
getPluginKey()
The plugin key for this module, derived from the complete key. |
ResourceDescriptor |
getResourceDescriptor(String type,
String name)
Get a ResourceDescriptor of a particular type and name. |
List<ResourceDescriptor> |
getResourceDescriptors()
Get a List of all the descriptors
. |
List<ResourceDescriptor> |
getResourceDescriptors(String type)
Deprecated. since 2.5.0 use getResourceDescriptors() and filter
as required |
ResourceLocation |
getResourceLocation(String type,
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)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAbstractWebFragmentModuleDescriptor(WebFragmentModuleDescriptor abstractDescriptor)
| Method Detail |
|---|
public void enabled()
StateAware
enabled in interface StateAwarepublic void disabled()
StateAware
disabled in interface StateAwareprotected WebFragmentModuleDescriptor getDecoratedDescriptor()
public int getWeight()
getWeight in interface WebFragmentModuleDescriptorgetWeight in interface WeightedDescriptorpublic String getKey()
ModuleDescriptor
getKey in interface ModuleDescriptor<Void>ModuleDescriptor.getCompleteKey(),
ModuleDescriptor.getPluginKey()public Void getModule()
ModuleDescriptor
getModule in interface ModuleDescriptor<Void>ModuleDescriptor.getModuleClass()public String getI18nNameKey()
ModuleDescriptorModuleDescriptor.getName() when using internationalisation.
getI18nNameKey in interface ModuleDescriptor<Void>public String getDescriptionKey()
ModuleDescriptorModuleDescriptor.getDescription() when using
internationalisation.
getDescriptionKey in interface ModuleDescriptor<Void>public Plugin getPlugin()
getPlugin in interface ModuleDescriptor<Void>public WebLabel getWebLabel()
getWebLabel in interface WebFragmentModuleDescriptorpublic WebLabel getTooltip()
getTooltip in interface WebFragmentModuleDescriptorpublic void setWebInterfaceManager(WebInterfaceManager webInterfaceManager)
public Condition getCondition()
getCondition in interface ConditionalDescriptorgetCondition in interface WebFragmentModuleDescriptorpublic ContextProvider getContextProvider()
getContextProvider in interface WebFragmentModuleDescriptorpublic WebParam getWebParams()
getWebParams in interface WebFragmentModuleDescriptorpublic String getCompleteKey()
ModuleDescriptorFormat is plugin.key:module.key
getCompleteKey in interface ModuleDescriptor<Void>ModuleDescriptor.getKey(),
ModuleDescriptor.getPluginKey()public String getPluginKey()
ModuleDescriptor
getPluginKey in interface ModuleDescriptor<Void>ModuleDescriptor.getKey(),
ModuleDescriptor.getCompleteKey()public String getName()
ModuleDescriptor
getName in interface ModuleDescriptor<Void>public String getDescription()
ModuleDescriptor
getDescription in interface ModuleDescriptor<Void>public Class<Void> getModuleClass()
ModuleDescriptor
getModuleClass in interface ModuleDescriptor<Void>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<Void>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.public boolean isEnabledByDefault()
ModuleDescriptor
isEnabledByDefault in interface ModuleDescriptor<Void>true if this plugin module is enabled by default.public boolean isSystemModule()
ModuleDescriptor
isSystemModule in interface ModuleDescriptor<Void>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<Void>plugin - TODO: The plugin parameter is redundant. The
ModuleDescriptor must know its parent plugin in order to
implement getPlugin()public Float getMinJavaVersion()
getMinJavaVersion in interface ModuleDescriptor<Void>public boolean satisfiesMinJavaVersion()
ModuleDescriptor
satisfiesMinJavaVersion in interface ModuleDescriptor<Void>public Map<String,String> getParams()
getParams in interface ModuleDescriptor<Void>public List<ResourceDescriptor> getResourceDescriptors()
ResourcedList of all the descriptors
.
Note: since 2.2 this list must be immutable, previously modifying this list could modify the underlying list.
getResourceDescriptors in interface Resourced@Deprecated public List<ResourceDescriptor> getResourceDescriptors(String type)
getResourceDescriptors() and filter
as required
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(String type,
String name)
ResourcedResourceLocation of a particular type and name.
getResourceLocation in interface Resourced
public ResourceDescriptor getResourceDescriptor(String type,
String name)
ResourcedResourceDescriptor of a particular type and name.
getResourceDescriptor in interface Resourcedpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||