public class PropertiesRoleMappingListener extends java.lang.Object implements LifecycleListener
LifecycleListener that will populate the context's role mapping from a properties file.
This listener must only be nested within Context elements.
The keys represent application roles (e.g., admin, user, uservisor, etc.) while the values represent technical roles
(e.g., DNs, SIDs, UUIDs, etc.). A key can also be prefixed if, e.g., the properties file contains generic
application configuration as well: app-roles..
Note: The default value for the roleMappingFile is webapp:/WEB-INF/role-mapping.properties.
| Constructor and Description |
|---|
PropertiesRoleMappingListener() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getKeyPrefix()
Gets the prefix to filter from property keys.
|
java.lang.String |
getRoleMappingFile()
Gets the path to the role mapping properties file.
|
void |
lifecycleEvent(LifecycleEvent event)
Acknowledge the occurrence of the specified event.
|
void |
setKeyPrefix(java.lang.String keyPrefix)
Sets the prefix to filter from property keys.
|
void |
setRoleMappingFile(java.lang.String roleMappingFile)
Sets the path to the role mapping properties file.
|
public void setRoleMappingFile(java.lang.String roleMappingFile)
webapp: and whatever
ConfigFileLoader supports.roleMappingFile - the role mapping properties file to load fromjava.lang.NullPointerException - if roleMappingFile is nulljava.lang.IllegalArgumentException - if roleMappingFile is emptypublic java.lang.String getRoleMappingFile()
public void setKeyPrefix(java.lang.String keyPrefix)
keyPrefix - the properties key prefixpublic java.lang.String getKeyPrefix()
public void lifecycleEvent(LifecycleEvent event)
LifecycleListenerlifecycleEvent in interface LifecycleListenerevent - LifecycleEvent that has occurredCopyright © 2000-2024 Apache Software Foundation.
Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo are either registered trademarks or trademarks of the Apache Software Foundation.