Examples of listFeatures()


Examples of org.apache.felix.karaf.features.internal.FeaturesServiceImpl.listFeatures()

        FeaturesServiceImpl svc = new FeaturesServiceImpl();
        svc.setPreferences(preferencesService);
        svc.setBundleContext(bundleContext);
        svc.addRepository(uri);

        svc.installFeatures(new CopyOnWriteArraySet<Feature>(Arrays.asList(svc.listFeatures())),
                            EnumSet.of(FeaturesService.Option.ContinueBatchOnFailure, FeaturesService.Option.NoCleanIfFailure));

//        verify(preferencesService, prefs, repositoriesNode, featuresNode, bundleContext, installedBundle1, installedBundle2);
    }
View Full Code Here

Examples of org.apache.felix.karaf.features.internal.FeaturesServiceImpl.listFeatures()

        FeaturesServiceImpl svc = new FeaturesServiceImpl();
        svc.setPreferences(preferencesService);
        svc.setBundleContext(bundleContext);
        svc.addRepository(uri);

        svc.installFeatures(new CopyOnWriteArraySet<Feature>(Arrays.asList(svc.listFeatures())),
                            EnumSet.of(FeaturesService.Option.ContinueBatchOnFailure));

//        verify(preferencesService, prefs, repositoriesNode, featuresNode, bundleContext, installedBundle1, installedBundle2);
    }
View Full Code Here

Examples of org.apache.felix.karaf.features.internal.FeaturesServiceImpl.listFeatures()

        svc.setPreferences(preferencesService);
        svc.setBundleContext(bundleContext);
        svc.addRepository(uri);

        try {
            List<Feature> features = Arrays.asList(svc.listFeatures());
            Collections.reverse(features);
            svc.installFeatures(new CopyOnWriteArraySet<Feature>(features),
                                EnumSet.of(FeaturesService.Option.NoCleanIfFailure));
            fail("Call should have thrown an exception");
        } catch (MalformedURLException e) {
View Full Code Here

Examples of org.apache.felix.karaf.features.internal.FeaturesServiceImpl.listFeatures()

        svc.setPreferences(preferencesService);
        svc.setBundleContext(bundleContext);
        svc.addRepository(uri);

        try {
            List<Feature> features = Arrays.asList(svc.listFeatures());
            Collections.reverse(features);
            svc.installFeatures(new CopyOnWriteArraySet<Feature>(features),
                                EnumSet.noneOf(FeaturesService.Option.class));
            fail("Call should have thrown an exception");
        } catch (MalformedURLException e) {
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService.listFeatures()

                outputStreamWriter.write(repo.getURI() + " (" + repo.getName() + ")\n");
            }

            // list features
            outputStreamWriter.write("\nfeatures:\n");
            for (Feature feature : features.listFeatures()) {
                outputStreamWriter.write(feature.getName() + " " + feature.getVersion());
                outputStreamWriter.write(" installed: " + features.isInstalled(feature));
                outputStreamWriter.write("\nBundles:\n");
                for (BundleInfo bundle : feature.getBundles()) {
                    outputStreamWriter.write("\t" + bundle.getLocation());
View Full Code Here

Examples of org.apache.karaf.features.FeaturesService.listFeatures()

            FeaturesTest.createMockFeatureWithOptionalBundles("feature-b",
                                                              "mvn:required/bundle2/1.0",
                                                              "mvn:optional/bundle2/1.0");

        Feature[] features = new Feature[] { feature1, feature2 };
        expect(service.listFeatures()).andReturn(features).anyTimes();
        replay(service);
        return service;
    }

}
View Full Code Here

Examples of org.apache.karaf.features.internal.FeaturesServiceImpl.listFeatures()

        ignoreRefreshes(bundleManager);

        replay(bundleManager);
        FeaturesServiceImpl svc = new FeaturesServiceImpl(bundleManager);
        svc.addRepository(uri);
        svc.installFeatures(new CopyOnWriteArraySet<Feature>(Arrays.asList(svc.listFeatures())),
                            EnumSet.of(FeaturesService.Option.ContinueBatchOnFailure, FeaturesService.Option.NoCleanIfFailure));
        verify(bundleManager);
    }
   
    @Test
View Full Code Here

Examples of org.apache.karaf.features.internal.FeaturesServiceImpl.listFeatures()

        ignoreRefreshes(bundleManager);

        replay(bundleManager);
        FeaturesServiceImpl svc = new FeaturesServiceImpl(bundleManager);
        svc.addRepository(uri);
        svc.installFeatures(new CopyOnWriteArraySet<Feature>(Arrays.asList(svc.listFeatures())),
                            EnumSet.of(FeaturesService.Option.ContinueBatchOnFailure));
        verify(bundleManager);
    }

    @Test
View Full Code Here

Examples of org.apache.karaf.features.internal.FeaturesServiceImpl.listFeatures()

       
        replay(bundleManager);
        FeaturesServiceImpl svc = new FeaturesServiceImpl(bundleManager);
        svc.addRepository(uri);
        try {
            List<Feature> features = Arrays.asList(svc.listFeatures());
            Collections.reverse(features);
            svc.installFeatures(new CopyOnWriteArraySet<Feature>(features),
                                EnumSet.of(FeaturesService.Option.NoCleanIfFailure));
            fail("Call should have thrown an exception");
        } catch (MalformedURLException e) {
View Full Code Here

Examples of org.apache.karaf.features.internal.FeaturesServiceImpl.listFeatures()

        replay(bundleManager);
        FeaturesServiceImpl svc = new FeaturesServiceImpl(bundleManager);
        svc.addRepository(uri);
        try {
            List<Feature> features = Arrays.asList(svc.listFeatures());
            Collections.reverse(features);
            svc.installFeatures(new CopyOnWriteArraySet<Feature>(features),
                                EnumSet.noneOf(FeaturesService.Option.class));
            fail("Call should have thrown an exception");
        } catch (MalformedURLException e) {
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.