LHSNavTreeItem web = new LHSNavTreeItem("Web", NameTokens.WebMetricPresenter);
LHSNavTreeItem jpa = new LHSNavTreeItem("JPA", NameTokens.JPAMetricPresenter);
LHSNavTreeItem ws = new LHSNavTreeItem("Webservices", NameTokens.WebServiceRuntimePresenter);
LHSNavTreeItem naming = new LHSNavTreeItem("JNDI View", NameTokens.JndiPresenter);
metricPredicates.add(new Predicate("datasources", datasources));
metricPredicates.add(new Predicate("messaging", jmsQueues));
metricPredicates.add(new Predicate("web", web));
metricPredicates.add(new Predicate("jpa", jpa));
metricPredicates.add(new Predicate("webservices", ws));
metricPredicates.add(new Predicate("naming", naming));
// Extension based additions
RuntimeExtensionRegistry registry = Console.getRuntimeLHSItemExtensionRegistry();
List<RuntimeExtensionMetaData> menuExtensions = registry.getExtensions();
for (RuntimeExtensionMetaData ext : menuExtensions) {
if(RuntimeGroup.METRICS.equals(ext.getGroup()))
{
metricPredicates.add(
new Predicate(
ext.getKey(), new LHSNavTreeItem(ext.getName(), ext.getToken())
)
);
}
else if(RuntimeGroup.OPERATiONS.equals(ext.getGroup()))
{
runtimePredicates.add(
new Predicate(
ext.getKey(), new LHSNavTreeItem(ext.getName(), ext.getToken())
)
);
}
else
{
Log.warn("Invalid runtime group for extension: " + ext.getGroup());
}
}
// ---
runtimeLeaf = new LHSTreeSection("Runtime Operations");
navigation.addItem(runtimeLeaf);
LHSNavTreeItem osgi = new LHSNavTreeItem("OSGi", NameTokens.OSGiRuntimePresenter);
runtimePredicates.add(new Predicate("osgi", osgi));
// ----------------------------------------------------
navigation.expandTopLevel();