public class ModuleFilterDefinition
extends java.lang.Object
implements java.io.Serializable
<filter> <filter-name>MyFilterName</filter-name> <filter-class>Fully qualified classname of the Filter class</filter-class> <init-param> <param-name>filterParameterName1</param-name> <param-value>filterParameterValue1</param-value> </init-param> </filter>
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Constructor and Description |
---|
ModuleFilterDefinition(Module module)
Default constructor, requires a Module
|
Modifier and Type | Method and Description |
---|---|
void |
addInitParameter(java.lang.String parameterName,
java.lang.String parameterValue)
Adds a Parameter that should be passed in to initialize this Filter
|
java.lang.String |
getFilterClass() |
java.lang.String |
getFilterName() |
java.util.Map<java.lang.String,java.lang.String> |
getInitParameters() |
Module |
getModule() |
static java.util.List<ModuleFilterDefinition> |
retrieveFilterDefinitions(Module module)
Static method to parse through a Module's configuration file and return a List of
ModuleFilterDefinition objects for which there are configuration elements.
|
void |
setFilterClass(java.lang.String filterClass) |
void |
setFilterName(java.lang.String filterName) |
void |
setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters)
#param - A map of parameters to use to initialize the filter
|
void |
setModule(Module module) |
public static final long serialVersionUID
public ModuleFilterDefinition(Module module)
module
- - The Module to use to construct this ModuleFilterDefinition
public java.lang.String getFilterName()
public void setFilterName(java.lang.String filterName)
-
- the name of the filterpublic java.lang.String getFilterClass()
public void setFilterClass(java.lang.String filterClass)
-
- the class name of the filterpublic java.util.Map<java.lang.String,java.lang.String> getInitParameters()
public void setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters)
public void addInitParameter(java.lang.String parameterName, java.lang.String parameterValue)
parameterName
- - The name of the parameterparameterValue
- - The value of the parameterpublic static java.util.List<ModuleFilterDefinition> retrieveFilterDefinitions(Module module) throws ModuleException
<filter> <filter-name>MyFilterName</filter-name> <filter-class>Fully qualified classname of the Filter class</filter-class> <init-param> <param-name>filterParameterName1</param-name> <param-value>filterParameterValue1</param-value> </init-param> </filter>
module
- - The Module
for which to retrieve filter the defined
ModuleFilterDefinition
sModuleFilterDefinition
s that have been defined for the passed
Module
ModuleException
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.