Package org.ops4j.util.property

Examples of org.ops4j.util.property.PropertiesPropertyResolver


public class Handler extends URLStreamHandler  {
    @Override
    protected URLConnection openConnection( final URL url ) throws IOException {
        final MavenConfigurationImpl config = new MavenConfigurationImpl(
                new PropertiesPropertyResolver( System.getProperties() ), "org.ops4j.pax.url.mvn");

        config.setSettings( new MavenSettingsImpl( config.getSettingsFileUrl(), config.useFallbackRepositories() ) );
        return new Connection( url, config );
    }
View Full Code Here


        // no-op
    }

    public static MavenConfigurationImpl createConfig() {
        final MavenConfigurationImpl config = new MavenConfigurationImpl(
                new PropertiesPropertyResolver( System.getProperties() ), "org.ops4j.pax.url.mvn");

        config.setSettings( new MavenSettingsImpl( config.getSettingsFileUrl(), config.useFallbackRepositories() ) );
        return config;
    }
View Full Code Here

    @Override
    protected URLConnection openConnection( final URL url )
        throws IOException
    {
        final ConfigurationImpl config = new ConfigurationImpl(
            new PropertiesPropertyResolver( System.getProperties() )
        );
        return new WarReferenceConnection( url, config );
    }
View Full Code Here

    @Override
    protected URLConnection openConnection( final URL url )
        throws IOException
    {
        final ConfigurationImpl config = new ConfigurationImpl(
            new PropertiesPropertyResolver( System.getProperties() )
        );
        return new WebBundleConnection( url, config );
   }
View Full Code Here

    @Override
    protected URLConnection openConnection( final URL url )
        throws IOException
    {
        final ConfigurationImpl config = new ConfigurationImpl(
            new PropertiesPropertyResolver( System.getProperties() )
        );
        return new WarConnection( url, config );
    }
View Full Code Here

     *            the {@code URL}
     * @return the {@code URLConnection}
     * @throws IOException
     */
    public URLConnection create(final URL url) throws IOException {
        final PropertiesPropertyResolver systemProperties =
                new PropertiesPropertyResolver(System.getProperties());

        final PropertiesPropertyResolver configuredProperties =
                new PropertiesPropertyResolver(configuration, systemProperties);

        final MavenConfigurationImpl config =
                new MavenConfigurationImpl(configuredProperties, ServiceConstants.PID);

        config.setSettings(new MavenSettingsImpl(config.getSettingsFileUrl(), config.useFallbackRepositories()));
View Full Code Here

                    combined.putAll(defaultProperties);
                    combined.putAll(systemProperties);
                    if (properties != null) {
                        combined.putAll(properties);
                    }
                    config = new MavenConfigurationImpl(new PropertiesPropertyResolver(combined), ServiceConstants.PID);
                    config.setSettings( new MavenSettingsImpl( config.getSettingsFileUrl(), config.useFallbackRepositories() ) );
                }
                resolver = new AetherBasedResolver(config);
            }
            File file = resolver.resolveFile(groupId, artifactId, classifier, "jar", version);
View Full Code Here

        NullArgumentException.validateNotNull(propertyResolver, "PropertyResolver");
        this.propertyResolver = propertyResolver;
    }

    public static ConfigurationImpl newInstance() {
        PropertiesPropertyResolver resolver = new PropertiesPropertyResolver(System.getProperties());
        return new ConfigurationImpl(resolver);
    }
View Full Code Here

     * @param platformBuilder concrete platform builder; mandatory
     */
    public ObservablePlatform(FluentPlatformBuilder platformBuilder) {
        super(platformBuilder);
        this.platformBuilder = platformBuilder;
        setResolver(new PropertiesPropertyResolver(null));
    }
View Full Code Here

            }
            InputStream is = (url == null) ? null : url.openStream();
            if (is != null) {
                props.load(is);
                is.close();
                resolver = new PropertiesPropertyResolver(props);
            }
            resolver = new PropertiesPropertyResolver(System.getProperties(), resolver);
        }
        catch (MalformedURLException exc) {
            throw new TestContainerException(exc);
        }
        catch (IOException exc) {
View Full Code Here

TOP

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

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.