com.atlassian.plugin.servlet.descriptors
Class BaseServletModuleDescriptor<T>
java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
com.atlassian.plugin.servlet.descriptors.BaseServletModuleDescriptor<T>
- All Implemented Interfaces:
- ModuleDescriptor<T>, Resourced, StateAware
- Direct Known Subclasses:
- ServletFilterModuleDescriptor, ServletModuleDescriptor
public abstract class BaseServletModuleDescriptor<T>
- extends AbstractModuleDescriptor<T>
Acts as a base for other servlet type module descriptors to inherit. It adds parsing and retrieval of any paths
declared in the descriptor with <url-pattern> as well as <init-param>s.
- Since:
- 2.1.0
|
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
|
Method Summary |
java.util.Map<java.lang.String,java.lang.String> |
getInitParams()
|
java.util.List<java.lang.String> |
getPaths()
|
void |
init(Plugin plugin,
org.dom4j.Element element)
Initialise a module given it's parent plugin and the XML element representing the module. |
protected void |
provideValidationRules(ValidationPattern pattern)
Provides validation rules for the pattern |
| Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
assertModuleClassImplements, destroy, disabled, enabled, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModule, getModuleClass, getName, getParams, getPlugin, getPluginKey, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, satisfiesMinJavaVersion, setPlugin, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
BaseServletModuleDescriptor
public BaseServletModuleDescriptor()
init
public void init(Plugin plugin,
org.dom4j.Element element)
throws PluginParseException
- Description copied from interface:
ModuleDescriptor
- Initialise a module given it's parent plugin and the XML element representing the module.
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.
- Specified by:
init in interface ModuleDescriptor<T>- Overrides:
init in class AbstractModuleDescriptor<T>
- Parameters:
plugin - The plugin that the module belongs to.element - XML element representing the module.
- Throws:
PluginParseException - Can be thrown if an error occurs while parsing the XML element.
provideValidationRules
protected void provideValidationRules(ValidationPattern pattern)
- Description copied from class:
AbstractModuleDescriptor
- Provides validation rules for the pattern
- Overrides:
provideValidationRules in class AbstractModuleDescriptor<T>
- Parameters:
pattern - The validation pattern
getPaths
public java.util.List<java.lang.String> getPaths()
getInitParams
public java.util.Map<java.lang.String,java.lang.String> getInitParams()
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.