Examples of PropertiesPropertyResolver


Examples of org.ops4j.util.property.PropertiesPropertyResolver

    @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

Examples of org.ops4j.util.property.PropertiesPropertyResolver

    @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

Examples of org.ops4j.util.property.PropertiesPropertyResolver

    @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

Examples of org.ops4j.util.property.PropertiesPropertyResolver

     *            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

Examples of org.ops4j.util.property.PropertiesPropertyResolver

                    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

Examples of org.ops4j.util.property.PropertiesPropertyResolver

        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

Examples of org.ops4j.util.property.PropertiesPropertyResolver

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

Examples of org.ops4j.util.property.PropertiesPropertyResolver

            }
            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

Examples of org.switchyard.common.property.PropertiesPropertyResolver

    public void testReplaceCustomProperties() {
        Properties custom = new Properties();
        custom.setProperty("foo", "bar");
        final String original = "I have a ${foo} but not a ${baz:wiz}.";
        final String expected = "I have a bar but not a wiz.";
        final String actual = Strings.replaceProperties(original, new PropertiesPropertyResolver(custom));
        Assert.assertEquals(expected, actual);
    }
View Full Code Here

Examples of org.switchyard.common.property.PropertiesPropertyResolver

        Properties custom = new Properties();
        custom.setProperty("foo", "bar");
        custom.setProperty("emotion", "loves");
        final String original = "${user.name} has a ${foo}, and he ${emotion:hates} it, unlike his ${sibling:sister}.";
        final String expected = System.getProperty("user.name") + " has a bar, and he loves it, unlike his sister.";
        final String actual = Strings.replaceProperties(original, SystemPropertyResolver.INSTANCE, new PropertiesPropertyResolver(custom));
        Assert.assertEquals(expected, actual);
    }
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.