private String nodeTitle;
private void loadTree() {
Integer parentGroupId = FacesContextUtility.getOptionalRequestParameter("parentGroupId", Integer.class);
ResourceGroup parentGroup;
if (parentGroupId != null) {
parentGroup = groupManager.getResourceGroupById(EnterpriseFacesContextUtility.getSubject(), parentGroupId,
GroupCategory.COMPATIBLE);
} else {
parentGroup = EnterpriseFacesContextUtility.getResourceGroup();
if (parentGroup.getClusterResourceGroup() != null) {
parentGroup = parentGroup.getClusterResourceGroup();
}
}
long start = System.currentTimeMillis();
long monitorId = HibernatePerformanceMonitor.get().start();
List<ResourceFlyweight> resources = resourceManager.findResourcesByCompatibleGroup(EnterpriseFacesContextUtility
.getSubject(), parentGroup.getId(), PageControl.getUnlimitedInstance());
long end = System.currentTimeMillis();
HibernatePerformanceMonitor.get().stop(monitorId, "ResourceGroupTree group resources");
log.debug("Loaded " + resources.size() + " resources by group in " + (end - start));
start = System.currentTimeMillis();
monitorId = HibernatePerformanceMonitor.get().start();
List<Integer> members = resourceManager.findExplicitResourceIdsByResourceGroup(parentGroup.getId());
end = System.currentTimeMillis();
HibernatePerformanceMonitor.get().stop(monitorId, "ResourceGroupTree group members");
log.debug("Loaded " + members.size() + " members by group in " + (end - start));
start = System.currentTimeMillis();