Package org.ops4j.pax.exam.options

Examples of org.ops4j.pax.exam.options.UrlProvisionOption


    * @throws Exception
    */
   public static Option bundleSplitTestPackages() throws Exception {
      PaxURLUtils.registerURLHandlers();

      UrlProvisionOption splitCoreBundle = asStreamBundle(
            testJarAsStreamBundle("org.infinispan", "infinispan-core"),
            "assembly:%s!/org/infinispan/test/fwk/**");
      UrlProvisionOption splitJDBCBundle = asStreamBundle(
            testJarAsStreamBundle("org.infinispan", "infinispan-cachestore-jdbc"),
            "assembly:%s!/org/infinispan/test/fwk/**");

      WrappedUrlProvisionOption wrappedSplitCoreBundle = wrappedBundle(splitCoreBundle)
            .bundleSymbolicName("split-test-core")
            .instructions("Export-Package=org.infinispan.test.fwk;partial=true;mandatory:=partial");
      WrappedUrlProvisionOption wrappedSplitJDBCBundle = wrappedBundle(splitJDBCBundle)
            .bundleSymbolicName("split-test-jdbc")
            .instructions("Export-Package=org.infinispan.test.fwk;partial=true;mandatory:=partial");

      UrlProvisionOption wrappedSplitTestBundle = emptyBundle(
            "Bundle-SymbolicName=split-test",
            "Export-Package=org.infinispan.test.fwk",
            "Require-Bundle=split-test-core,split-test-jdbc");

      return composite(wrappedSplitCoreBundle,
View Full Code Here


        }
    }

    private static UrlProvisionOption bundle(final InputStream stream) throws IOException {
        Store<InputStream> store = StoreFactory.defaultStore();
        return new UrlProvisionOption(store.getLocation(store.store(stream)).toURL().toExternalForm());
    }
View Full Code Here

     */
    public static Option provision(final String... urls) {
        validateNotEmptyContent(urls, true, "URLs");
        final List<ProvisionOption<?>> options = new ArrayList<ProvisionOption<?>>();
        for (String url : urls) {
            options.add(new UrlProvisionOption(url));
        }
        return provision(options.toArray(new ProvisionOption[options.size()]));
    }
View Full Code Here

        try {
            Store<InputStream> store = StoreFactory.anonymousStore();
            Handle handle = store.store(stream);
            URL url = store.getLocation(handle).toURL();
            UrlProvisionOption option = new UrlProvisionOption(url.toExternalForm());
            return option;
        }
        catch (IOException e) {
            throw new IllegalArgumentException("A supplied stream blew up", e);
        }
View Full Code Here

     *            url as a string
     *
     * @return url reference
     */
    public static UrlProvisionOption url(final String url) {
        return new UrlProvisionOption(url);
    }
View Full Code Here

     *            bundle url
     *
     * @return url provisioning option
     */
    public static UrlProvisionOption bundle(final String url) {
        return new UrlProvisionOption(url);
    }
View Full Code Here

TOP

Related Classes of org.ops4j.pax.exam.options.UrlProvisionOption

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.