}
};
}
private NavigationSection buildResourcesSection() {
NavigationItem autodiscoveryQueueItem = new NavigationItem(ResourceAutodiscoveryView.VIEW_ID,
new ViewFactory() {
public Canvas createView() {
return new ResourceAutodiscoveryView();
}
}, this.globalPermissions.contains(Permission.MANAGE_INVENTORY));
autodiscoveryQueueItem.setRefreshRequired(true);
NavigationItem allResourcesItem = new NavigationItem(PAGE_ALL_RESOURCES, new ViewFactory() {
public Canvas createView() {
return createResourceSearchView(PAGE_ALL_RESOURCES, null);
}
});
NavigationItem platformsItem = new NavigationItem(PAGE_PLATFORMS, new ViewFactory() {
public Canvas createView() {
Criteria initialCriteria = new Criteria(ResourceDataSourceField.CATEGORY.propertyName(),
ResourceCategory.PLATFORM.name());
return createResourceSearchView(PAGE_PLATFORMS, initialCriteria);
}
});
NavigationItem topLevelServersItem = new NavigationItem(PAGE_SERVERS_TOP, new ViewFactory() {
public Canvas createView() {
Criteria initialCriteria = new Criteria(ResourceDataSourceField.CATEGORY.propertyName(),
ResourceCategory.SERVER.name());
initialCriteria.addCriteria(ResourceDatasource.FILTER_PARENT_CATEGORY, ResourceCategory.PLATFORM.name());
return createResourceSearchView(PAGE_SERVERS_TOP, initialCriteria);
}
});
NavigationItem serversItem = new NavigationItem(PAGE_SERVERS, new ViewFactory() {
public Canvas createView() {
Criteria initialCriteria = new Criteria(ResourceDataSourceField.CATEGORY.propertyName(),
ResourceCategory.SERVER.name());
return createResourceSearchView(PAGE_SERVERS, initialCriteria);
}
});
NavigationItem servicesItem = new NavigationItem(PAGE_SERVICES, new ViewFactory() {
public Canvas createView() {
Criteria initialCriteria = new Criteria(ResourceDataSourceField.CATEGORY.propertyName(),
ResourceCategory.SERVICE.name());
return createResourceSearchView(PAGE_SERVICES, initialCriteria);
}
});
NavigationItem ignoredResourcesItem = new NavigationItem(PAGE_IGNORED_RESOURCES, new ViewFactory() {
public Canvas createView() {
Criteria initialCriteria = new Criteria(ResourceDataSourceField.INVENTORY_STATUS.propertyName(),
InventoryStatus.IGNORED.name());
initialCriteria.addCriteria(ResourceDataSourceField.PARENT_INVENTORY_STATUS.propertyName(),
InventoryStatus.COMMITTED.name());
return createIgnoredResourceSearchView(PAGE_IGNORED_RESOURCES, initialCriteria);
}
});
NavigationItem downServersItem = new NavigationItem(PAGE_UNAVAIL_SERVERS, new ViewFactory() {
public Canvas createView() {
Criteria initialCriteria = new Criteria(ResourceDataSourceField.AVAILABILITY.propertyName(),
AvailabilityType.DOWN.name());
initialCriteria.addCriteria(ResourceDataSourceField.CATEGORY.propertyName(),
ResourceCategory.SERVER.name());