com.atlassian.jira.plugin
Class JiraResourcedModuleDescriptor<T>

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
      extended by com.atlassian.jira.plugin.JiraResourcedModuleDescriptor<T>
All Implemented Interfaces:
com.atlassian.plugin.ModuleDescriptor<T>, com.atlassian.plugin.Resourced, com.atlassian.plugin.StateAware
Direct Known Subclasses:
AbstractTabPanelModuleDescriptor, AbstractWorkflowModuleDescriptor, ConfigurableModuleDescriptor, ContentLinkResolverDescriptor, CustomFieldSearcherModuleDescriptor, CustomFieldTypeModuleDescriptor, FooterModuleDescriptor, IssueOperationModuleDescriptor, IssueTabPanelModuleDescriptor, IssueViewModuleDescriptor, JiraRendererModuleDescriptor, JqlFunctionModuleDescriptor, KeyboardShortcutModuleDescriptor, MacroModuleDescriptor, ProjectOperationModuleDescriptor, ProjectRoleActorModuleDescriptor, RendererComponentFactoryDescriptor, SearchRequestViewModuleDescriptor, TopNavigationModuleDescriptor, UserFormatModuleDescriptor, ViewProfilePanelModuleDescriptor, WebworkModuleDescriptor

public abstract class JiraResourcedModuleDescriptor<T>
extends com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>


Field Summary
static java.lang.String RESOURCE_TYPE_I18N
           
 
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
moduleClassName, plugin, resources, singleton
 
Constructor Summary
protected JiraResourcedModuleDescriptor(JiraAuthenticationContext authenticationContext, com.atlassian.plugin.module.ModuleFactory moduleFactory)
           
 
Method Summary
protected  void assertResourceExists(java.lang.String type, java.lang.String name)
           
protected  T createModule()
          Creates an instance of the Module.
protected  java.util.Map<java.lang.String,java.lang.Object> createVelocityParams(java.util.Map<java.lang.String,java.lang.Object> startingParams)
           
 void disabled()
           
protected  JiraAuthenticationContext getAuthenticationContext()
           
protected  java.lang.ClassLoader getClassLoader()
           
 java.lang.String getDescription()
           
 java.lang.String getHtml(java.lang.String resourceName)
           
 java.lang.String getHtml(java.lang.String resourceName, java.util.Map<java.lang.String,?> startingParams)
           
 I18nHelper getI18nBean()
           
 T getModule()
           
 java.lang.String getName()
           
 java.lang.String getText(java.lang.String key)
          Deprecated. Please use i18nBean.getText() instead
 java.lang.String getText(java.lang.String key, java.lang.Object params)
           
 void init(com.atlassian.plugin.Plugin plugin, org.dom4j.Element element)
           
protected  boolean isResourceExist(java.lang.String resourceName)
           
 
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, destroy, enabled, getCompleteKey, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE_TYPE_I18N

public static final java.lang.String RESOURCE_TYPE_I18N
See Also:
Constant Field Values
Constructor Detail

JiraResourcedModuleDescriptor

protected JiraResourcedModuleDescriptor(JiraAuthenticationContext authenticationContext,
                                        com.atlassian.plugin.module.ModuleFactory moduleFactory)
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<T>
Overrides:
init in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
Throws:
com.atlassian.plugin.PluginParseException

assertResourceExists

protected void assertResourceExists(java.lang.String type,
                                    java.lang.String name)
                             throws com.atlassian.plugin.PluginParseException
Throws:
com.atlassian.plugin.PluginParseException

getHtml

public java.lang.String getHtml(java.lang.String resourceName)

getHtml

public java.lang.String getHtml(java.lang.String resourceName,
                                java.util.Map<java.lang.String,?> startingParams)

getModule

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

createModule

protected T createModule()
Creates an instance of the Module. This is called by the lazy load logic of getModule() and is suitable for overriding in subclasses if they want to customize how the Module class is instantiated.

Returns:
a new instance of the module.

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface com.atlassian.plugin.ModuleDescriptor<T>
Overrides:
getDescription in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>

getName

public java.lang.String getName()
Specified by:
getName in interface com.atlassian.plugin.ModuleDescriptor<T>
Overrides:
getName in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>

getAuthenticationContext

protected JiraAuthenticationContext getAuthenticationContext()

getText

@Deprecated
public java.lang.String getText(java.lang.String key)
Deprecated. Please use i18nBean.getText() instead

Parameters:
key - the property key
Returns:
the translated text

getText

public java.lang.String getText(java.lang.String key,
                                java.lang.Object params)

getI18nBean

public I18nHelper getI18nBean()

createVelocityParams

protected java.util.Map<java.lang.String,java.lang.Object> createVelocityParams(java.util.Map<java.lang.String,java.lang.Object> startingParams)

isResourceExist

protected boolean isResourceExist(java.lang.String resourceName)

getClassLoader

protected java.lang.ClassLoader getClassLoader()

disabled

public void disabled()
Specified by:
disabled in interface com.atlassian.plugin.StateAware
Overrides:
disabled in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>


Copyright © 2002-2011 Atlassian. All Rights Reserved.