com.atlassian.jira.plugin
Class AbstractJiraModuleDescriptor<T>
java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
com.atlassian.jira.plugin.AbstractJiraModuleDescriptor<T>
- Type Parameters:
T
- The Plugin interface for this ModuleDescriptor.
- All Implemented Interfaces:
- JiraResourcedModuleDescriptor<T>, com.atlassian.plugin.ModuleDescriptor<T>, com.atlassian.plugin.Resourced, com.atlassian.plugin.StateAware
- Direct Known Subclasses:
- AboutPagePanelModuleDescriptorImpl, AbstractConfigurableModuleDescriptor, AbstractTabPanelModuleDescriptor, AbstractWorkflowModuleDescriptor, AuthorisationModuleDescriptor, ContentLinkResolverDescriptor, CustomFieldSearcherModuleDescriptorImpl, CustomFieldTypeModuleDescriptorImpl, DefaultSimpleLinkFactoryModuleDescriptor, FooterModuleDescriptorImpl, IssueLinkRendererModuleDescriptorImpl, IssueTabPanelModuleDescriptorImpl, IssueViewModuleDescriptorImpl, JiraRendererModuleDescriptorImpl, JqlFunctionModuleDescriptorImpl, KeyboardShortcutModuleDescriptor, LanguageModuleDescriptorImpl, MacroModuleDescriptor, NotificationFilterModuleDescriptor, PasswordPolicyModuleDescriptor, PreDeleteUserErrorsModuleDescriptor, ProjectOperationModuleDescriptorImpl, ProjectRoleActorModuleDescriptor, RendererComponentFactoryDescriptor, SearchRequestViewModuleDescriptorImpl, StudioHooksModuleDescriptor, TopNavigationModuleDescriptorImpl, TranslationTransformModuleDescriptorImpl, UserFormatModuleDescriptorImpl, ViewProfilePanelModuleDescriptorImpl, WebworkModuleDescriptor
public abstract class AbstractJiraModuleDescriptor<T>
- extends com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
- implements JiraResourcedModuleDescriptor<T>
Base class for JIRA Plugin ModuleDescriptors.
Note: This class should not be considered as actually part of the API. It is in the jira-api module for legacy
compatibility only.
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources, singleton |
Method Summary |
protected void |
assertResourceExists(String type,
String name)
|
protected T |
createModule()
Creates an instance of the Module. |
protected Map<String,Object> |
createVelocityParams(Map<String,Object> startingParams)
|
void |
disabled()
|
void |
enabled()
|
protected JiraAuthenticationContext |
getAuthenticationContext()
|
protected ClassLoader |
getClassLoader()
|
String |
getDescription()
|
String |
getHtml(String resourceName)
|
String |
getHtml(String resourceName,
Map<String,?> startingParams)
|
I18nHelper |
getI18nBean()
|
T |
getModule()
|
String |
getName()
|
String |
getText(String key)
Deprecated. Please use i18nBean.getText() instead. Since 5.0 |
String |
getText(String key,
Object params)
|
void |
init(com.atlassian.plugin.Plugin plugin,
org.dom4j.Element element)
|
protected boolean |
isResourceExist(String resourceName)
|
void |
writeHtml(String resourceName,
Map<String,?> startingParams,
Writer writer)
|
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
assertModuleClassImplements, checkPermissions, destroy, destroy, equals, getCompleteKey, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hashCode, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, provideValidationRules, satisfiesMinJavaVersion, setPlugin, toString |
Methods inherited from interface com.atlassian.plugin.ModuleDescriptor |
destroy, destroy, equals, getCompleteKey, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getParams, getPlugin, getPluginKey, hashCode, isEnabledByDefault, isSystemModule, satisfiesMinJavaVersion |
Methods inherited from interface com.atlassian.plugin.Resourced |
getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation |
AbstractJiraModuleDescriptor
protected AbstractJiraModuleDescriptor(JiraAuthenticationContext authenticationContext,
com.atlassian.plugin.module.ModuleFactory moduleFactory)
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(String type,
String name)
throws com.atlassian.plugin.PluginParseException
- Throws:
com.atlassian.plugin.PluginParseException
getHtml
public String getHtml(String resourceName)
- Specified by:
getHtml
in interface JiraResourcedModuleDescriptor<T>
getHtml
public String getHtml(String resourceName,
Map<String,?> startingParams)
- Specified by:
getHtml
in interface JiraResourcedModuleDescriptor<T>
writeHtml
public void writeHtml(String resourceName,
Map<String,?> startingParams,
Writer writer)
throws IOException
- Specified by:
writeHtml
in interface JiraResourcedModuleDescriptor<T>
- Throws:
IOException
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 String getDescription()
- Specified by:
getDescription
in interface com.atlassian.plugin.ModuleDescriptor<T>
- Overrides:
getDescription
in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
getName
public 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 String getText(String key)
- Deprecated. Please use i18nBean.getText() instead. Since 5.0
- Parameters:
key
- the property key
- Returns:
- the translated text
getText
public String getText(String key,
Object params)
getI18nBean
public I18nHelper getI18nBean()
- Specified by:
getI18nBean
in interface JiraResourcedModuleDescriptor<T>
createVelocityParams
protected Map<String,Object> createVelocityParams(Map<String,Object> startingParams)
isResourceExist
protected boolean isResourceExist(String resourceName)
getClassLoader
protected ClassLoader getClassLoader()
enabled
public void enabled()
- Specified by:
enabled
in interface com.atlassian.plugin.StateAware
- Overrides:
enabled
in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
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-2013 Atlassian. All Rights Reserved.