Commit e8174268 authored by helene ortiz's avatar helene ortiz
Browse files

add a method getControllerTypes returning a Set of all controller types...

add a method getControllerTypes returning a Set of all controller types available on the instrument (used to filter logs in log viewer)
parent 71b31688
......@@ -57,6 +57,9 @@ public abstract class ControllerManager {
public abstract Map getInstalledCommands();
public abstract Map<String, Map<String, List<String>>> getInstalledControllers();
public abstract Set<String> getControllerTypes();
//public abstract Map getInstalledControllers();
public abstract Set<String> getControllersOfType(String type, boolean onlyVisibleOnes);
......
......@@ -133,6 +133,16 @@ public class ServantDatabase {
}
public Set<String> getControllerTypes() {
Set<String> controllerTypes = new TreeSet<String>();
Iterator<ClientServantDescriptor> it = controllers.values().iterator();
while (it.hasNext()) {
controllerTypes.add(it.next().getType());
}
return controllerTypes;
}
public boolean controllerIsEnabled(String controllerName) {
ClientServantDescriptor descriptor = getControllerDescriptor(controllerName);
if (descriptor != null) {
......
......@@ -101,6 +101,11 @@ public class CorbaControllerManager extends ControllerManager implements ServerC
public Set<String> getControllersOfType(String type, boolean onlyVisibleOnes) {
return ServantDatabase.getInstance().getControllersOfType(type, onlyVisibleOnes);
}
public Set<String> getControllerTypes() {
return ServantDatabase.getInstance().getControllerTypes();
}
public boolean controllerIsEnabled(String controllerName) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment