public OSGiCapability removeCapability(String id) { synchronized (capabilities) { for (Iterator<OSGiCapability> it = capabilities.iterator(); it.hasNext(); ) { OSGiCapability module = it.next(); if (module.getIdentifier().equals(id)) { it.remove(); notifyObservers(new ChangeEvent(ChangeType.CAPABILITY, true, id)); return module; } } return null; } }
public OSGiCapability removeCapability(String id) { synchronized (capabilities) { for (Iterator<OSGiCapability> it = capabilities.iterator(); it.hasNext(); ) { OSGiCapability module = it.next(); if (module.getIdentifier().equals(id)) { it.remove(); notifyObservers(new ChangeEvent(ChangeType.CAPABILITY, true, id)); return module; } } return null; } }
public void addCapability(OSGiCapability module) { capabilities.add(module); notifyObservers(new ChangeEvent(ChangeType.CAPABILITY, false, module.getIdentifier().toString())); }
private boolean installInitialModuleCapability(OSGiCapability configcap) throws Exception { String identifier = configcap.getIdentifier(); if (isValidModuleIdentifier(identifier)) { ModuleIdentifier moduleId = ModuleIdentifier.fromString(identifier);
private Module installInitialModuleCapability(OSGiCapability configcap) throws Exception { String identifier = configcap.getIdentifier(); ModuleIdentifier moduleId = ModuleIdentifier.fromString(identifier);
while (iterator.hasNext()) { OSGiCapability configcap = iterator.next(); String identifier = configcap.getIdentifier(); if (isValidModuleIdentifier(identifier)) { try { String identifier = configcap.getIdentifier(); try { Deployment dep = getInitialBundleDeployment(configcap);
private Deployment getInitialBundleDeployment(OSGiCapability configcap) throws Exception { String identifier = configcap.getIdentifier(); Integer level = configcap.getStartLevel();
private Deployment getInitialBundleDeployment(OSGiCapability configcap) throws Exception { String identifier = configcap.getIdentifier(); Integer level = configcap.getStartLevel();
@Override public void start(StartContext context) throws StartException { // Start the module capabilities that have a start level assigned BundleManager bundleManager = injectedBundleManager.getValue(); for (OSGiCapability modcap : modulecaps) { if (modcap.getStartLevel() != null) { String identifier = modcap.getIdentifier(); XBundle bundle = bundleManager.getBundleByLocation(identifier); try { bundle.start(Bundle.START_ACTIVATION_POLICY); } catch (BundleException ex) { LOGGER.errorCannotStartBundle(ex, bundle); } } } // Start the bundle capabilities super.start(context); } }
@Override public void start(StartContext context) throws StartException { // Start the module capabilities that have a start level assigned BundleManager bundleManager = injectedBundleManager.getValue(); for (OSGiCapability modcap : modulecaps) { if (modcap.getStartLevel() != null) { String identifier = modcap.getIdentifier(); XBundle bundle = bundleManager.getBundleByLocation(identifier); try { bundle.start(Bundle.START_ACTIVATION_POLICY); } catch (BundleException ex) { LOGGER.errorCannotStartBundle(ex, bundle); } } } // Start the bundle capabilities super.start(context); } }
public void addCapability(OSGiCapability module) { capabilities.add(module); notifyObservers(new ChangeEvent(ChangeType.CAPABILITY, false, module.getIdentifier().toString())); }