Set<XBundle> getBundles() { Set<XBundle> result = new HashSet<XBundle>(); XEnvironment env = injectedEnvironment.getValue(); for (Resource aux : env.getResources(XEnvironment.ALL_IDENTITY_TYPES)) { XBundle bundle = ((XBundleRevision) aux).getBundle(); if (bundle.getState() != Bundle.UNINSTALLED) result.add(bundle); } return Collections.unmodifiableSet(result); }
@Override public Set<XBundle> getBundles(Integer states) { Set<XBundle> result = new HashSet<XBundle>(); XEnvironment env = injectedEnvironment.getValue(); for (Resource aux : env.getResources(XEnvironment.ALL_IDENTITY_TYPES)) { XBundle bundle = ((XBundleRevision) aux).getBundle(); if (states == null || (bundle.getState() & states.intValue()) != 0) result.add(bundle); } return Collections.unmodifiableSet(result); }