Search in sources :

Example 1 with SystemEnvSymbolProvider

use of org.apache.tapestry5.ioc.internal.services.SystemEnvSymbolProvider in project tapestry-5 by apache.

the class TapestryIOCModule method setupStandardSymbolProviders.

/**
 * <dl>
 * <dt>SystemProperties</dt>
 * <dd>Exposes JVM System properties as symbols (currently case-sensitive)</dd>
 * <dt>EnvironmentVariables</dt>
 * <dd>Exposes environment variables as symbols (adding a "env." prefix)</dd>
 * <dt>ApplicationDefaults</dt>
 * <dd>Values contributed to @{@link SymbolProvider} @{@link ApplicationDefaults}</dd>
 * <dt>FactoryDefaults</dt>
 * <dd>Values contributed to @{@link SymbolProvider} @{@link FactoryDefaults}</dd>
 * </dl>
 */
@Contribute(SymbolSource.class)
public static void setupStandardSymbolProviders(OrderedConfiguration<SymbolProvider> configuration, @ApplicationDefaults SymbolProvider applicationDefaults, @FactoryDefaults SymbolProvider factoryDefaults) {
    configuration.add("SystemProperties", new SystemPropertiesSymbolProvider(), "before:*");
    configuration.add("EnvironmentVariables", new SystemEnvSymbolProvider());
    configuration.add("ApplicationDefaults", applicationDefaults);
    configuration.add("FactoryDefaults", factoryDefaults);
}
Also used : SystemEnvSymbolProvider(org.apache.tapestry5.ioc.internal.services.SystemEnvSymbolProvider) SystemPropertiesSymbolProvider(org.apache.tapestry5.ioc.internal.services.SystemPropertiesSymbolProvider)

Aggregations

SystemEnvSymbolProvider (org.apache.tapestry5.ioc.internal.services.SystemEnvSymbolProvider)1 SystemPropertiesSymbolProvider (org.apache.tapestry5.ioc.internal.services.SystemPropertiesSymbolProvider)1