String messageConcise = MSG.view_bundle_revertWizard_confirmStep_noLiveDeployment_concise();
String message = MSG.view_bundle_revertWizard_confirmStep_noLiveDeployment(wizard
.getDestination().toString());
wizard.getView().showMessage(message);
CoreGUI.getMessageCenter().notify(
new Message(messageConcise, message, Message.Severity.Warning));
}
wizard.setLiveDeployment(liveDeployments.get(0));
Integer replacedBundleDeploymentId = wizard.getLiveDeployment().getReplacedBundleDeploymentId();
if (null == replacedBundleDeploymentId) {
nextPage = false;
String messageConcise = MSG
.view_bundle_revertWizard_confirmStep_noPriorDeployment_concise();
String message = MSG.view_bundle_revertWizard_confirmStep_noPriorDeployment(wizard
.getLiveDeployment().toString(), wizard.getDestination().toString());
wizard.getView().showMessage(message);
CoreGUI.getMessageCenter().notify(
new Message(messageConcise, message, Message.Severity.Warning));
}
// Get the Replaced Deployment (the one we want to revert to_
BundleDeploymentCriteria c = new BundleDeploymentCriteria();
c.addFilterId(replacedBundleDeploymentId);
bundleServer.findBundleDeploymentsByCriteria(c, //
new AsyncCallback<PageList<BundleDeployment>>() {
public void onSuccess(PageList<BundleDeployment> replacedBundleDeployments) {
if (1 != replacedBundleDeployments.size()) {
nextPage = false;
String messageConcise = MSG
.view_bundle_revertWizard_confirmStep_noPriorDeployment_concise();
String message = MSG.view_bundle_revertWizard_confirmStep_noPriorDeployment(
wizard.getLiveDeployment().toString(), wizard.getDestination().toString());
wizard.getView().showMessage(message);
CoreGUI.getMessageCenter().notify(
new Message(messageConcise, message, Message.Severity.Warning));
}
wizard.setPreviousDeployment(replacedBundleDeployments.get(0));
setLayout();
}
public void onFailure(Throwable caught) {
nextPage = false;
String messageConcise = MSG
.view_bundle_revertWizard_confirmStep_noPriorDeployment_concise();
String message = MSG.view_bundle_revertWizard_confirmStep_noPriorDeployment(wizard
.getLiveDeployment().toString(), wizard.getDestination().toString());
wizard.getView().showMessage(message);
CoreGUI.getMessageCenter().notify(
new Message(messageConcise, message, Message.Severity.Warning));
}
});
}
public void onFailure(Throwable caught) {