Object setProperty(String name, Object value) { try { if (value == null) return properties.remove(name); else return properties.put(name, value); } finally { notifyObservers(new ChangeEvent(ChangeType.PROPERTY, value == null, name)); } }
String setProperty(String name, String value) { try { if (value == null) return properties.remove(name); else return properties.put(name, value); } finally { notifyObservers(new ChangeEvent(ChangeType.PROPERTY, value == null, name)); } }
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())); }
public void addCapability(OSGiCapability module) { capabilities.add(module); notifyObservers(new ChangeEvent(ChangeType.CAPABILITY, false, module.getIdentifier().toString())); }
void setActivation(Activation activation) { if (activationPolicy == activation) return; try { activationPolicy = activation; } finally { notifyObservers(new ChangeEvent(ChangeType.ACTIVATION, false, activation.name())); } }
void setActivation(Activation activation) { if (activationPolicy == activation) return; try { activationPolicy = activation; } finally { notifyObservers(new ChangeEvent(ChangeType.ACTIVATION, false, activation.name())); } }