public class ModuleFilterDefinition extends Object implements 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(String parameterName,
String parameterValue)
Adds a Parameter that should be passed in to initialize this Filter
|
String |
getFilterClass() |
String |
getFilterName() |
Map<String,String> |
getInitParameters() |
Module |
getModule() |
static 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(String filterClass) |
void |
setFilterName(String filterName) |
void |
setInitParameters(Map<String,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 String getFilterName()
public void setFilterName(String filterName)
-
- the name of the filterpublic String getFilterClass()
public void setFilterClass(String filterClass)
-
- the class name of the filterpublic Map<String,String> getInitParameters()
public void setInitParameters(Map<String,String> initParameters)
public void addInitParameter(String parameterName, String parameterValue)
parameterName
- - The name of the parameterparameterValue
- - The value of the parameterpublic static 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 LLC.. All Rights Reserved.