Package org.apache.catalina.core
Class PropertiesRoleMappingListener
- java.lang.Object
- 
- org.apache.catalina.core.PropertiesRoleMappingListener
 
- 
- All Implemented Interfaces:
- LifecycleListener
 
 public class PropertiesRoleMappingListener extends java.lang.Object implements LifecycleListener Implementation ofLifecycleListenerthat will populate the context's role mapping from a properties file.This listener must only be nested within Contextelements.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 roleMappingFileiswebapp:/WEB-INF/role-mapping.properties.
- 
- 
Constructor SummaryConstructors Constructor Description PropertiesRoleMappingListener()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetKeyPrefix()Gets the prefix to filter from property keys.java.lang.StringgetRoleMappingFile()Gets the path to the role mapping properties file.voidlifecycleEvent(LifecycleEvent event)Acknowledge the occurrence of the specified event.voidsetKeyPrefix(java.lang.String keyPrefix)Sets the prefix to filter from property keys.voidsetRoleMappingFile(java.lang.String roleMappingFile)Sets the path to the role mapping properties file.
 
- 
- 
- 
Method Detail- 
setRoleMappingFilepublic void setRoleMappingFile(java.lang.String roleMappingFile) Sets the path to the role mapping properties file. You can use protocolwebapp:and whateverConfigFileLoadersupports.- Parameters:
- roleMappingFile- the role mapping properties file to load from
- Throws:
- java.lang.NullPointerException- if roleMappingFile is null
- java.lang.IllegalArgumentException- if roleMappingFile is empty
 
 - 
getRoleMappingFilepublic java.lang.String getRoleMappingFile() Gets the path to the role mapping properties file.- Returns:
- the path to the role mapping properties file
 
 - 
setKeyPrefixpublic void setKeyPrefix(java.lang.String keyPrefix) Sets the prefix to filter from property keys. All other keys will be ignored which do not have the prefix.- Parameters:
- keyPrefix- the properties key prefix
 
 - 
getKeyPrefixpublic java.lang.String getKeyPrefix() Gets the prefix to filter from property keys.- Returns:
- the properties key prefix
 
 - 
lifecycleEventpublic void lifecycleEvent(LifecycleEvent event) Description copied from interface:LifecycleListenerAcknowledge the occurrence of the specified event.- Specified by:
- lifecycleEventin interface- LifecycleListener
- Parameters:
- event- LifecycleEvent that has occurred
 
 
- 
 
-