|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
com.atlassian.plugin.servlet.descriptors.BaseServletModuleDescriptor<javax.servlet.Filter>
com.atlassian.plugin.servlet.descriptors.ServletFilterModuleDescriptor
public class ServletFilterModuleDescriptor
A module descriptor that allows plugin developers to define servlet filters. Developers can define what urls the filter should be applied to by defining one or more <url-pattern> elements and they can decide where in the filter stack a plugin filter should go by defining the "location" and "weight" attributes.
The location attribute can have one of four values:The default for the location attribute is "before-dispatch".
The weight attribute can have any integer value. Filters with lower values of the weight attribute will come before those with higher values within the same location.
| Field Summary | |
|---|---|
static java.util.Comparator<ServletFilterModuleDescriptor> |
byWeight
|
| Fields inherited from class com.atlassian.plugin.servlet.descriptors.BaseServletModuleDescriptor |
|---|
log |
| Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
|---|
key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources, singleton |
| Constructor Summary | |
|---|---|
ServletFilterModuleDescriptor(ModuleFactory moduleFactory,
ServletModuleManager servletModuleManager)
Creates a descriptor that uses a module class factory to create instances. |
|
| Method Summary | |
|---|---|
void |
disabled()
Disables the module descriptor. |
void |
enabled()
Enables the descriptor by loading the module class. |
java.util.Set<FilterDispatcherCondition> |
getDispatcherConditions()
Returns a set of dispatcher conditions that have been set for this filter, these conditions will be one of the following: REQUEST, FORWARD, INCLUDE or ERROR. |
FilterLocation |
getLocation()
|
javax.servlet.Filter |
getModule()
The particular module object created by this plugin. |
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. |
protected void |
provideValidationRules(ValidationPattern pattern)
Provides validation rules for the pattern |
| Methods inherited from class com.atlassian.plugin.servlet.descriptors.BaseServletModuleDescriptor |
|---|
getInitParams, getPaths |
| Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
|---|
assertModuleClassImplements, checkPermissions, destroy, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hashCode, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, satisfiesMinJavaVersion, setPlugin, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.Comparator<ServletFilterModuleDescriptor> byWeight
| Constructor Detail |
|---|
public ServletFilterModuleDescriptor(ModuleFactory moduleFactory,
ServletModuleManager servletModuleManager)
moduleFactory - The module factoryservletModuleManager - The module manager| Method Detail |
|---|
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<javax.servlet.Filter>init in class BaseServletModuleDescriptor<javax.servlet.Filter>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.protected void provideValidationRules(ValidationPattern pattern)
AbstractModuleDescriptor
provideValidationRules in class BaseServletModuleDescriptor<javax.servlet.Filter>pattern - The validation patternpublic void enabled()
AbstractModuleDescriptor
enabled in interface StateAwareenabled in class AbstractModuleDescriptor<javax.servlet.Filter>public void disabled()
AbstractModuleDescriptor
disabled in interface StateAwaredisabled in class AbstractModuleDescriptor<javax.servlet.Filter>public javax.servlet.Filter getModule()
ModuleDescriptor
getModule in interface ModuleDescriptor<javax.servlet.Filter>getModule in class AbstractModuleDescriptor<javax.servlet.Filter>ModuleDescriptor.getModuleClass()public FilterLocation getLocation()
public int getWeight()
public java.util.Set<FilterDispatcherCondition> getDispatcherConditions()
REQUEST, FORWARD, INCLUDE or ERROR.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||