public void removeDependency(ServiceBinding dep){ if(dep == null){ throw new NullPointerException(); } ManagerDependencyPanel panel = myPanelMap.remove(dep.getDependencyName()); if(panel == null){ return; } myPanelMap.remove(dep.getDependencyName()); remove(panel); }
public void removeDependency(ServiceBinding dep){ if(dep == null){ throw new NullPointerException(); } ManagerDependencyPanel panel = myPanelMap.remove(dep.getDependencyName()); if(panel == null){ return; } myPanelMap.remove(dep.getDependencyName()); remove(panel); }
public void updateDependnecyPanel(ServiceBinding dep, Boolean status){ if(dep == null){ throw new NullPointerException(); } ManagerDependencyPanel panel = myPanelMap.get(dep.getDependencyName()); if(panel == null){ return; } panel.updateDisplay(status); }
public void updateDependnecyPanel(ServiceBinding dep, Boolean status){ if(dep == null){ throw new NullPointerException(); } ManagerDependencyPanel panel = myPanelMap.get(dep.getDependencyName()); if(panel == null){ return; } panel.updateDisplay(status); }
public void addDependency(ServiceBinding dep, Boolean status){ if(dep == null){ throw new NullPointerException(); } if(myPanelMap.containsKey(dep.getDependencyName())){ return; } ManagerDependencyPanel panel = new ManagerDependencyPanel(); panel.setDependency(dep, status); myPanelMap.put(dep.getDependencyName(), panel); add(panel); }
public void addDependency(ServiceBinding dep, Boolean status){ if(dep == null){ throw new NullPointerException(); } if(myPanelMap.containsKey(dep.getDependencyName())){ return; } ManagerDependencyPanel panel = new ManagerDependencyPanel(); panel.setDependency(dep, status); myPanelMap.put(dep.getDependencyName(), panel); add(panel); }
public void updateDisplay(Boolean status){ updateStatus(status, null); if(myDependency == null){ lblName.setText("--"); lblFilter.setText("--"); lblType.setText("--"); return; } String name = myDependency.getDependencyName(); Descriptor desc = myDependency.getDescriptor(); String type = desc.getClassName(); Properties props = new Properties(); for(String key: desc.getPropertyKeys()){ props.put(key, desc.getProperty(key)); } String filter = OSGiUtils.createServiceFilter(props); name = name == null ? "--" : name; type = type == null ? "--" : type; filter = filter == null ? "--" : filter; lblName.setText(name); lblFilter.setText(filter); lblType.setText(type); }
public void updateDisplay(Boolean status){ updateStatus(status); if(myDependency == null){ lblName.setText("--"); lblFilter.setText("--"); lblType.setText("--"); return; } String name = myDependency.getDependencyName(); Descriptor desc = myDependency.getDescriptor(); String type = desc.getClassName(); Properties props = new Properties(); for(String key: desc.getPropertyKeys()){ props.put(key, desc.getProperty(key)); } String filter = OSGiUtils.createServiceFilter(props); name = name == null ? "--" : name; type = type == null ? "--" : type; filter = filter == null ? "--" : filter; lblName.setText(name); lblFilter.setText(filter); lblType.setText(type); }
ServiceBinding spec = e.getKey(); if(!spec.getDependencyName().equals(dependencyId)){ continue;
if(sb.getDependencyName() != null && p.matcher(sb.getDependencyName()).matches()){ return (myAvailability.equals("Available") && thals.isAvailable()) ||
private void updateDependencyStatus(String dependencyId){ if(dependencyId == null){ return; } Boolean status = null; Boolean available = null; if(myService != null){ Map<ServiceBinding, DependencyTracker> depMap = myService.getDependencies(); for(Entry<ServiceBinding, DependencyTracker> e: depMap.entrySet()){ ServiceBinding spec = e.getKey(); if(!spec.getDependencyName().equals(dependencyId)){ continue; } DependencyTracker tracker = e.getValue(); Cardinality c = spec.getDependencySpec().getCardinality(); status = !(c.isRequired() && tracker.getTrackedDependency() == null); available = tracker.getTrackedDependency() != null; break; } } pnlDependencyList.updateDependnecyStatus(dependencyId, status, available); updateDependencyCount(); }
if(sb.getDependencyName() != null && p.matcher(sb.getDependencyName()).matches()){ return (myAvailability.equals("Available") && thals.isAvailable()) ||