package org.cristalise.gui.tree; import org.cristalise.gui.ItemTabManager; import org.cristalise.kernel.common.ObjectNotFoundException; import org.cristalise.kernel.lookup.AgentPath; import org.cristalise.kernel.lookup.Path; import org.cristalise.kernel.lookup.RolePath; import org.cristalise.kernel.process.Gateway; import org.cristalise.kernel.utils.Logger; public class NodeRole extends NodeContext { RolePath role; public NodeRole(Path path, ItemTabManager desktop) { super(path, desktop); role = (RolePath)path; } @Override public void loadChildren() { AgentPath[] agents; try { agents = Gateway.getLookup().getAgents(role); for (AgentPath agentPath : agents) { add (newNode(agentPath)); } } catch (ObjectNotFoundException e) { Logger.error("Role "+role.getName()+" not found"); } super.loadChildren(); } }