package com.c2kernel.gui.tree; import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.gui.ItemTabManager; import com.c2kernel.lookup.AgentPath; import com.c2kernel.lookup.Path; import com.c2kernel.lookup.RolePath; import com.c2kernel.process.Gateway; import com.c2kernel.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(); } }