((DialogListener)dialogListeners.elementAt(i)).dialogProcessed(de);
}*/
}
public void processNextAction() {
DialogEvent de = null;
if(getnextButton().getActionCommand().equals("finish")){
de = new DialogEvent(this, DialogEvent.FINISH_ACTION);
this.dispose();
}else if(currentNavigationPanel == DETAILS_COLLECTION_PANEL){
//Validate inputs
if(!this.validateInputs())
return;
//Set inputs in commonInfoModel
String sourceDirPath = dataCollectionPanel.getSourceDirectoryPath();
String targetDirPath = dataCollectionPanel.getDestinationDirectoryPath();
String userName = dataCollectionPanel.getAdminUserName();
String adminPasswd = dataCollectionPanel.getAdminPassword();
String masterPwd = null;
boolean isUpgradeCertSelected = dataCollectionPanel.isUpgradeCertificatesSelected();
commonInfoModel.setSourceInstallDir(sourceDirPath);
commonInfoModel.setTargetDomainRoot(targetDirPath);
commonInfoModel.setAdminUserName(userName);
commonInfoModel.setAdminPassword(adminPasswd);
commonInfoModel.setCertificateConversionFlag(isUpgradeCertSelected);
// cr6585938 Both EE and PE require a masterpassword
// EE's is provided by the user. PE's is an internal
// default value.
masterPwd = dataCollectionPanel.getMasterPassword();
if(commonInfoModel.isPlatformEdition(commonInfoModel.getSourceEdition())){
if (masterPwd == null || masterPwd.equals("")){
masterPwd = commonInfoModel.getDefaultMasterPassword();
}
}
commonInfoModel.setMasterPassword(masterPwd);
//Build domain mapping for source
commonInfoModel.enlistDomainsFromSource();
//Validate admin credentials
if(!UpgradeUtils.getUpgradeUtils(commonInfoModel).
validateUserDetails(userName,adminPasswd,masterPwd)){
javax.swing.JOptionPane.showMessageDialog(this,
stringManager.getString("upgrade.gui.mainframe.invalidUserDetailsMsg"),
stringManager.getString("upgrade.gui.mainframe.invalidUserDetailsTitle"),
javax.swing.JOptionPane.ERROR_MESSAGE);
return;
}
String VersionAndEdition = commonInfoModel.getSourceVersionAndEdition();
//START - MIGHT REMOVE
if(isUpgradeCertSelected){
commonInfoModel.setCertificateConversionFlag(true);
this.currentNavigationPanel = CERTIFICATE_PANEL;
CSH.setHelpIDString(gethelpButton(),"WIZARD_CERT");
}else if(VersionAndEdition != null && VersionAndEdition.equals(UpgradeConstants.VERSION_AS7X_EE)){
this.currentNavigationPanel = CLUSTER_DETAILS_PANEL;
CSH.setHelpIDString(gethelpButton(),"WIZARD_CLUSTER");
}//END _ MIGHT REMOVE
else{
de = new DialogEvent(this, DialogEvent.UPGRADE_ACTION);
this.currentNavigationPanel = PROGRESS_PANEL ;
CSH.setHelpIDString(gethelpButton(),"WIZARD_RESULT");
}
this.setCurrentNavigationPanel();
}
//MIGHT KNOCK OFF
else if(currentNavigationPanel == CERTIFICATE_PANEL){
if(commonInfoModel.getSourceVersionAndEdition().equals(UpgradeConstants.VERSION_AS7X_EE)){
this.currentNavigationPanel = CLUSTER_DETAILS_PANEL ;
CSH.setHelpIDString(gethelpButton(),"WIZARD_CLUSTER");
}else{
de = new DialogEvent(this, DialogEvent.UPGRADE_ACTION);
this.currentNavigationPanel = PROGRESS_PANEL ;
CSH.setHelpIDString(gethelpButton(),"WIZARD_RESULT");
}
this.setCurrentNavigationPanel();
} //MIGHT KNOCK OFF
else if(currentNavigationPanel == CLUSTER_DETAILS_PANEL){
// gather data from cluster details panel and save it in common info.
Vector clusterFileNames = this.clusterDetailsPanel.getClusterFilesTableModel().getClusterFiles();
// Do error check here. Check to see whether the entered list of files are valid or not.
if((clusterFileNames != null) && (!clusterFileNames.isEmpty())){
if(!commonInfoModel.processClinstnceConfFiles(clusterFileNames)){
javax.swing.JOptionPane.showMessageDialog(this, stringManager.getString("upgrade.gui.mainframe.clusterListInvalidMsg"),
stringManager.getString("upgrade.gui.mainframe.lusterListInvalidTitle"),
javax.swing.JOptionPane.ERROR_MESSAGE);
return;
}
}
de = new DialogEvent(this, DialogEvent.UPGRADE_ACTION);
this.currentNavigationPanel = PROGRESS_PANEL ;
this.setCurrentNavigationPanel();
CSH.setHelpIDString(gethelpButton(),"WIZARD_RESULT");
}else if(currentNavigationPanel == PROGRESS_PANEL){
// should be a Finish button now. Close the upgrade tool
de = new DialogEvent(this, DialogEvent.FINISH_ACTION);
this.dispose();
}
if(de != null){
new UpgradeActionThread(dialogListeners, de).start();
}