Package org.jboss.gravia.runtime.spi

Examples of org.jboss.gravia.runtime.spi.SubstitutionPropertiesProvider


    public OSGiPropertiesProvider(BundleContext bundleContext) {
        this(bundleContext, null);
    }

    public OSGiPropertiesProvider(BundleContext bundleContext, String environmentVariablePrefix) {
        this.delegate = new SubstitutionPropertiesProvider(new CompositePropertiesProvider(
                new BundleContextPropertiesProvider(bundleContext),
                new EnvPropertiesProvider(environmentVariablePrefix)
        ));
    }
View Full Code Here


    public OSGiPropertiesProvider(BundleContext bundleContext, boolean systemPropertyDelegation) {
        this(bundleContext, systemPropertyDelegation, null);
    }

    public OSGiPropertiesProvider(BundleContext bundleContext, boolean systemPropertyDelegation, String environmentVariablePrefix) {
        this.delegate = new SubstitutionPropertiesProvider(new CompositePropertiesProvider(
                new BundleContextPropertiesProvider(bundleContext),
                systemPropertyDelegation ? new SystemPropertiesProvider() : new MapPropertiesProvider(),
                new EnvPropertiesProvider(environmentVariablePrefix)
        ));
    }
View Full Code Here

    public OSGiPropertiesProvider(BundleContext bundleContext, boolean systemPropertyDelegation) {
        this(bundleContext, systemPropertyDelegation, null);
    }

    public OSGiPropertiesProvider(BundleContext bundleContext, boolean systemPropertyDelegation, String environmentVariablePrefix) {
        this.delegate = new SubstitutionPropertiesProvider(new CompositePropertiesProvider(
                new BundleContextPropertiesProvider(bundleContext),
                systemPropertyDelegation ? new SystemPropertiesProvider() : new MapPropertiesProvider(),
                new EnvPropertiesProvider(environmentVariablePrefix)
        ));
    }
View Full Code Here

    public OSGiPropertiesProvider(BundleContext bundleContext, String environmentVariablePrefix) {
        PropertiesProvider system = new SystemPropertiesProvider();
        PropertiesProvider env =  environmentVariablePrefix != null ? new EnvPropertiesProvider(environmentVariablePrefix) : new EnvPropertiesProvider(system);

        this.delegate = new SubstitutionPropertiesProvider(
                new CompositePropertiesProvider(
                        new BundleContextPropertiesProvider(bundleContext),
                        system,
                        env
                )
View Full Code Here

        };

        final PropertiesProvider configurationProvider = new MapPropertiesProvider((Map<String, Object>) configuration);
        final PropertiesProvider[] propertiesProviders = new PropertiesProvider[]{configurationProvider, runtimeProperties};

        PropertiesProvider provider = new SubstitutionPropertiesProvider(propertiesProviders);

        for (Map.Entry<String, ?> entry : configuration.entrySet()) {
            String key = entry.getKey();
            Object value = provider.getProperty(key);
            result.put(key, value);
        }
        ConfigInjection.applyConfiguration(result, target, ignorePrefix);
        return result;
    }
View Full Code Here

public class FabricPropertiesProvider extends AbstractPropertiesProvider {

    private final PropertiesProvider delegate;

    public FabricPropertiesProvider(ServletContext servletContext) {
        delegate = new SubstitutionPropertiesProvider(
                new CompositePropertiesProvider(
                        new ServletContextPropertiesProvider(servletContext),
                        new SystemPropertiesProvider(),
                        new EnvPropertiesProvider(RuntimeProperties.DEFAULT_ENV_PREFIX)
                )
View Full Code Here

TOP

Related Classes of org.jboss.gravia.runtime.spi.SubstitutionPropertiesProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.