Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2011-05-06 10:22:59 -0400
committerChristopher Frost2011-05-06 10:22:59 -0400
commit1caefbdd180cefad9f6472b6c2307794394a4c8b (patch)
treecfd38c9fda7f60521d8f87e2ade3e3d442178a59 /org.eclipse.virgo.kernel.shell
parent9d9f0a38e18382a0a8b85df86558006e45a1f14d (diff)
downloadorg.eclipse.virgo.kernel-1caefbdd180cefad9f6472b6c2307794394a4c8b.tar.gz
org.eclipse.virgo.kernel-1caefbdd180cefad9f6472b6c2307794394a4c8b.tar.xz
org.eclipse.virgo.kernel-1caefbdd180cefad9f6472b6c2307794394a4c8b.zip
Adding a test for the correct lookup of artifact dependancies by the model
Diffstat (limited to 'org.eclipse.virgo.kernel.shell')
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardStateService.java28
1 files changed, 1 insertions, 27 deletions
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardStateService.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardStateService.java
index d8a1d905..f8282614 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardStateService.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardStateService.java
@@ -24,7 +24,6 @@ import org.eclipse.virgo.kernel.osgi.quasi.QuasiFramework;
import org.eclipse.virgo.kernel.osgi.quasi.QuasiFrameworkFactory;
import org.eclipse.virgo.kernel.osgi.quasi.QuasiImportPackage;
import org.eclipse.virgo.kernel.osgi.quasi.QuasiResolutionFailure;
-import org.eclipse.virgo.kernel.osgi.region.Region;
import org.eclipse.virgo.kernel.osgi.region.RegionDigraph;
import org.eclipse.virgo.kernel.shell.state.QuasiLiveService;
import org.eclipse.virgo.kernel.shell.state.QuasiPackage;
@@ -43,25 +42,16 @@ import org.springframework.util.AntPathMatcher;
*/
final public class StandardStateService implements StateService {
- private static final String REGION_KERNEL = "org.eclipse.virgo.region.kernel";
-
private final QuasiFrameworkFactory quasiFrameworkFactory;
private final BundleContext bundleContext;
private final RegionDigraph regionDigraph;
- private final Region kernelRegion;
-
public StandardStateService(QuasiFrameworkFactory quasiFrameworkFactory, BundleContext bundleContext, RegionDigraph regionDigraph) {
this.quasiFrameworkFactory = quasiFrameworkFactory;
this.bundleContext = bundleContext;
this.regionDigraph = regionDigraph;
- this.kernelRegion = getKernelRegion(regionDigraph);
- }
-
- private Region getKernelRegion(RegionDigraph regionDigraph) {
- return regionDigraph.getRegion(REGION_KERNEL);
}
/**
@@ -69,23 +59,7 @@ final public class StandardStateService implements StateService {
*/
@Override
public List<QuasiBundle> getAllBundles(File source) {
- List<QuasiBundle> bundles = this.getQuasiFramework(source).getBundles();
- if (source == null) {
- List<QuasiBundle> userRegionBundles = new ArrayList<QuasiBundle>();
- for (QuasiBundle bundle : bundles) {
- long bundleId = bundle.getBundleId();
- if (bundleId == 0L || !this.kernelRegion.equals(getRegion(bundleId))) {
- userRegionBundles.add(bundle);
- }
- }
- return userRegionBundles;
- } else {
- return bundles;
- }
- }
-
- private Region getRegion(long bundleId) {
- return this.regionDigraph.getRegion(bundleId);
+ return this.getQuasiFramework(source).getBundles();
}
/**

Back to the top