if (layout == null) {
layout = new EnhancedVLayout();
layout.setMembersMargin(15);
// Get the Live Deployment
BundleDeploymentCriteria c = new BundleDeploymentCriteria();
c.addFilterDestinationId(this.wizard.getDestination().getId());
c.addFilterIsLive(true);
c.fetchBundleVersion(true);
bundleServer.findBundleDeploymentsByCriteria(c, //
new AsyncCallback<PageList<BundleDeployment>>() {
public void onSuccess(PageList<BundleDeployment> liveDeployments) {
if (1 != liveDeployments.size()) {
nextPage = false;
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()) {