Package org.apache.tomcat.util.digester
Class EnvironmentPropertySource
- java.lang.Object
- 
- org.apache.tomcat.util.digester.EnvironmentPropertySource
 
- 
- All Implemented Interfaces:
- IntrospectionUtils.PropertySource,- IntrospectionUtils.SecurePropertySource
 - Direct Known Subclasses:
- Digester.EnvironmentPropertySource
 
 public class EnvironmentPropertySource extends java.lang.Object implements IntrospectionUtils.SecurePropertySource AIntrospectionUtils.SecurePropertySourcethat uses environment variables to resolve expressions.Usage example: Configure the certificate with environment variables.
 How to configure:<SSLHostConfig> <Certificate certificateKeyFile="${CERTIFICATE_KEY_FILE}" certificateFile="${CERTIFICATE_FILE}" certificateChainFile="${CERTIFICATE_CHAIN_FILE}" type="RSA" /> </SSLHostConfig>
 or add this toecho "org.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.EnvironmentPropertySource" >> conf/catalina.propertiesCATALINA_OPTS
 NOTE: When configured the PropertySource for resolving expressions from system properties is still active.-Dorg.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.EnvironmentPropertySource
- 
- 
Constructor SummaryConstructors Constructor Description EnvironmentPropertySource()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetProperty(java.lang.String key)java.lang.StringgetProperty(java.lang.String key, java.lang.ClassLoader classLoader)Obtain a property value, checking that code associated with the provided class loader has permission to access the property.
 
- 
- 
- 
Method Detail- 
getPropertypublic java.lang.String getProperty(java.lang.String key) - Specified by:
- getPropertyin interface- IntrospectionUtils.PropertySource
 
 - 
getPropertypublic java.lang.String getProperty(java.lang.String key, java.lang.ClassLoader classLoader)Description copied from interface:IntrospectionUtils.SecurePropertySourceObtain a property value, checking that code associated with the provided class loader has permission to access the property. If theclassLoaderisnullor ifclassLoaderdoes not implementPermissionCheckthen the property value will be looked up without a call toPermissionCheck.check(java.security.Permission)- Specified by:
- getPropertyin interface- IntrospectionUtils.SecurePropertySource
- Parameters:
- key- The key of the requested property
- classLoader- The class loader associated with the code that trigger the property lookup
- Returns:
- The property value or nullif it could not be found or ifPermissionCheck.check(java.security.Permission)fails
 
 
- 
 
-