Package org.ops4j.util.property

Examples of org.ops4j.util.property.DictionaryPropertyResolver


            Configuration configuration = configurationAdmin.getConfiguration(ServiceConstants.PID);
            if (configuration != null) {
                @SuppressWarnings("rawtypes")
        Dictionary dictonary = configuration.getProperties();
                if (dictonary != null) {
                    DictionaryPropertyResolver resolver = new DictionaryPropertyResolver(dictonary);
                    mavenConfiguration = new MavenConfigurationImpl(resolver, ServiceConstants.PID);
                }
            }
        } catch (IOException e) {
            logger.error("Error retrieving maven configuration", e);
View Full Code Here


        try {
            Configuration configuration = configurationAdmin.getConfiguration(ServiceConstants.PID);
            if (configuration != null) {
                Dictionary dictonary = configuration.getProperties();
                if (dictonary != null) {
                    DictionaryPropertyResolver resolver = new DictionaryPropertyResolver(dictonary);
                    mavenConfiguration = new MavenConfigurationImpl(resolver, ServiceConstants.PID);
                }
            }
        } catch (IOException e) {
            logger.error("Error retrieving maven configuration",e);
View Full Code Here

        try {
            Configuration configuration = configurationAdmin.getConfiguration(ServiceConstants.PID);
            if (configuration != null) {
                Dictionary dictonary = configuration.getProperties();
                if (dictonary != null) {
                    DictionaryPropertyResolver resolver = new DictionaryPropertyResolver(dictonary);
                    mavenConfiguration = new MavenConfigurationImpl(resolver, ServiceConstants.PID);
                }
            }
        } catch (IOException e) {
            logger.error("Error retrieving maven configuration",e);
View Full Code Here

        try {
            Configuration configuration = configurationAdmin.getConfiguration(ServiceConstants.PID);
            if (configuration != null) {
                Dictionary dictonary = configuration.getProperties();
                if (dictonary != null) {
                    DictionaryPropertyResolver resolver = new DictionaryPropertyResolver(dictonary);
                    mavenConfiguration = new MavenConfigurationImpl(resolver, ServiceConstants.PID);
                }
            }
        } catch (IOException e) {
            logger.error("Error retrieving maven configuration",e);
View Full Code Here

        try {
            Configuration configuration = configurationAdmin.getConfiguration(ServiceConstants.PID);
            if (configuration != null) {
                Dictionary dictonary = configuration.getProperties();
                if (dictonary != null) {
                    DictionaryPropertyResolver resolver = new DictionaryPropertyResolver(dictonary);
                    mavenConfiguration = new MavenConfigurationImpl(resolver, ServiceConstants.PID);
                }
            }
        } catch (IOException e) {
            logger.error("Error retrieving maven configuration",e);
View Full Code Here

        try {
            Configuration configuration = configurationAdmin.getConfiguration(ServiceConstants.PID);
            if (configuration != null) {
                Dictionary dictonary = configuration.getProperties();
                if (dictonary != null) {
                    DictionaryPropertyResolver resolver = new DictionaryPropertyResolver(dictonary);
                    mavenConfiguration = new MavenConfigurationImpl(resolver, ServiceConstants.PID);
                }
            }
        } catch (IOException e) {
            logger.error("Error retrieving maven configuration",e);
View Full Code Here

        return new ConfigurationImpl(resolver);
    }

    public static ConfigurationImpl newInstance(ConfigurationAdmin admin, BundleContext context) {
        PropertyResolver resolver =
                new DictionaryPropertyResolver(getProperties(admin, ServiceConstants.PID),
                        new DictionaryPropertyResolver(getProperties(admin, "org.ops4j.pax.url.mvn"),
                                new BundleContextPropertyResolver(context)));

        return new ConfigurationImpl(resolver);
    }
View Full Code Here

        Properties properties = new Properties();
        properties.setProperty(ServiceConstants.PROPERTY_MAVEN_REPOSITORIES, "http://repo1,http://repo2");
        properties.setProperty(ServiceConstants.PROPERTY_LOCAL_MAVEN_REPOSITORY, "/home/test/.m2/repository");

        URL url = new URL("file:test");
        ConfigurationImpl configuration = new ConfigurationImpl(new DictionaryPropertyResolver(properties));

        // TODO: reimplement this test
//        FabConnection connection = new FabConnection(url, configuration, null);
//        assertArrayEquals(new String[]{"http://repo1", "http://repo2"}, connection.getResolver().getRepositories());
//        assertEquals("/home/test/.m2/repository", connection.getResolver().getLocalRepo());
View Full Code Here

     */
    public Configuration createConfiguration(PropertyResolver propertyResolver) {
        // we are not going to use the property resolver that we're being provided with, but we will build our own instead
        BundleContext context = Activator.getInstanceBundleContext();
        PropertyResolver resolver =
                new DictionaryPropertyResolver(getProperties(context, ServiceConstants.PID),
                        new DictionaryPropertyResolver(getProperties(context, "org.ops4j.pax.url.mvn"),
                                new BundleContextPropertyResolver(context)));

        return new ConfigurationImpl(resolver);
    }
View Full Code Here

TOP

Related Classes of org.ops4j.util.property.DictionaryPropertyResolver

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.