Examples of DictionaryPropertyResolver


Examples of org.ops4j.util.property.DictionaryPropertyResolver

        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

Examples of org.ops4j.util.property.DictionaryPropertyResolver

        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

Examples of org.ops4j.util.property.DictionaryPropertyResolver

     */
    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
Copyright © 2018 www.massapi.com. 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.