com.atlassian.jira.plugin.webfragment.descriptors
Class DefaultSimpleLinkFactoryModuleDescriptor

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor<SimpleLinkFactory>
      extended by com.atlassian.jira.plugin.webfragment.descriptors.DefaultSimpleLinkFactoryModuleDescriptor
All Implemented Interfaces:
SimpleLinkFactoryModuleDescriptor, com.atlassian.plugin.ModuleDescriptor<SimpleLinkFactory>, com.atlassian.plugin.Resourced, com.atlassian.plugin.StateAware, com.atlassian.plugin.web.descriptors.WeightedDescriptor

public class DefaultSimpleLinkFactoryModuleDescriptor
extends com.atlassian.plugin.descriptors.AbstractModuleDescriptor<SimpleLinkFactory>
implements SimpleLinkFactoryModuleDescriptor

Plugin in Module descriptor that defines a SimpleLinkFactory. This is used by the SimpleLinkManager to display a list of simple links. The special attributes for this are: lazy - whether the section should be loaded lazily, weight - the position to include the generated list, and section - the section that the generated links go into.

Since:
v4.0

Field Summary
 
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
moduleClass, moduleClassName, moduleFactory, plugin, resources, singleton
 
Constructor Summary
DefaultSimpleLinkFactoryModuleDescriptor()
           
 
Method Summary
 boolean equals(Object obj)
           
 SimpleLinkFactory getModule()
           
 String getSection()
          The section that this list will be inserted into.
 int getWeight()
           
 int hashCode()
           
 void init(com.atlassian.plugin.Plugin plugin, org.dom4j.Element element)
           
 boolean shouldBeLazy()
          Whether or not this should be lazily loaded.
 
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, destroy, disabled, enabled, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, 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, getModuleClass, getName, getParams, getPlugin, getPluginKey, isEnabledByDefault, isSystemModule, satisfiesMinJavaVersion
 
Methods inherited from interface com.atlassian.plugin.Resourced
getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation
 

Constructor Detail

DefaultSimpleLinkFactoryModuleDescriptor

public DefaultSimpleLinkFactoryModuleDescriptor()
Method Detail

init

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

shouldBeLazy

public boolean shouldBeLazy()
Description copied from interface: SimpleLinkFactoryModuleDescriptor
Whether or not this should be lazily loaded. This should be true if the list is expensive. Note that this can be ignored if the list does not support lazily loaded links.

Specified by:
shouldBeLazy in interface SimpleLinkFactoryModuleDescriptor
Returns:
true if the list is expensive to generate and should be loaded lazily if possible, false otherwise.

getWeight

public int getWeight()
Specified by:
getWeight in interface com.atlassian.plugin.web.descriptors.WeightedDescriptor

getSection

public String getSection()
Description copied from interface: SimpleLinkFactoryModuleDescriptor
The section that this list will be inserted into. This usually refers to a WebSectionModuleDescriptor location + "/" + key. This should never return null.

Specified by:
getSection in interface SimpleLinkFactoryModuleDescriptor
Returns:
The section that this list will be inserted into.

getModule

public SimpleLinkFactory getModule()
Specified by:
getModule in interface com.atlassian.plugin.ModuleDescriptor<SimpleLinkFactory>
Specified by:
getModule in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<SimpleLinkFactory>

equals

public boolean equals(Object obj)
Specified by:
equals in interface com.atlassian.plugin.ModuleDescriptor<SimpleLinkFactory>
Overrides:
equals in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<SimpleLinkFactory>

hashCode

public int hashCode()
Specified by:
hashCode in interface com.atlassian.plugin.ModuleDescriptor<SimpleLinkFactory>
Overrides:
hashCode in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<SimpleLinkFactory>


Copyright © 2002-2012 Atlassian. All Rights Reserved.