Examples of DialogEvent


Examples of com.sun.enterprise.tools.upgrade.gui.util.DialogEvent

            ((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();
        }
View Full Code Here

Examples of com.sun.enterprise.tools.upgrade.gui.util.DialogEvent

        }
        logger.info("Before Recover Call");
        // START CR 6348866
        commonInfoModel.recover();      
        // END CR 6348866
        DialogEvent de = new DialogEvent(this, DialogEvent.CANCEL_ACTION);
        for(int i=0 ; i<this.dialogListeners.size(); i++){
            ((DialogListener)dialogListeners.elementAt(i)).dialogProcessed(de);
        }
        this.dispose();
    }
View Full Code Here

Examples of com.sun.messaging.jmq.admin.apps.console.event.DialogEvent

  tmpAction =
      new AbstractAction(acr.getString(acr.I_ADD),
          AGraphics.adminImages[AGraphics.ADD])  {
              public void actionPerformed(ActionEvent e) {
                DialogEvent de = new DialogEvent(this);
                de.setDialogType(DialogEvent.ADD_DIALOG);
                fireAdminEventDispatched(de);
              }
          };
        addAction(ADD, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_DELETE),
          AGraphics.adminImages[AGraphics.DELETE])  {
              public void actionPerformed(ActionEvent e) {
                DialogEvent de = new DialogEvent(this);
                de.setDialogType(DialogEvent.DELETE_DIALOG);
                fireAdminEventDispatched(de);
              }
          };
        addAction(DELETE, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_PREFERENCES),
          AGraphics.adminImages[AGraphics.PREFERENCES])  {
              public void actionPerformed(ActionEvent e) {
                  System.err.println("Preferences");
              }
          };
        addAction(PREFERENCES, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_EXIT))  {
              public void actionPerformed(ActionEvent e) {
                ConsoleActionEvent cae = new
        ConsoleActionEvent(this, ConsoleActionEvent.EXIT);
                fireAdminEventDispatched(cae);
              }
          };
        addAction(EXIT, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_ABOUT)) {
              public void actionPerformed(ActionEvent e) {
                ConsoleActionEvent cae = new
        ConsoleActionEvent(this, ConsoleActionEvent.ABOUT);
                fireAdminEventDispatched(cae);
              }
          };
        addAction(ABOUT, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_PROPERTIES),
        AGraphics.adminImages[AGraphics.PROPERTIES])  {
              public void actionPerformed(ActionEvent e) {
                DialogEvent de = new DialogEvent(this);
                de.setDialogType(DialogEvent.PROPS_DIALOG);
                fireAdminEventDispatched(de);
              }
          };
        addAction(PROPERTIES, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_SHUTDOWN_BROKER),
      AGraphics.adminImages[AGraphics.SHUTDOWN])  {
              public void actionPerformed(ActionEvent e) {
                DialogEvent de = new DialogEvent(this);
                de.setDialogType(DialogEvent.SHUTDOWN_DIALOG);
                fireAdminEventDispatched(de);
              }
          };
        addAction(SHUTDOWN, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_RESTART_BROKER),
      AGraphics.adminImages[AGraphics.RESTART])  {
              public void actionPerformed(ActionEvent e) {
                DialogEvent de = new DialogEvent(this);
                de.setDialogType(DialogEvent.RESTART_DIALOG);
                fireAdminEventDispatched(de);
              }
          };
        addAction(RESTART, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_PAUSE),
      AGraphics.adminImages[AGraphics.PAUSE])  {
              public void actionPerformed(ActionEvent e) {
                DialogEvent de = new DialogEvent(this);
                de.setDialogType(DialogEvent.PAUSE_DIALOG);
                fireAdminEventDispatched(de);
              }
          };
        addAction(PAUSE, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_RESUME),
      AGraphics.adminImages[AGraphics.RESUME])  {
              public void actionPerformed(ActionEvent e) {
                DialogEvent de = new DialogEvent(this);
                de.setDialogType(DialogEvent.RESUME_DIALOG);
                fireAdminEventDispatched(de);
              }
          };
        addAction(RESUME, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_CONNECT),
      AGraphics.adminImages[AGraphics.CONNECT_TO_OBJSTORE])  {
              public void actionPerformed(ActionEvent e) {
                DialogEvent de = new DialogEvent(this);
                de.setDialogType(DialogEvent.CONNECT_DIALOG);
                fireAdminEventDispatched(de);
              }
          };
        addAction(CONNECT, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_DISCONNECT),
      AGraphics.adminImages[AGraphics.DISCONNECT_FROM_OBJSTORE])  {
              public void actionPerformed(ActionEvent e) {
                DialogEvent de = new DialogEvent(this);
                de.setDialogType(DialogEvent.DISCONNECT_DIALOG);
                fireAdminEventDispatched(de);
              }
          };
        addAction(DISCONNECT, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_EXPAND_ALL),
      AGraphics.adminImages[AGraphics.EXPAND_ALL])  {
              public void actionPerformed(ActionEvent e) {
                ConsoleActionEvent cae = new
        ConsoleActionEvent(this, ConsoleActionEvent.EXPAND_ALL);
                fireAdminEventDispatched(cae);
              }
          };
        addAction(EXPAND_ALL, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_COLLAPSE_ALL),
      AGraphics.adminImages[AGraphics.COLLAPSE_ALL])  {
              public void actionPerformed(ActionEvent e) {
                ConsoleActionEvent cae = new
        ConsoleActionEvent(this, ConsoleActionEvent.COLLAPSE_ALL);
                fireAdminEventDispatched(cae);
              }
          };
        addAction(COLLAPSE_ALL, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_REFRESH),
    AGraphics.adminImages[AGraphics.REFRESH])  {
              public void actionPerformed(ActionEvent e) {
                ConsoleActionEvent cae = new
        ConsoleActionEvent(this, ConsoleActionEvent.REFRESH);
                fireAdminEventDispatched(cae);
              }
          };
        addAction(REFRESH, tmpAction);

  tmpAction =
      new AbstractAction(acr.getString(acr.I_PURGE_BROKER_DEST),
    AGraphics.adminImages[AGraphics.PURGE])  {
                    public void actionPerformed(ActionEvent e) {
                        DialogEvent de = new DialogEvent(this);
                        de.setDialogType(DialogEvent.PURGE_DIALOG);
                        fireAdminEventDispatched(de);
                    }
          };
        addAction(PURGE, tmpAction);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.