@EJB
private GroupDefinitionManagerLocal groupDefinitionManager;
public InventorySummary getInventorySummary(Subject user) {
InventorySummary summary = new InventorySummary();
int[] categoryCounts = resourceManager.getResourceCountSummary(user, InventoryStatus.COMMITTED);
summary.setPlatformCount(categoryCounts[0]);
summary.setServerCount(categoryCounts[1]);
summary.setServiceCount(categoryCounts[2]);
categoryCounts = groupManager.getResourceGroupCountSummary(user);
summary.setMixedGroupCount(categoryCounts[0]);
summary.setCompatibleGroupCount(categoryCounts[1]);
summary.setGroupDefinitionCount(groupDefinitionManager.getGroupDefinitionCount(user));
summary.setScheduledMeasurementsPerMinute(scheduleManager.getScheduledMeasurementsPerMinute());
return summary;
}