processResponse(request.getRequestId(), response);
}
});
} else if (parentId.endsWith("_destinations")) {
BundleDestinationCriteria criteria = new BundleDestinationCriteria();
criteria.addFilterBundleId(bundleId);
criteria.fetchDeployments(true);
bundleService.findBundleDestinationsByCriteria(criteria,
new AsyncCallback<PageList<BundleDestination>>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(MSG.view_bundle_tree_loadFailure(), caught);
}
public void onSuccess(PageList<BundleDestination> result) {
response.setData(buildRecordsForKnownBundle(result, bundleGroupId, bundleId));
processResponse(request.getRequestId(), response);
}
});
} else {
// we are at a child node under a bundle node - its an individual destination or deployment node
BundleCriteria criteria = new BundleCriteria();
criteria.addFilterId(bundleId);
criteria.fetchDestinations(true);
bundleService.findBundlesByCriteria(criteria, new AsyncCallback<PageList<Bundle>>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(MSG.view_bundle_tree_loadFailure(), caught);
response.setStatus(DSResponse.STATUS_FAILURE);