private static boolean getIsSubstitutorEnabled ( final BootstrapConfiguration bootstrapConfig ) { final String ENABLE_SUBSTITUTOR_CONFIG_KEY = "CAF_CONFIG_ENABLE_SUBSTITUTOR" ; final boolean ENABLE_SUBSTITUTOR_CONFIG_DEFAULT = true ; // Return the default if the setting is not configured if ( ! bootstrapConfig . isConfigurationPresent ( ENABLE_SUBSTITUTOR_CONFIG_KEY ) ) { return ENABLE_SUBSTITUTOR_CONFIG_DEFAULT ; } // Return the configured setting. // The ConfigurationException should never happen since isConfigurationPresent() has already been called. try { return bootstrapConfig . getConfigurationBoolean ( ENABLE_SUBSTITUTOR_CONFIG_KEY ) ; } catch ( final ConfigurationException ex ) { throw new RuntimeException ( ex ) ; } }
Checks whether the string substitution functionality should be enabled .