use of org.apache.karaf.features.internal.service.BundleInstallSupport.FrameworkInfo in project karaf by apache.
the class FeaturesServiceImpl method getDeploymentState.
private Deployer.DeploymentState getDeploymentState(State state) throws Exception {
Deployer.DeploymentState dstate = new Deployer.DeploymentState();
dstate.state = state;
FrameworkInfo info = installSupport.getInfo();
dstate.serviceBundle = info.ourBundle;
dstate.initialBundleStartLevel = info.initialBundleStartLevel;
dstate.currentStartLevel = info.currentStartLevel;
dstate.bundles = info.bundles;
// Features
dstate.features = new HashMap<>();
for (Map<String, Feature> m : getFeatures().values()) {
for (Feature feature : m.values()) {
String id = feature.getId();
dstate.features.put(id, feature);
}
}
RegionDigraph regionDigraph = installSupport.getDiGraphCopy();
dstate.bundlesPerRegion = DigraphHelper.getBundlesPerRegion(regionDigraph);
dstate.filtersPerRegion = DigraphHelper.getPolicies(regionDigraph);
return dstate;
}
use of org.apache.karaf.features.internal.service.BundleInstallSupport.FrameworkInfo in project karaf by apache.
the class FeaturesServiceImplTest method createTestFeatureService.
private FeaturesServiceImpl createTestFeatureService() {
FeaturesServiceConfig cfg = new FeaturesServiceConfig();
BundleInstallSupport installSupport = EasyMock.niceMock(BundleInstallSupport.class);
FrameworkInfo dummyInfo = new FrameworkInfo();
expect(installSupport.getInfo()).andReturn(dummyInfo).atLeastOnce();
EasyMock.replay(installSupport);
final FeaturesServiceImpl featureService = new FeaturesServiceImpl(new Storage(), null, null, this.resolver, installSupport, null, cfg);
return featureService;
}
use of org.apache.karaf.features.internal.service.BundleInstallSupport.FrameworkInfo in project karaf by apache.
the class FeaturesServiceTest method dummyInfo.
private FrameworkInfo dummyInfo() {
FrameworkInfo info = new FrameworkInfo();
info.initialBundleStartLevel = 50;
info.currentStartLevel = 100;
return info;
}
Aggregations