1 6 7 package com.quikj.application.utilities.postinstall; 8 9 import java.awt.*; 10 import java.io.*; 11 import java.net.*; 12 import java.util.*; 13 import java.sql.*; 14 15 import com.quikj.client.beans.*; 16 import com.quikj.server.web.*; 17 21 public class PostInstaller extends java.awt.Frame implements ScreenPrinterInterface 22 { 23 24 25 public PostInstaller() 26 { 27 os = System.getProperty("os.name"); 28 ConfigElement e = new ConfigElement(); 29 e.setParamName("ace-version"); 30 e.setParamValue(HTTPApplicationServer.VERSION); 31 e.setReplacePattern("$$ACE(ACE_VERSION)"); 32 installParams.put(e); 33 initComponents(); 34 } 35 36 41 private void initComponents() { 43 java.awt.GridBagConstraints gridBagConstraints; 44 45 label2 = new java.awt.Label (); 46 mainPanel = new java.awt.Panel (); 47 welcomePanel = new java.awt.Panel (); 48 captionLabel = new java.awt.Label (); 49 helpLabel = new java.awt.Label (); 50 licenseLabel = new java.awt.Label (); 51 licenseLocationLabel = new java.awt.Label (); 52 licenseOpenInstructionLabel = new java.awt.Label (); 53 instructionLabel = new java.awt.Label (); 54 panel1 = new java.awt.Panel (); 55 welcomeScreenExitButton = new java.awt.Button (); 56 welcomeScreenAcceptLicenseButton = new java.awt.Button (); 57 aceFolderPanel = new java.awt.Panel (); 58 label5 = new java.awt.Label (); 59 optionsUseEmbeddedWebServerCheckbox = new java.awt.Checkbox (); 60 aceFolderLabel = new java.awt.Label (); 61 aceFolderTextField = new java.awt.TextField (); 62 label18 = new java.awt.Label (); 63 hostNameTextField = new java.awt.TextField (); 64 label19 = new java.awt.Label (); 65 javaNameTextField = new java.awt.TextField (); 66 panel2 = new java.awt.Panel (); 67 aceFolderExitButton = new java.awt.Button (); 68 aceFolderNextButton = new java.awt.Button (); 69 aceFolderPreviousButton = new java.awt.Button (); 70 aceFolderHelpButton = new java.awt.Button (); 71 browseHomeFolderButton = new java.awt.Button (); 72 browseJavaFolderButton = new java.awt.Button (); 73 sqlDBInfoPanel = new java.awt.Panel (); 74 label6 = new java.awt.Label (); 75 label7 = new java.awt.Label (); 76 sqlDBHostNameTextField = new java.awt.TextField (); 77 label8 = new java.awt.Label (); 78 sqlDBUserNameTextField = new java.awt.TextField (); 79 label9 = new java.awt.Label (); 80 sqlDBPasswordTextField = new java.awt.TextField (); 81 label10 = new java.awt.Label (); 82 sqlDBVerifyPasswordTextField = new java.awt.TextField (); 83 panel4 = new java.awt.Panel (); 84 sqlDBExitButton = new java.awt.Button (); 85 sqlDBNextButton = new java.awt.Button (); 86 sqlDBPreviousButton = new java.awt.Button (); 87 sqlDBHelpButton = new java.awt.Button (); 88 optionsPanel = new java.awt.Panel (); 89 label11 = new java.awt.Label (); 90 label12 = new java.awt.Label (); 91 optionsSMTPServerTextField = new java.awt.TextField (); 92 label13 = new java.awt.Label (); 93 optionsOperatorEmailTextField = new java.awt.TextField (); 94 label20 = new java.awt.Label (); 95 optionsLogEmailTextField = new java.awt.TextField (); 96 label21 = new java.awt.Label (); 97 optionsOOSEmailTextField = new java.awt.TextField (); 98 panel5 = new java.awt.Panel (); 99 optionsExitButton = new java.awt.Button (); 100 optionsNextButton = new java.awt.Button (); 101 optionsPreviousButton = new java.awt.Button (); 102 optionsHelpButton = new java.awt.Button (); 103 informationVerificationPanel = new java.awt.Panel (); 104 label3 = new java.awt.Label (); 105 label4 = new java.awt.Label (); 106 installationDataTextArea = new java.awt.TextArea (); 107 panel3 = new java.awt.Panel (); 108 informationVerificationExitButton = new java.awt.Button (); 109 informationVerificationNextButton = new java.awt.Button (); 110 informationVerificationPreviousButton = new java.awt.Button (); 111 informationProcessingPanel = new java.awt.Panel (); 112 label16 = new java.awt.Label (); 113 label1 = new java.awt.Label (); 114 installationStatusTextArea = new TextArea("", 10, 60, TextArea.SCROLLBARS_VERTICAL_ONLY); 115 informationProcessingNextButton = new java.awt.Button (); 116 runUnixScriptsPanel = new java.awt.Panel (); 117 label22 = new java.awt.Label (); 118 initScriptsArea = new java.awt.TextArea (); 119 runUnixScriptsNextButton = new java.awt.Button (); 120 startDBPanel = new java.awt.Panel (); 121 label14 = new java.awt.Label (); 122 textArea1 = new TextArea("", 10, 60, TextArea.SCROLLBARS_VERTICAL_ONLY); 123 startDBNextButton = new java.awt.Button (); 124 runSQLConsolePanel = new java.awt.Panel (); 125 label15 = new java.awt.Label (); 126 runSQLConsoleLoginLabel = new java.awt.Label (); 127 runSQLConsolePasswordField = new java.awt.TextField (); 128 runSQLConsoleLoginButton = new java.awt.Button (); 129 runSQLConsoleTextArea = new TextArea("", 10, 60, TextArea.SCROLLBARS_VERTICAL_ONLY); 130 panel6 = new java.awt.Panel (); 131 runSQLConsoleNextButton = new java.awt.Button (); 132 runSQLConsoleSkipButton = new java.awt.Button (); 133 lastPanel = new java.awt.Panel (); 134 label17 = new java.awt.Label (); 135 lastPanelExitButton = new java.awt.Button (); 136 statusBar = new java.awt.TextField (); 137 138 label2.setText("label2"); 139 140 setLayout(new java.awt.GridBagLayout ()); 141 142 setTitle("Ace Post Installer"); 143 addWindowListener(new java.awt.event.WindowAdapter () 144 { 145 public void windowClosing(java.awt.event.WindowEvent evt) 146 { 147 exitForm(evt); 148 } 149 }); 150 151 mainPanel.setLayout(new java.awt.CardLayout ()); 152 153 welcomePanel.setLayout(new java.awt.GridBagLayout ()); 154 155 welcomePanel.addComponentListener(new java.awt.event.ComponentAdapter () 156 { 157 public void componentShown(java.awt.event.ComponentEvent evt) 158 { 159 welcomePanelComponentShown(evt); 160 } 161 }); 162 163 captionLabel.setFont(new java.awt.Font ("Dialog", 0, 18)); 164 captionLabel.setText("Welcome to the Ace Operator Post-Installation Utility"); 165 gridBagConstraints = new java.awt.GridBagConstraints (); 166 gridBagConstraints.gridx = 0; 167 gridBagConstraints.gridy = 0; 168 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 169 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 170 welcomePanel.add(captionLabel, gridBagConstraints); 171 172 helpLabel.setText("Use the \"Help\" button at the bottom of every page to obtain information about the various fields."); 173 gridBagConstraints = new java.awt.GridBagConstraints (); 174 gridBagConstraints.gridx = 0; 175 gridBagConstraints.gridy = 1; 176 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 177 welcomePanel.add(helpLabel, gridBagConstraints); 178 179 licenseLabel.setFont(new java.awt.Font ("Dialog", 1, 12)); 180 licenseLabel.setText("Please read the license agreement for Ace Operator and other bundled products carefully before proceeding. "); 181 gridBagConstraints = new java.awt.GridBagConstraints (); 182 gridBagConstraints.gridx = 0; 183 gridBagConstraints.gridy = 2; 184 gridBagConstraints.insets = new java.awt.Insets (20, 0, 0, 0); 185 welcomePanel.add(licenseLabel, gridBagConstraints); 186 187 licenseLocationLabel.setText("The license agreements is distributed with the package."); 188 String license_path = "$ACE_HOME" 189 + File.separator 190 + "data" 191 + File.separator 192 + "global" 193 + File.separator 194 + "www" 195 + File.separator 196 + "aceapp" 197 + File.separator 198 + "license" 199 + File.separator 200 + "index.html"; 201 licenseLocationLabel.setText("The license agreements are located in the file " 202 + license_path 203 + " where $ACE_HOME is the location where Ace Operator is installed."); 204 gridBagConstraints = new java.awt.GridBagConstraints (); 205 gridBagConstraints.gridx = 0; 206 gridBagConstraints.gridy = 3; 207 welcomePanel.add(licenseLocationLabel, gridBagConstraints); 208 209 licenseOpenInstructionLabel.setText("Using any web browser, open the above file to read the licenses."); 210 gridBagConstraints = new java.awt.GridBagConstraints (); 211 gridBagConstraints.gridx = 0; 212 gridBagConstraints.gridy = 4; 213 welcomePanel.add(licenseOpenInstructionLabel, gridBagConstraints); 214 215 instructionLabel.setText("Please click on the \"Accept\" button to accept the terms and conditions of using Ace Operator and other bundled products . "); 216 gridBagConstraints = new java.awt.GridBagConstraints (); 217 gridBagConstraints.gridx = 0; 218 gridBagConstraints.gridy = 5; 219 gridBagConstraints.insets = new java.awt.Insets (50, 0, 0, 0); 220 welcomePanel.add(instructionLabel, gridBagConstraints); 221 222 panel1.setLayout(new java.awt.GridBagLayout ()); 223 224 welcomeScreenExitButton.setLabel("Exit Installation"); 225 welcomeScreenExitButton.addActionListener(new java.awt.event.ActionListener () 226 { 227 public void actionPerformed(java.awt.event.ActionEvent evt) 228 { 229 welcomeScreenExitButtonActionPerformed(evt); 230 } 231 }); 232 233 gridBagConstraints = new java.awt.GridBagConstraints (); 234 gridBagConstraints.gridx = 0; 235 gridBagConstraints.gridy = 0; 236 panel1.add(welcomeScreenExitButton, gridBagConstraints); 237 238 welcomeScreenAcceptLicenseButton.setLabel("Accept"); 239 welcomeScreenAcceptLicenseButton.addActionListener(new java.awt.event.ActionListener () 240 { 241 public void actionPerformed(java.awt.event.ActionEvent evt) 242 { 243 welcomeScreenAcceptLicenseButtonActionPerformed(evt); 244 } 245 }); 246 247 gridBagConstraints = new java.awt.GridBagConstraints (); 248 gridBagConstraints.gridx = 1; 249 gridBagConstraints.gridy = 0; 250 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 251 panel1.add(welcomeScreenAcceptLicenseButton, gridBagConstraints); 252 253 gridBagConstraints = new java.awt.GridBagConstraints (); 254 gridBagConstraints.gridx = 0; 255 gridBagConstraints.gridy = 6; 256 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 257 gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; 258 gridBagConstraints.weightx = 100.0; 259 gridBagConstraints.insets = new java.awt.Insets (10, 0, 10, 0); 260 welcomePanel.add(panel1, gridBagConstraints); 261 262 mainPanel.add(welcomePanel, "welcomePanel"); 263 264 aceFolderPanel.setLayout(new java.awt.GridBagLayout ()); 265 266 aceFolderPanel.addComponentListener(new java.awt.event.ComponentAdapter () 267 { 268 public void componentShown(java.awt.event.ComponentEvent evt) 269 { 270 aceFolderPanelComponentShown(evt); 271 } 272 }); 273 274 label5.setFont(new java.awt.Font ("Dialog", 0, 18)); 275 label5.setText("General System Information"); 276 gridBagConstraints = new java.awt.GridBagConstraints (); 277 gridBagConstraints.gridx = 0; 278 gridBagConstraints.gridy = 0; 279 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 280 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 281 aceFolderPanel.add(label5, gridBagConstraints); 282 283 optionsUseEmbeddedWebServerCheckbox.setLabel("Use the bundled Apache Tomcat server"); 284 optionsUseEmbeddedWebServerCheckbox.setState(true); 285 gridBagConstraints = new java.awt.GridBagConstraints (); 286 gridBagConstraints.gridx = 0; 287 gridBagConstraints.gridy = 1; 288 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 289 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 290 aceFolderPanel.add(optionsUseEmbeddedWebServerCheckbox, gridBagConstraints); 291 292 aceFolderLabel.setText("Full path name of the directory/folder where Ace Operator is installed"); 293 gridBagConstraints = new java.awt.GridBagConstraints (); 294 gridBagConstraints.gridx = 0; 295 gridBagConstraints.gridy = 2; 296 gridBagConstraints.gridwidth = 2; 297 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 298 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 299 aceFolderPanel.add(aceFolderLabel, gridBagConstraints); 300 301 aceFolderTextField.addFocusListener(new java.awt.event.FocusAdapter () 302 { 303 public void focusLost(java.awt.event.FocusEvent evt) 304 { 305 aceFolderTextFieldFocusLost(evt); 306 } 307 }); 308 309 gridBagConstraints = new java.awt.GridBagConstraints (); 310 gridBagConstraints.gridx = 0; 311 gridBagConstraints.gridy = 3; 312 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 313 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 314 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 315 gridBagConstraints.weightx = 100.0; 316 aceFolderPanel.add(aceFolderTextField, gridBagConstraints); 317 318 label18.setText("Host name/IP address for the system"); 319 gridBagConstraints = new java.awt.GridBagConstraints (); 320 gridBagConstraints.gridx = 0; 321 gridBagConstraints.gridy = 4; 322 gridBagConstraints.gridwidth = 2; 323 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 324 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 325 aceFolderPanel.add(label18, gridBagConstraints); 326 327 gridBagConstraints = new java.awt.GridBagConstraints (); 328 gridBagConstraints.gridx = 0; 329 gridBagConstraints.gridy = 5; 330 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 331 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 332 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 333 gridBagConstraints.weightx = 100.0; 334 aceFolderPanel.add(hostNameTextField, gridBagConstraints); 335 336 label19.setText("Full path name of the directory/folder where Java is installed"); 337 gridBagConstraints = new java.awt.GridBagConstraints (); 338 gridBagConstraints.gridx = 0; 339 gridBagConstraints.gridy = 6; 340 gridBagConstraints.gridwidth = 2; 341 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 342 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 343 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 344 gridBagConstraints.weightx = 100.0; 345 aceFolderPanel.add(label19, gridBagConstraints); 346 347 gridBagConstraints = new java.awt.GridBagConstraints (); 348 gridBagConstraints.gridx = 0; 349 gridBagConstraints.gridy = 7; 350 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 351 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 352 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 353 gridBagConstraints.weightx = 100.0; 354 aceFolderPanel.add(javaNameTextField, gridBagConstraints); 355 356 panel2.setLayout(new java.awt.GridBagLayout ()); 357 358 aceFolderExitButton.setLabel("Exit"); 359 aceFolderExitButton.addActionListener(new java.awt.event.ActionListener () 360 { 361 public void actionPerformed(java.awt.event.ActionEvent evt) 362 { 363 aceFolderExitButtonActionPerformed(evt); 364 } 365 }); 366 367 gridBagConstraints = new java.awt.GridBagConstraints (); 368 gridBagConstraints.gridx = 0; 369 gridBagConstraints.gridy = 0; 370 panel2.add(aceFolderExitButton, gridBagConstraints); 371 372 aceFolderNextButton.setLabel("Next >>>"); 373 aceFolderNextButton.addActionListener(new java.awt.event.ActionListener () 374 { 375 public void actionPerformed(java.awt.event.ActionEvent evt) 376 { 377 aceFolderNextButtonActionPerformed(evt); 378 } 379 }); 380 381 gridBagConstraints = new java.awt.GridBagConstraints (); 382 gridBagConstraints.gridx = 1; 383 gridBagConstraints.gridy = 0; 384 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 385 panel2.add(aceFolderNextButton, gridBagConstraints); 386 387 aceFolderPreviousButton.setLabel("<<< Previous"); 388 aceFolderPreviousButton.addActionListener(new java.awt.event.ActionListener () 389 { 390 public void actionPerformed(java.awt.event.ActionEvent evt) 391 { 392 aceFolderPreviousButtonActionPerformed(evt); 393 } 394 }); 395 396 gridBagConstraints = new java.awt.GridBagConstraints (); 397 gridBagConstraints.gridx = 2; 398 gridBagConstraints.gridy = 0; 399 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 400 panel2.add(aceFolderPreviousButton, gridBagConstraints); 401 402 aceFolderHelpButton.setLabel("Help"); 403 aceFolderHelpButton.addActionListener(new java.awt.event.ActionListener () 404 { 405 public void actionPerformed(java.awt.event.ActionEvent evt) 406 { 407 aceFolderHelpButtonActionPerformed(evt); 408 } 409 }); 410 411 gridBagConstraints = new java.awt.GridBagConstraints (); 412 gridBagConstraints.gridx = 3; 413 gridBagConstraints.gridy = 0; 414 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 415 panel2.add(aceFolderHelpButton, gridBagConstraints); 416 417 gridBagConstraints = new java.awt.GridBagConstraints (); 418 gridBagConstraints.gridx = 0; 419 gridBagConstraints.gridy = 8; 420 gridBagConstraints.gridwidth = 2; 421 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 422 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 423 gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; 424 gridBagConstraints.weightx = 100.0; 425 aceFolderPanel.add(panel2, gridBagConstraints); 426 427 browseHomeFolderButton.setLabel("Browse..."); 428 browseHomeFolderButton.setName("home"); 429 browseHomeFolderButton.addActionListener(new java.awt.event.ActionListener () 430 { 431 public void actionPerformed(java.awt.event.ActionEvent evt) 432 { 433 browseHomeFolderButtonActionPerformed(evt); 434 } 435 }); 436 437 gridBagConstraints = new java.awt.GridBagConstraints (); 438 gridBagConstraints.gridx = 1; 439 gridBagConstraints.gridy = 3; 440 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 10); 441 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 442 aceFolderPanel.add(browseHomeFolderButton, gridBagConstraints); 443 444 browseJavaFolderButton.setLabel("Browse..."); 445 browseJavaFolderButton.setName("java"); 446 browseJavaFolderButton.addActionListener(new java.awt.event.ActionListener () 447 { 448 public void actionPerformed(java.awt.event.ActionEvent evt) 449 { 450 browseJavaFolderButtonActionPerformed(evt); 451 } 452 }); 453 454 gridBagConstraints = new java.awt.GridBagConstraints (); 455 gridBagConstraints.gridx = 1; 456 gridBagConstraints.gridy = 7; 457 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 10); 458 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 459 aceFolderPanel.add(browseJavaFolderButton, gridBagConstraints); 460 461 mainPanel.add(aceFolderPanel, "aceFolderPanel"); 462 463 sqlDBInfoPanel.setLayout(new java.awt.GridBagLayout ()); 464 465 sqlDBInfoPanel.addComponentListener(new java.awt.event.ComponentAdapter () 466 { 467 public void componentShown(java.awt.event.ComponentEvent evt) 468 { 469 sqlDBInfoPanelComponentShown(evt); 470 } 471 }); 472 473 label6.setFont(new java.awt.Font ("Dialog", 0, 18)); 474 label6.setText("SQL Database Information"); 475 gridBagConstraints = new java.awt.GridBagConstraints (); 476 gridBagConstraints.gridx = 0; 477 gridBagConstraints.gridy = 0; 478 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 479 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 480 sqlDBInfoPanel.add(label6, gridBagConstraints); 481 482 label7.setText("Host name/IP address of the database server"); 483 gridBagConstraints = new java.awt.GridBagConstraints (); 484 gridBagConstraints.gridx = 0; 485 gridBagConstraints.gridy = 1; 486 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 487 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 488 sqlDBInfoPanel.add(label7, gridBagConstraints); 489 490 sqlDBHostNameTextField.setName("localhost"); 491 gridBagConstraints = new java.awt.GridBagConstraints (); 492 gridBagConstraints.gridx = 0; 493 gridBagConstraints.gridy = 2; 494 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 495 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 496 gridBagConstraints.weightx = 100.0; 497 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 498 sqlDBInfoPanel.add(sqlDBHostNameTextField, gridBagConstraints); 499 500 label8.setText("Database user name"); 501 gridBagConstraints = new java.awt.GridBagConstraints (); 502 gridBagConstraints.gridx = 0; 503 gridBagConstraints.gridy = 3; 504 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 505 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 506 sqlDBInfoPanel.add(label8, gridBagConstraints); 507 508 sqlDBUserNameTextField.setText("ace"); 509 gridBagConstraints = new java.awt.GridBagConstraints (); 510 gridBagConstraints.gridx = 0; 511 gridBagConstraints.gridy = 4; 512 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 513 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 514 gridBagConstraints.weightx = 100.0; 515 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 516 sqlDBInfoPanel.add(sqlDBUserNameTextField, gridBagConstraints); 517 518 label9.setText("Database password"); 519 gridBagConstraints = new java.awt.GridBagConstraints (); 520 gridBagConstraints.gridx = 0; 521 gridBagConstraints.gridy = 5; 522 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 523 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 524 sqlDBInfoPanel.add(label9, gridBagConstraints); 525 526 sqlDBPasswordTextField.setEchoChar('*'); 527 gridBagConstraints = new java.awt.GridBagConstraints (); 528 gridBagConstraints.gridx = 0; 529 gridBagConstraints.gridy = 6; 530 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 531 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 532 gridBagConstraints.weightx = 100.0; 533 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 534 sqlDBInfoPanel.add(sqlDBPasswordTextField, gridBagConstraints); 535 536 label10.setText("Re-enter database password"); 537 gridBagConstraints = new java.awt.GridBagConstraints (); 538 gridBagConstraints.gridx = 0; 539 gridBagConstraints.gridy = 7; 540 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 541 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 542 sqlDBInfoPanel.add(label10, gridBagConstraints); 543 544 sqlDBVerifyPasswordTextField.setEchoChar('*'); 545 gridBagConstraints = new java.awt.GridBagConstraints (); 546 gridBagConstraints.gridx = 0; 547 gridBagConstraints.gridy = 8; 548 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 549 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 550 gridBagConstraints.weightx = 100.0; 551 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 552 sqlDBInfoPanel.add(sqlDBVerifyPasswordTextField, gridBagConstraints); 553 554 panel4.setLayout(new java.awt.GridBagLayout ()); 555 556 sqlDBExitButton.setLabel("Exit"); 557 sqlDBExitButton.addActionListener(new java.awt.event.ActionListener () 558 { 559 public void actionPerformed(java.awt.event.ActionEvent evt) 560 { 561 sqlDBExitButtonActionPerformed(evt); 562 } 563 }); 564 565 gridBagConstraints = new java.awt.GridBagConstraints (); 566 gridBagConstraints.gridx = 0; 567 gridBagConstraints.gridy = 0; 568 panel4.add(sqlDBExitButton, gridBagConstraints); 569 570 sqlDBNextButton.setLabel("Next >>>"); 571 sqlDBNextButton.addActionListener(new java.awt.event.ActionListener () 572 { 573 public void actionPerformed(java.awt.event.ActionEvent evt) 574 { 575 sqlDBNextButtonActionPerformed(evt); 576 } 577 }); 578 579 gridBagConstraints = new java.awt.GridBagConstraints (); 580 gridBagConstraints.gridx = 1; 581 gridBagConstraints.gridy = 0; 582 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 583 panel4.add(sqlDBNextButton, gridBagConstraints); 584 585 sqlDBPreviousButton.setLabel("<<< Previous"); 586 sqlDBPreviousButton.addActionListener(new java.awt.event.ActionListener () 587 { 588 public void actionPerformed(java.awt.event.ActionEvent evt) 589 { 590 sqlDBPreviousButtonActionPerformed(evt); 591 } 592 }); 593 594 gridBagConstraints = new java.awt.GridBagConstraints (); 595 gridBagConstraints.gridx = 2; 596 gridBagConstraints.gridy = 0; 597 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 598 panel4.add(sqlDBPreviousButton, gridBagConstraints); 599 600 sqlDBHelpButton.setLabel("Help"); 601 sqlDBHelpButton.addActionListener(new java.awt.event.ActionListener () 602 { 603 public void actionPerformed(java.awt.event.ActionEvent evt) 604 { 605 sqlDBHelpButtonActionPerformed(evt); 606 } 607 }); 608 609 gridBagConstraints = new java.awt.GridBagConstraints (); 610 gridBagConstraints.gridx = 3; 611 gridBagConstraints.gridy = 0; 612 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 613 panel4.add(sqlDBHelpButton, gridBagConstraints); 614 615 gridBagConstraints = new java.awt.GridBagConstraints (); 616 gridBagConstraints.gridx = 0; 617 gridBagConstraints.gridy = 9; 618 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 619 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 620 gridBagConstraints.weightx = 100.0; 621 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 622 sqlDBInfoPanel.add(panel4, gridBagConstraints); 623 624 mainPanel.add(sqlDBInfoPanel, "sqlDBInfoPanel"); 625 626 optionsPanel.setLayout(new java.awt.GridBagLayout ()); 627 628 optionsPanel.addComponentListener(new java.awt.event.ComponentAdapter () 629 { 630 public void componentShown(java.awt.event.ComponentEvent evt) 631 { 632 optionsPanelComponentShown(evt); 633 } 634 }); 635 636 label11.setFont(new java.awt.Font ("Dialog", 0, 18)); 637 label11.setText("E-mail Configuration"); 638 gridBagConstraints = new java.awt.GridBagConstraints (); 639 gridBagConstraints.gridx = 0; 640 gridBagConstraints.gridy = 0; 641 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 642 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 643 optionsPanel.add(label11, gridBagConstraints); 644 645 label12.setText("SMTP server host name/IP address"); 646 gridBagConstraints = new java.awt.GridBagConstraints (); 647 gridBagConstraints.gridx = 0; 648 gridBagConstraints.gridy = 1; 649 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 650 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 651 optionsPanel.add(label12, gridBagConstraints); 652 653 gridBagConstraints = new java.awt.GridBagConstraints (); 654 gridBagConstraints.gridx = 0; 655 gridBagConstraints.gridy = 2; 656 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 657 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 658 gridBagConstraints.weightx = 100.0; 659 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 660 optionsPanel.add(optionsSMTPServerTextField, gridBagConstraints); 661 662 label13.setText("E-mail adddress to which messagebox e-mails are to be sent for the \"operator group\""); 663 gridBagConstraints = new java.awt.GridBagConstraints (); 664 gridBagConstraints.gridx = 0; 665 gridBagConstraints.gridy = 3; 666 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 667 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 668 optionsPanel.add(label13, gridBagConstraints); 669 670 gridBagConstraints = new java.awt.GridBagConstraints (); 671 gridBagConstraints.gridx = 0; 672 gridBagConstraints.gridy = 4; 673 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 674 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 675 gridBagConstraints.weightx = 100.0; 676 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 677 optionsPanel.add(optionsOperatorEmailTextField, gridBagConstraints); 678 679 label20.setText("E-mail address to which error/warning messages generated by the system will be e-mailed "); 680 gridBagConstraints = new java.awt.GridBagConstraints (); 681 gridBagConstraints.gridx = 0; 682 gridBagConstraints.gridy = 5; 683 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 684 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 685 optionsPanel.add(label20, gridBagConstraints); 686 687 gridBagConstraints = new java.awt.GridBagConstraints (); 688 gridBagConstraints.gridx = 0; 689 gridBagConstraints.gridy = 6; 690 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 691 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 692 gridBagConstraints.weightx = 100.0; 693 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 694 optionsPanel.add(optionsLogEmailTextField, gridBagConstraints); 695 696 label21.setText("E-mail adress to which messages will be sent when the \"default\" contact center is out of service"); 697 gridBagConstraints = new java.awt.GridBagConstraints (); 698 gridBagConstraints.gridx = 0; 699 gridBagConstraints.gridy = 7; 700 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 701 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 702 optionsPanel.add(label21, gridBagConstraints); 703 704 gridBagConstraints = new java.awt.GridBagConstraints (); 705 gridBagConstraints.gridx = 0; 706 gridBagConstraints.gridy = 8; 707 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 708 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 709 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 710 optionsPanel.add(optionsOOSEmailTextField, gridBagConstraints); 711 712 panel5.setLayout(new java.awt.GridBagLayout ()); 713 714 optionsExitButton.setLabel("Exit"); 715 optionsExitButton.addActionListener(new java.awt.event.ActionListener () 716 { 717 public void actionPerformed(java.awt.event.ActionEvent evt) 718 { 719 optionsExitButtonActionPerformed(evt); 720 } 721 }); 722 723 gridBagConstraints = new java.awt.GridBagConstraints (); 724 gridBagConstraints.gridx = 0; 725 gridBagConstraints.gridy = 0; 726 panel5.add(optionsExitButton, gridBagConstraints); 727 728 optionsNextButton.setLabel("Next >>>"); 729 optionsNextButton.addActionListener(new java.awt.event.ActionListener () 730 { 731 public void actionPerformed(java.awt.event.ActionEvent evt) 732 { 733 optionsNextButtonActionPerformed(evt); 734 } 735 }); 736 737 gridBagConstraints = new java.awt.GridBagConstraints (); 738 gridBagConstraints.gridx = 1; 739 gridBagConstraints.gridy = 0; 740 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 741 panel5.add(optionsNextButton, gridBagConstraints); 742 743 optionsPreviousButton.setLabel("<<< Previous"); 744 optionsPreviousButton.addActionListener(new java.awt.event.ActionListener () 745 { 746 public void actionPerformed(java.awt.event.ActionEvent evt) 747 { 748 optionsPreviousButtonActionPerformed(evt); 749 } 750 }); 751 752 gridBagConstraints = new java.awt.GridBagConstraints (); 753 gridBagConstraints.gridx = 2; 754 gridBagConstraints.gridy = 0; 755 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 756 panel5.add(optionsPreviousButton, gridBagConstraints); 757 758 optionsHelpButton.setLabel("Help"); 759 optionsHelpButton.addActionListener(new java.awt.event.ActionListener () 760 { 761 public void actionPerformed(java.awt.event.ActionEvent evt) 762 { 763 optionsHelpButtonActionPerformed(evt); 764 } 765 }); 766 767 gridBagConstraints = new java.awt.GridBagConstraints (); 768 gridBagConstraints.gridx = 3; 769 gridBagConstraints.gridy = 0; 770 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 771 panel5.add(optionsHelpButton, gridBagConstraints); 772 773 gridBagConstraints = new java.awt.GridBagConstraints (); 774 gridBagConstraints.gridx = 0; 775 gridBagConstraints.gridy = 9; 776 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 777 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 778 gridBagConstraints.weightx = 100.0; 779 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 780 optionsPanel.add(panel5, gridBagConstraints); 781 782 mainPanel.add(optionsPanel, "optionsPanel"); 783 784 informationVerificationPanel.setLayout(new java.awt.GridBagLayout ()); 785 786 informationVerificationPanel.addComponentListener(new java.awt.event.ComponentAdapter () 787 { 788 public void componentShown(java.awt.event.ComponentEvent evt) 789 { 790 informationVerificationPanelComponentShown(evt); 791 } 792 }); 793 794 label3.setFont(new java.awt.Font ("Dialog", 0, 18)); 795 label3.setText("Verify Information"); 796 gridBagConstraints = new java.awt.GridBagConstraints (); 797 gridBagConstraints.gridx = 0; 798 gridBagConstraints.gridy = 0; 799 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 800 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 801 informationVerificationPanel.add(label3, gridBagConstraints); 802 803 label4.setFont(new java.awt.Font ("Dialog", 1, 12)); 804 label4.setText("If the information is not correct, please use the \"Previous\" button to fix the problem."); 805 gridBagConstraints = new java.awt.GridBagConstraints (); 806 gridBagConstraints.gridx = 0; 807 gridBagConstraints.gridy = 1; 808 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 809 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 810 informationVerificationPanel.add(label4, gridBagConstraints); 811 812 installationDataTextArea.setEditable(false); 813 gridBagConstraints = new java.awt.GridBagConstraints (); 814 gridBagConstraints.gridx = 0; 815 gridBagConstraints.gridy = 2; 816 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 817 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 818 gridBagConstraints.weightx = 100.0; 819 gridBagConstraints.weighty = 100.0; 820 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 821 informationVerificationPanel.add(installationDataTextArea, gridBagConstraints); 822 823 panel3.setLayout(new java.awt.GridBagLayout ()); 824 825 informationVerificationExitButton.setLabel("Exit"); 826 informationVerificationExitButton.addActionListener(new java.awt.event.ActionListener () 827 { 828 public void actionPerformed(java.awt.event.ActionEvent evt) 829 { 830 informationVerificationExitButtonActionPerformed(evt); 831 } 832 }); 833 834 gridBagConstraints = new java.awt.GridBagConstraints (); 835 gridBagConstraints.gridx = 0; 836 gridBagConstraints.gridy = 0; 837 panel3.add(informationVerificationExitButton, gridBagConstraints); 838 839 informationVerificationNextButton.setLabel("Install"); 840 informationVerificationNextButton.addActionListener(new java.awt.event.ActionListener () 841 { 842 public void actionPerformed(java.awt.event.ActionEvent evt) 843 { 844 informationVerificationNextButtonActionPerformed(evt); 845 } 846 }); 847 848 gridBagConstraints = new java.awt.GridBagConstraints (); 849 gridBagConstraints.gridx = 1; 850 gridBagConstraints.gridy = 0; 851 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 852 panel3.add(informationVerificationNextButton, gridBagConstraints); 853 854 informationVerificationPreviousButton.setLabel("<<< Previous"); 855 informationVerificationPreviousButton.addActionListener(new java.awt.event.ActionListener () 856 { 857 public void actionPerformed(java.awt.event.ActionEvent evt) 858 { 859 informationVerificationPreviousButtonActionPerformed(evt); 860 } 861 }); 862 863 gridBagConstraints = new java.awt.GridBagConstraints (); 864 gridBagConstraints.gridx = 2; 865 gridBagConstraints.gridy = 0; 866 gridBagConstraints.insets = new java.awt.Insets (0, 20, 0, 0); 867 panel3.add(informationVerificationPreviousButton, gridBagConstraints); 868 869 gridBagConstraints = new java.awt.GridBagConstraints (); 870 gridBagConstraints.gridx = 0; 871 gridBagConstraints.gridy = 3; 872 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 873 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 874 gridBagConstraints.weightx = 100.0; 875 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 876 informationVerificationPanel.add(panel3, gridBagConstraints); 877 878 mainPanel.add(informationVerificationPanel, "informationVerificationPanel"); 879 880 informationProcessingPanel.setLayout(new java.awt.GridBagLayout ()); 881 882 informationProcessingPanel.addComponentListener(new java.awt.event.ComponentAdapter () 883 { 884 public void componentShown(java.awt.event.ComponentEvent evt) 885 { 886 informationProcessingPanelComponentShown(evt); 887 } 888 }); 889 890 label16.setFont(new java.awt.Font ("Dialog", 0, 18)); 891 label16.setText("Changing Configuration Files"); 892 gridBagConstraints = new java.awt.GridBagConstraints (); 893 gridBagConstraints.gridx = 0; 894 gridBagConstraints.gridy = 0; 895 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 896 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 897 informationProcessingPanel.add(label16, gridBagConstraints); 898 899 label1.setText("Modifying the configuration files...."); 900 gridBagConstraints = new java.awt.GridBagConstraints (); 901 gridBagConstraints.gridx = 0; 902 gridBagConstraints.gridy = 1; 903 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 904 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 905 gridBagConstraints.weightx = 100.0; 906 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 907 informationProcessingPanel.add(label1, gridBagConstraints); 908 909 installationStatusTextArea.setEditable(false); 910 gridBagConstraints = new java.awt.GridBagConstraints (); 911 gridBagConstraints.gridx = 0; 912 gridBagConstraints.gridy = 2; 913 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 914 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 915 gridBagConstraints.weightx = 100.0; 916 gridBagConstraints.weighty = 100.0; 917 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 918 informationProcessingPanel.add(installationStatusTextArea, gridBagConstraints); 919 920 informationProcessingNextButton.setLabel("Next >>>"); 921 informationProcessingNextButton.setEnabled(false); 922 informationProcessingNextButton.addActionListener(new java.awt.event.ActionListener () 923 { 924 public void actionPerformed(java.awt.event.ActionEvent evt) 925 { 926 informationProcessingNextButtonActionPerformed(evt); 927 } 928 }); 929 930 gridBagConstraints = new java.awt.GridBagConstraints (); 931 gridBagConstraints.gridx = 0; 932 gridBagConstraints.gridy = 3; 933 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 934 informationProcessingPanel.add(informationProcessingNextButton, gridBagConstraints); 935 936 mainPanel.add(informationProcessingPanel, "informationProcessingPanel"); 937 938 runUnixScriptsPanel.setLayout(new java.awt.GridBagLayout ()); 939 940 runUnixScriptsPanel.addComponentListener(new java.awt.event.ComponentAdapter () 941 { 942 public void componentShown(java.awt.event.ComponentEvent evt) 943 { 944 runUnixScriptsPanelComponentShown(evt); 945 } 946 }); 947 948 label22.setFont(new java.awt.Font ("Dialog", 0, 18)); 949 label22.setText("Running Unix/Linux initialization scripts"); 950 gridBagConstraints = new java.awt.GridBagConstraints (); 951 gridBagConstraints.gridx = 0; 952 gridBagConstraints.gridy = 0; 953 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 954 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 955 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 956 runUnixScriptsPanel.add(label22, gridBagConstraints); 957 958 initScriptsArea.setEditable(false); 959 gridBagConstraints = new java.awt.GridBagConstraints (); 960 gridBagConstraints.gridx = 0; 961 gridBagConstraints.gridy = 1; 962 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 963 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 964 gridBagConstraints.weightx = 100.0; 965 gridBagConstraints.weighty = 100.0; 966 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 967 runUnixScriptsPanel.add(initScriptsArea, gridBagConstraints); 968 969 runUnixScriptsNextButton.setLabel("Next>>>"); 970 runUnixScriptsNextButton.setEnabled(false); 971 runUnixScriptsNextButton.addActionListener(new java.awt.event.ActionListener () 972 { 973 public void actionPerformed(java.awt.event.ActionEvent evt) 974 { 975 runUnixScriptsNextButtonActionPerformed(evt); 976 } 977 }); 978 979 gridBagConstraints = new java.awt.GridBagConstraints (); 980 gridBagConstraints.gridx = 0; 981 gridBagConstraints.gridy = 2; 982 gridBagConstraints.insets = new java.awt.Insets (10, 0, 10, 0); 983 runUnixScriptsPanel.add(runUnixScriptsNextButton, gridBagConstraints); 984 985 mainPanel.add(runUnixScriptsPanel, "runUnixScriptsPanel"); 986 987 startDBPanel.setLayout(new java.awt.GridBagLayout ()); 988 989 startDBPanel.addComponentListener(new java.awt.event.ComponentAdapter () 990 { 991 public void componentShown(java.awt.event.ComponentEvent evt) 992 { 993 startDBPanelComponentShown(evt); 994 } 995 }); 996 997 label14.setFont(new java.awt.Font ("Dialog", 0, 18)); 998 label14.setText("Create Database & Tables"); 999 gridBagConstraints = new java.awt.GridBagConstraints (); 1000 gridBagConstraints.gridx = 0; 1001 gridBagConstraints.gridy = 0; 1002 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1003 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 1004 startDBPanel.add(label14, gridBagConstraints); 1005 1006 textArea1.setText("We will now initialize the Ace database. \n\nPlease make sure that the database is running. If it is not running, please start it now and then click on the \"Next\" button to continue. "); 1007 textArea1.setEditable(false); 1008 gridBagConstraints = new java.awt.GridBagConstraints (); 1009 gridBagConstraints.gridx = 0; 1010 gridBagConstraints.gridy = 1; 1011 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 1012 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1013 gridBagConstraints.weightx = 100.0; 1014 gridBagConstraints.weighty = 100.0; 1015 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 1016 startDBPanel.add(textArea1, gridBagConstraints); 1017 1018 startDBNextButton.setLabel("Next >>>"); 1019 startDBNextButton.addActionListener(new java.awt.event.ActionListener () 1020 { 1021 public void actionPerformed(java.awt.event.ActionEvent evt) 1022 { 1023 startDBNextButtonActionPerformed(evt); 1024 } 1025 }); 1026 1027 gridBagConstraints = new java.awt.GridBagConstraints (); 1028 gridBagConstraints.gridx = 0; 1029 gridBagConstraints.gridy = 2; 1030 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 1031 startDBPanel.add(startDBNextButton, gridBagConstraints); 1032 1033 mainPanel.add(startDBPanel, "startDBPanel"); 1034 1035 runSQLConsolePanel.setLayout(new java.awt.GridBagLayout ()); 1036 1037 runSQLConsolePanel.addComponentListener(new java.awt.event.ComponentAdapter () 1038 { 1039 public void componentShown(java.awt.event.ComponentEvent evt) 1040 { 1041 runSQLConsolePanelComponentShown(evt); 1042 } 1043 }); 1044 1045 label15.setFont(new java.awt.Font ("Dialog", 0, 18)); 1046 label15.setText("Initializing Database"); 1047 gridBagConstraints = new java.awt.GridBagConstraints (); 1048 gridBagConstraints.gridx = 0; 1049 gridBagConstraints.gridy = 0; 1050 gridBagConstraints.gridwidth = 2; 1051 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1052 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 1053 runSQLConsolePanel.add(label15, gridBagConstraints); 1054 1055 runSQLConsoleLoginLabel.setEnabled(false); 1056 runSQLConsoleLoginLabel.setText("Enter the root password for the SQL database"); 1057 gridBagConstraints = new java.awt.GridBagConstraints (); 1058 gridBagConstraints.gridx = 0; 1059 gridBagConstraints.gridy = 1; 1060 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1061 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 1062 runSQLConsolePanel.add(runSQLConsoleLoginLabel, gridBagConstraints); 1063 1064 runSQLConsolePasswordField.setEchoChar('*'); 1065 runSQLConsolePasswordField.setEnabled(false); 1066 gridBagConstraints = new java.awt.GridBagConstraints (); 1067 gridBagConstraints.gridx = 0; 1068 gridBagConstraints.gridy = 2; 1069 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1070 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1071 gridBagConstraints.weightx = 100.0; 1072 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 1073 runSQLConsolePanel.add(runSQLConsolePasswordField, gridBagConstraints); 1074 1075 runSQLConsoleLoginButton.setLabel("Login"); 1076 runSQLConsoleLoginButton.setEnabled(false); 1077 runSQLConsoleLoginButton.addActionListener(new java.awt.event.ActionListener () 1078 { 1079 public void actionPerformed(java.awt.event.ActionEvent evt) 1080 { 1081 runSQLConsoleLoginButtonActionPerformed(evt); 1082 } 1083 }); 1084 1085 gridBagConstraints = new java.awt.GridBagConstraints (); 1086 gridBagConstraints.gridx = 1; 1087 gridBagConstraints.gridy = 2; 1088 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1089 gridBagConstraints.insets = new java.awt.Insets (0, 10, 10, 10); 1090 runSQLConsolePanel.add(runSQLConsoleLoginButton, gridBagConstraints); 1091 1092 runSQLConsoleTextArea.setEditable(false); 1093 gridBagConstraints = new java.awt.GridBagConstraints (); 1094 gridBagConstraints.gridx = 0; 1095 gridBagConstraints.gridy = 4; 1096 gridBagConstraints.gridwidth = 2; 1097 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 1098 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1099 gridBagConstraints.weightx = 100.0; 1100 gridBagConstraints.weighty = 100.0; 1101 gridBagConstraints.insets = new java.awt.Insets (10, 10, 0, 10); 1102 runSQLConsolePanel.add(runSQLConsoleTextArea, gridBagConstraints); 1103 1104 panel6.setLayout(new java.awt.GridBagLayout ()); 1105 1106 runSQLConsoleNextButton.setEnabled(false); 1107 runSQLConsoleNextButton.setLabel("Next >>>"); 1108 runSQLConsoleNextButton.addActionListener(new java.awt.event.ActionListener () 1109 { 1110 public void actionPerformed(java.awt.event.ActionEvent evt) 1111 { 1112 runSQLConsoleNextButtonActionPerformed(evt); 1113 } 1114 }); 1115 1116 gridBagConstraints = new java.awt.GridBagConstraints (); 1117 gridBagConstraints.gridx = 0; 1118 gridBagConstraints.gridy = 0; 1119 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 1120 panel6.add(runSQLConsoleNextButton, gridBagConstraints); 1121 1122 runSQLConsoleSkipButton.setLabel("Skip DB Initialization"); 1123 runSQLConsoleSkipButton.addActionListener(new java.awt.event.ActionListener () 1124 { 1125 public void actionPerformed(java.awt.event.ActionEvent evt) 1126 { 1127 runSQLConsoleSkipButtonActionPerformed(evt); 1128 } 1129 }); 1130 1131 gridBagConstraints = new java.awt.GridBagConstraints (); 1132 gridBagConstraints.gridx = 1; 1133 gridBagConstraints.gridy = 0; 1134 gridBagConstraints.insets = new java.awt.Insets (0, 10, 0, 10); 1135 panel6.add(runSQLConsoleSkipButton, gridBagConstraints); 1136 1137 gridBagConstraints = new java.awt.GridBagConstraints (); 1138 gridBagConstraints.gridx = 0; 1139 gridBagConstraints.gridy = 6; 1140 gridBagConstraints.gridwidth = 2; 1141 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1142 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1143 gridBagConstraints.weightx = 100.0; 1144 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 1145 runSQLConsolePanel.add(panel6, gridBagConstraints); 1146 1147 mainPanel.add(runSQLConsolePanel, "runSQLConsolePanel"); 1148 1149 lastPanel.setLayout(new java.awt.GridBagLayout ()); 1150 1151 lastPanel.addComponentListener(new java.awt.event.ComponentAdapter () 1152 { 1153 public void componentShown(java.awt.event.ComponentEvent evt) 1154 { 1155 lastPanelComponentShown(evt); 1156 } 1157 }); 1158 1159 label17.setFont(new java.awt.Font ("Dialog", 0, 18)); 1160 label17.setText("All Done!"); 1161 gridBagConstraints = new java.awt.GridBagConstraints (); 1162 gridBagConstraints.gridx = 0; 1163 gridBagConstraints.gridy = 0; 1164 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1165 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 1166 lastPanel.add(label17, gridBagConstraints); 1167 1168 lastPanelExitButton.setLabel("Exit"); 1169 lastPanelExitButton.addActionListener(new java.awt.event.ActionListener () 1170 { 1171 public void actionPerformed(java.awt.event.ActionEvent evt) 1172 { 1173 lastPanelExitButtonActionPerformed(evt); 1174 } 1175 }); 1176 1177 gridBagConstraints = new java.awt.GridBagConstraints (); 1178 gridBagConstraints.gridx = 0; 1179 gridBagConstraints.gridy = 1; 1180 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 1181 lastPanel.add(lastPanelExitButton, gridBagConstraints); 1182 1183 mainPanel.add(lastPanel, "lastPanel"); 1184 1185 gridBagConstraints = new java.awt.GridBagConstraints (); 1186 gridBagConstraints.gridx = 0; 1187 gridBagConstraints.gridy = 0; 1188 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1189 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1190 gridBagConstraints.weightx = 100.0; 1191 gridBagConstraints.weighty = 100.0; 1192 gridBagConstraints.insets = new java.awt.Insets (10, 10, 10, 10); 1193 add(mainPanel, gridBagConstraints); 1194 1195 statusBar.setBackground(new java.awt.Color (204, 204, 204)); 1196 statusBar.setEditable(false); 1197 gridBagConstraints = new java.awt.GridBagConstraints (); 1198 gridBagConstraints.gridx = 0; 1199 gridBagConstraints.gridy = 1; 1200 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 1201 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 1202 gridBagConstraints.weightx = 100.0; 1203 gridBagConstraints.insets = new java.awt.Insets (0, 10, 5, 10); 1204 add(statusBar, gridBagConstraints); 1205 1206 pack(); 1207 } 1209 private void runSQLConsoleSkipButtonActionPerformed(java.awt.event.ActionEvent evt) { new InformationDialog(this, "Database Initialization", 1213 "The database has not been initialized. To initialize the database manually, using a standard MYSQL client, " 1214 + "run the SQL commands specified in the file " 1215 + installParams.find("ace-home").getParamValue() 1216 + File.separator 1217 + "sql" 1218 + File.separator 1219 + "init_ace.sql", 1220 true); 1221 ((CardLayout)mainPanel.getLayout()).show(mainPanel, "lastPanel"); 1222 } 1224 private void runSQLConsoleLoginButtonActionPerformed(java.awt.event.ActionEvent evt) { executeSQL(installParams.find("sql-host").getParamValue(), 1228 "root", 1229 runSQLConsolePasswordField.getText().trim()); 1230 } 1232 private void runUnixScriptsNextButtonActionPerformed(java.awt.event.ActionEvent evt) { ((CardLayout)mainPanel.getLayout()).show(mainPanel, "startDBPanel"); 1236 } 1238 private void runUnixScriptsPanelComponentShown(java.awt.event.ComponentEvent evt) { clearStatusBar(); 1242 1243 printer = initScriptsArea; 1244 printer.setText(""); 1245 String error = ScriptExecutor.executeUnixInitScript(installParams.find("ace-home").getParamValue(), 1246 this); 1247 if (error != null) 1248 { 1249 error(error); 1250 1251 try 1252 { 1253 Thread.sleep(3 * 1000L); 1254 } 1255 catch (InterruptedException ex1) 1256 { 1257 ; 1258 } 1259 ((CardLayout)mainPanel.getLayout()).show(mainPanel, "lastPanel"); 1260 return; 1261 } 1262 1263 initScriptsArea.append("Done. Click on the \"Next\" button to finish the post-installation\n"); 1264 runUnixScriptsNextButton.setEnabled(true); 1265 1266 } 1268 private void optionsHelpButtonActionPerformed(java.awt.event.ActionEvent evt) { HelpFrame.getInstance().setText(java.util.ResourceBundle.getBundle("com.quikj.application.utilities.postinstall.helptext", 1272 locale).getString("email_properties_help")); 1273 } 1275 private void sqlDBHelpButtonActionPerformed(java.awt.event.ActionEvent evt) { HelpFrame.getInstance().setText(java.util.ResourceBundle.getBundle("com.quikj.application.utilities.postinstall.helptext", 1279 locale).getString("database_properties_help")); 1280 } 1282 private void aceFolderHelpButtonActionPerformed(java.awt.event.ActionEvent evt) { HelpFrame.getInstance().setText(java.util.ResourceBundle.getBundle("com.quikj.application.utilities.postinstall.helptext", 1286 locale).getString("general_properties_help")); 1287 } 1289 private void lastPanelComponentShown(java.awt.event.ComponentEvent evt) { clearStatusBar(); 1293 } 1295 private void runSQLConsolePanelComponentShown(java.awt.event.ComponentEvent evt) { clearStatusBar(); 1299 1300 runSQLConsoleTextArea.setText("Please enter the root password for the SQL database above and then click on the \"Login\" button\n"); 1301 runSQLConsoleLoginLabel.setEnabled(true); 1302 runSQLConsolePasswordField.setEnabled(true); 1303 runSQLConsoleLoginButton.setEnabled(true); 1304 1305 } 1307 private void startDBPanelComponentShown(java.awt.event.ComponentEvent evt) { clearStatusBar(); 1311 } 1313 private void informationProcessingPanelComponentShown(java.awt.event.ComponentEvent evt) { clearStatusBar(); 1317 } 1319 private void browseJavaFolderButtonActionPerformed(java.awt.event.ActionEvent evt) { FileDialog fd = new FileDialog(this, "Choose Folder", FileDialog.LOAD); 1323 FilenameFilter filter = new FilenameFilter() 1324 { 1325 public boolean accept(File dir, String file) 1326 { 1327 return true; 1328 } 1329 }; 1330 fd.setFilenameFilter(filter); 1331 fd.show(); 1332 String directory = fd.getDirectory(); 1333 if (directory != null) 1334 { 1335 int length = directory.length(); 1336 if (directory.endsWith(File.separator) == true) 1337 { 1338 length--; 1339 } 1340 javaNameTextField.setText(directory.substring(0, length)); 1341 } 1342 fd.dispose(); 1343 } 1345 private void browseHomeFolderButtonActionPerformed(java.awt.event.ActionEvent evt) { FileDialog fd = new FileDialog(this, "Choose Folder", FileDialog.LOAD); 1349 FilenameFilter filter = new FilenameFilter() 1350 { 1351 public boolean accept(File dir, String file) 1352 { 1353 return true; 1354 } 1355 }; 1356 fd.setFilenameFilter(filter); 1357 fd.show(); 1358 String directory = fd.getDirectory(); 1359 if (directory != null) 1360 { 1361 int length = directory.length(); 1362 if (directory.endsWith(File.separator) == true) 1363 { 1364 length--; 1365 } 1366 aceFolderTextField.setText(directory.substring(0, length)); 1367 } 1368 fd.dispose(); 1369 } 1371 private void aceFolderTextFieldFocusLost(java.awt.event.FocusEvent evt) { String folder = aceFolderTextField.getText().trim(); 1375 if (folder.length() > 0) 1376 { 1377 if (javaNameTextField.getText().length() == 0) 1378 { 1379 if (DataValidator.fileExists(folder, "jre") == true) 1380 { 1381 javaNameTextField.setText(folder + File.separator + "jre"); 1382 } 1383 } 1384 } 1385 } 1387 private void welcomePanelComponentShown(java.awt.event.ComponentEvent evt) { captionLabel.setText("Welcome to the Ace Operator Post-Installation Utility for " 1391 + System.getProperty("os.name")); 1392 1393 clearStatusBar(); 1394 } 1396 private void informationVerificationExitButtonActionPerformed(java.awt.event.ActionEvent evt) { System.exit(0); 1400 } 1402 private void optionsExitButtonActionPerformed(java.awt.event.ActionEvent evt) { System.exit(0); 1406 } 1408 private void sqlDBExitButtonActionPerformed(java.awt.event.ActionEvent evt) { System.exit(0); 1412 } 1414 private void aceFolderExitButtonActionPerformed(java.awt.event.ActionEvent evt) { System.exit(0); 1418 } 1420 private void welcomeScreenExitButtonActionPerformed(java.awt.event.ActionEvent evt) { System.exit(0); 1424 } 1426 private void lastPanelExitButtonActionPerformed(java.awt.event.ActionEvent evt) { if (installParams.save( 1430 installParams.find("ace-home").getParamValue(), 1431 "install.log") == false) 1432 { 1433 error("IO Error writing the installation log"); 1434 try 1435 { 1436 Thread.sleep(2000L); 1437 } 1438 catch (InterruptedException ex) 1439 { 1440 ; 1441 } 1442 } 1443 1444 System.exit(0); 1445 } 1447 private void runSQLConsoleNextButtonActionPerformed(java.awt.event.ActionEvent evt) { ((CardLayout)mainPanel.getLayout()).show(mainPanel, "lastPanel"); 1451 } 1453 private void startDBNextButtonActionPerformed(java.awt.event.ActionEvent evt) { 1457 ((CardLayout)mainPanel.getLayout()).show(mainPanel, "runSQLConsolePanel"); 1458 } 1460 private void informationProcessingNextButtonActionPerformed(java.awt.event.ActionEvent evt) { if (os.startsWith("Windows") == true) 1464 { 1465 ((CardLayout)mainPanel.getLayout()).show(mainPanel, "startDBPanel"); 1467 } 1468 else { 1470 ((CardLayout)mainPanel.getLayout()).show(mainPanel, "runUnixScriptsPanel"); 1471 } 1472 } 1474 private void optionsPanelComponentShown(java.awt.event.ComponentEvent evt) { clearStatusBar(); 1478 1479 ConfigElement e = installParams.find("smtp-server"); 1480 if (e != null) 1481 { 1482 optionsSMTPServerTextField.setText(e.getParamValue()); 1483 } 1484 else 1485 { 1486 optionsSMTPServerTextField.setText(""); 1487 } 1488 1489 e = installParams.find("operator-email"); 1490 if (e != null) 1491 { 1492 optionsOperatorEmailTextField.setText(e.getParamValue()); 1493 } 1494 else 1495 { 1496 optionsOperatorEmailTextField.setText(""); 1497 } 1498 1499 e = installParams.find("log-email"); 1500 if (e != null) 1501 { 1502 optionsLogEmailTextField.setText(e.getParamValue()); 1503 } 1504 else 1505 { 1506 optionsLogEmailTextField.setText(""); 1507 } 1508 1509 e = installParams.find("oos-email"); 1510 if (e != null) 1511 { 1512 optionsOOSEmailTextField.setText(e.getParamValue()); 1513 } 1514 else 1515 { 1516 optionsOOSEmailTextField.setText(""); 1517 } 1518 } 1520 private void optionsPreviousButtonActionPerformed(java.awt.event.ActionEvent evt) { ((CardLayout)mainPanel.getLayout()).show(mainPanel, "sqlDBInfoPanel"); 1524 } 1526 private void optionsNextButtonActionPerformed(java.awt.event.ActionEvent evt) { String error = dataValidator.validateSMTP(optionsSMTPServerTextField.getText().trim(), 1531 true); 1532 if (error != null) 1533 { 1534 error(error); 1535 return; 1536 } 1537 1538 error = dataValidator.validateOperatorEmail( 1539 optionsOperatorEmailTextField.getText().trim(), true); 1540 if (error != null) 1541 { 1542 error(error); 1543 return; 1544 } 1545 1546 error = dataValidator.validateLogEmail( 1547 optionsLogEmailTextField.getText().trim(), true); 1548 if (error != null) 1549 { 1550 error(error); 1551 return; 1552 } 1553 1554 error = dataValidator.validateOOSEmail( 1555 optionsOOSEmailTextField.getText().trim(), true); 1556 if (error != null) 1557 { 1558 error(error); 1559 return; 1560 } 1561 1562 ((CardLayout)mainPanel.getLayout()).show(mainPanel, "informationVerificationPanel"); 1563 } 1565 private void sqlDBInfoPanelComponentShown(java.awt.event.ComponentEvent evt) { clearStatusBar(); 1569 1570 ConfigElement e = installParams.find("sql-host"); 1571 if (e != null) 1572 { 1573 sqlDBHostNameTextField.setText(e.getParamValue()); 1574 } 1575 else 1576 { 1577 sqlDBHostNameTextField.setText("localhost"); 1578 } 1579 1580 e = installParams.find("sql-user"); 1581 if (e != null) 1582 { 1583 sqlDBUserNameTextField.setText(e.getParamValue()); 1584 } 1585 else 1586 { 1587 sqlDBUserNameTextField.setText("ace"); 1588 } 1589 1590 e = installParams.find("sql-password"); 1591 if (e != null) 1592 { 1593 sqlDBPasswordTextField.setText(e.getParamValue()); 1594 sqlDBVerifyPasswordTextField.setText(e.getParamValue()); 1595 } 1596 else 1597 { 1598 sqlDBPasswordTextField.setText(""); 1599 sqlDBVerifyPasswordTextField.setText(""); 1600 } 1601 } 1603 private void sqlDBPreviousButtonActionPerformed(java.awt.event.ActionEvent evt) { ((CardLayout)mainPanel.getLayout()).show(mainPanel, "aceFolderPanel"); 1607 } 1609 private void sqlDBNextButtonActionPerformed(java.awt.event.ActionEvent evt) { String error = dataValidator.validateDBHostName( 1613 sqlDBHostNameTextField.getText().trim(), true); 1614 if (error != null) 1615 { 1616 error(error); 1617 return; 1618 } 1619 1620 error = dataValidator.validateDBUser( 1621 sqlDBUserNameTextField.getText().trim(), true); 1622 if (error != null) 1623 { 1624 error(error); 1625 return; 1626 } 1627 1628 1629 error = dataValidator.validateDBPassword( 1630 sqlDBPasswordTextField.getText().trim(), 1631 sqlDBVerifyPasswordTextField.getText().trim(), 1632 true); 1633 if (error != null) 1634 { 1635 error(error); 1636 return; 1637 } 1638 1639 ((CardLayout)mainPanel.getLayout()).show(mainPanel, "optionsPanel"); 1640 } 1642 private void informationVerificationPanelComponentShown(java.awt.event.ComponentEvent evt) { clearStatusBar(); 1646 1647 StringBuffer buffer = new StringBuffer ("You have entered the following data:\n\n"); 1648 1649 buffer.append(installParams.displayEnteredValues()); 1650 1651 buffer.append("\nIf all the above information is correct, click on the \"Install\" button to change the value in the configuration files. " 1652 + "Otherwise, use the \"Previous\" button to go back and make changes\n\n"); 1653 1654 installationDataTextArea.setText(buffer.toString()); 1655 } 1657 private void informationVerificationPreviousButtonActionPerformed(java.awt.event.ActionEvent evt) { ((CardLayout)mainPanel.getLayout()).show(mainPanel, "optionsPanel"); 1661 } 1663 private void informationVerificationNextButtonActionPerformed(java.awt.event.ActionEvent evt) { ((CardLayout)mainPanel.getLayout()).show(mainPanel, "informationProcessingPanel"); 1667 1668 postInstall(); 1670 1671 informationProcessingNextButton.setEnabled(true); 1672 } 1674 private void aceFolderNextButtonActionPerformed(java.awt.event.ActionEvent evt) { 1678 String error = dataValidator.validateEmbeddedWebServer( 1679 optionsUseEmbeddedWebServerCheckbox.getState(), true); 1680 if (error != null) 1681 { 1682 error(error); 1683 return; 1684 } 1685 1686 error = dataValidator.validateAceHome(aceFolderTextField.getText().trim(), 1687 true); 1688 if (error != null) 1689 { 1690 error(error); 1691 return; 1692 } 1693 1694 1695 error = dataValidator.validateHostName(hostNameTextField.getText().trim(), 1696 true); 1697 if (error != null) 1698 { 1699 error(error); 1700 return; 1701 } 1702 1703 error = dataValidator.validateJavaHome(javaNameTextField.getText().trim(), 1704 true); 1705 if (error != null) 1706 { 1707 error(error); 1708 return; 1709 } 1710 1711 ((CardLayout)mainPanel.getLayout()).show(mainPanel, "sqlDBInfoPanel"); 1712 } 1714 private void aceFolderPanelComponentShown(java.awt.event.ComponentEvent evt) { clearStatusBar(); 1718 1719 ConfigElement element = installParams.find("ace-use-bundled-https"); 1720 if (element != null) 1721 { 1722 boolean v = false; 1723 String value = element.getParamValue(); 1724 if (value.equals("yes") == true) 1725 { 1726 v = true; 1727 } 1728 optionsUseEmbeddedWebServerCheckbox.setState(v); 1729 } 1730 else 1731 { 1732 optionsUseEmbeddedWebServerCheckbox.setState(true); 1733 } 1734 1735 String abs_path = null; 1736 element = installParams.find("ace-home"); 1737 if (element != null) 1738 { 1739 abs_path = element.getParamValue(); 1740 aceFolderTextField.setText(element.getParamValue()); 1741 } 1742 else 1743 { 1744 abs_path = DataValidator.findAceHome(os); 1745 if (abs_path != null) 1746 { 1747 aceFolderTextField.setText(abs_path); 1748 } 1749 } 1750 1751 element = installParams.find("ace-host"); 1752 if (element != null) 1753 { 1754 hostNameTextField.setText(element.getParamValue()); 1755 } 1756 else 1757 { 1758 try 1759 { 1760 InetAddress addr = InetAddress.getLocalHost(); 1761 hostNameTextField.setText(addr.getHostName()); 1762 } 1763 catch (UnknownHostException ex) 1764 { 1765 ; 1766 } 1767 } 1768 1769 element = installParams.find("java-home"); 1770 if (element != null) 1771 { 1772 javaNameTextField.setText(element.getParamValue()); 1773 } 1774 else 1775 { 1776 String java_home = System.getProperty("java.home"); 1777 if (java_home == null) 1778 { 1779 javaNameTextField.setText(""); 1780 } 1781 else 1782 { 1783 javaNameTextField.setText(java_home); 1784 } 1785 } 1786 } 1788 private void aceFolderPreviousButtonActionPerformed(java.awt.event.ActionEvent evt) { ((CardLayout)mainPanel.getLayout()).show(mainPanel, "welcomePanel"); 1792 } 1794 private void welcomeScreenAcceptLicenseButtonActionPerformed(java.awt.event.ActionEvent evt) { ((CardLayout)mainPanel.getLayout()).show(mainPanel, "aceFolderPanel"); 1798 } 1800 1801 private void exitForm(java.awt.event.WindowEvent evt) 1802 { System.exit(0); 1804 } 1806 private void clearStatusBar() 1807 { 1808 statusBar.setText(""); 1809 } 1810 1811 private void error(String text) 1812 { 1813 statusBar.setForeground(Color.red); 1814 Toolkit.getDefaultToolkit().beep(); 1815 statusBar.setText(text); 1816 } 1817 1818 private void inform(String text) 1819 { 1820 statusBar.setForeground(Color.black); 1821 Toolkit.getDefaultToolkit().beep(); 1822 statusBar.setText(text); 1823 } 1824 1825 private void postInstall() 1826 { 1827 printer = installationStatusTextArea; 1828 installationStatusTextArea.setText(""); 1829 boolean result = installParams.replace(installParams.find("ace-home").getParamValue(), 1830 ".orig", this); 1831 1832 if (result == false) 1833 { 1834 error(installParams.getErrorMessage()); 1835 return; 1836 } 1837 1838 installationStatusTextArea.append("\n\n" 1839 + "Configuration files changed. Click on the \"Next\" button to continue with the post-installation\n"); 1840 } 1841 1842 1843 private void executeSQL(String host, String user, String password) 1844 { 1845 try 1846 { 1847 String ace_folder = installParams.find("ace-home").getParamValue(); 1848 1849 DBAccess db = new DBAccess("com.mysql.jdbc.Driver", 1850 host, user, password, "test"); 1851 1852 clearStatusBar(); 1854 runSQLConsoleLoginButton.setEnabled(false); 1855 1856 if (db.databaseAlreadyExists() == true) 1857 { 1858 YesNoDialog ynd = new YesNoDialog(this, "Database exists", 1859 "Ace database already exists, do you want to re-initialize the database?", 1860 "Yes", "No"); 1861 1862 if (ynd.okSelected() == true) 1863 { 1864 runSQLConsoleTextArea.append("Clearing out the old database...\n"); 1866 String path = ace_folder + File.separator + "sql" + 1867 File.separator + "clear_ace.sql"; 1868 String error = db.executeSQLStatements(path); 1869 if (error != null) 1870 { 1871 runSQLConsoleTextArea.append("Failed to clear out the old database: " 1872 + error + "\n"); 1873 error("Failed to initialize the database"); 1874 return; 1875 } 1876 runSQLConsoleTextArea.append("Done\n"); 1877 } 1878 else 1879 { 1880 inform("Database will not be initialized. Click on the \"Next\" button to continue"); 1881 runSQLConsoleNextButton.setEnabled(true); 1882 return; 1883 } 1884 } 1885 1886 runSQLConsoleTextArea.append("Initializing the database ...\n"); 1887 String path = ace_folder + File.separator + "sql" + 1888 File.separator + "init_ace.sql"; 1889 String error = db.executeSQLStatements(path); 1890 if (error != null) 1891 { 1892 runSQLConsoleTextArea.append("Failed to initialize the database: " 1893 + error + "\n"); 1894 error("Failed to initialize the database"); 1895 return; 1896 } 1897 1898 runSQLConsoleTextArea.append("Done\n"); 1899 inform("Database initalized successfully. Click on the \"Next\" button to continue"); 1900 runSQLConsoleNextButton.setEnabled(true); 1901 } 1902 catch (SQLException ex) 1903 { 1904 runSQLConsolePasswordField.setText(""); 1905 runSQLConsoleTextArea.append("Login failed. Please try again. If you are unable to login and you think you have the correct " 1906 + "root password, it may be because " 1907 + "the database is not setup to accept a JDBC connection. You can bypass this step by skipping the " 1908 + "database initialization and initialize it manually as per the instructions in the SYSADMIN manual."); 1909 inform ("Login failed"); 1910 } 1911 catch (Exception ex1) 1912 { 1913 runSQLConsoleTextArea.append("Fatal error connecting to the database. Post installation failed to update database\n"); 1914 error("Error encountered while initializing database connection"); 1915 } 1916 } 1917 1918 public void print(String message) 1919 { 1920 if (printer != null) 1921 { 1922 printer.append(message); 1923 } 1924 } 1925 1926 public void println(String message) 1927 { 1928 if (printer != null) 1929 { 1930 printer.append(message + "\n"); 1931 } 1932 } 1933 1934 private java.awt.Button aceFolderExitButton; 1936 private java.awt.Button aceFolderHelpButton; 1937 private java.awt.Label aceFolderLabel; 1938 private java.awt.Button aceFolderNextButton; 1939 private java.awt.Panel aceFolderPanel; 1940 private java.awt.Button aceFolderPreviousButton; 1941 private java.awt.TextField aceFolderTextField; 1942 private java.awt.Button browseHomeFolderButton; 1943 private java.awt.Button browseJavaFolderButton; 1944 private java.awt.Label captionLabel; 1945 private java.awt.Label helpLabel; 1946 private java.awt.TextField hostNameTextField; 1947 private java.awt.Button informationProcessingNextButton; 1948 private java.awt.Panel informationProcessingPanel; 1949 private java.awt.Button informationVerificationExitButton; 1950 private java.awt.Button informationVerificationNextButton; 1951 private java.awt.Panel informationVerificationPanel; 1952 private java.awt.Button informationVerificationPreviousButton; 1953 private java.awt.TextArea initScriptsArea; 1954 private java.awt.TextArea installationDataTextArea; 1955 private java.awt.TextArea installationStatusTextArea; 1956 private java.awt.Label instructionLabel; 1957 private java.awt.TextField javaNameTextField; 1958 private java.awt.Label label1; 1959 private java.awt.Label label10; 1960 private java.awt.Label label11; 1961 private java.awt.Label label12; 1962 private java.awt.Label label13; 1963 private java.awt.Label label14; 1964 private java.awt.Label label15; 1965 private java.awt.Label label16; 1966 private java.awt.Label label17; 1967 private java.awt.Label label18; 1968 private java.awt.Label label19; 1969 private java.awt.Label label2; 1970 private java.awt.Label label20; 1971 private java.awt.Label label21; 1972 private java.awt.Label label22; 1973 private java.awt.Label label3; 1974 private java.awt.Label label4; 1975 private java.awt.Label label5; 1976 private java.awt.Label label6; 1977 private java.awt.Label label7; 1978 private java.awt.Label label8; 1979 private java.awt.Label label9; 1980 private java.awt.Panel lastPanel; 1981 private java.awt.Button lastPanelExitButton; 1982 private java.awt.Label licenseLabel; 1983 private java.awt.Label licenseLocationLabel; 1984 private java.awt.Label licenseOpenInstructionLabel; 1985 private java.awt.Panel mainPanel; 1986 private java.awt.Button optionsExitButton; 1987 private java.awt.Button optionsHelpButton; 1988 private java.awt.TextField optionsLogEmailTextField; 1989 private java.awt.Button optionsNextButton; 1990 private java.awt.TextField optionsOOSEmailTextField; 1991 private java.awt.TextField optionsOperatorEmailTextField; 1992 private java.awt.Panel optionsPanel; 1993 private java.awt.Button optionsPreviousButton; 1994 private java.awt.TextField optionsSMTPServerTextField; 1995 private java.awt.Checkbox optionsUseEmbeddedWebServerCheckbox; 1996 private java.awt.Panel panel1; 1997 private java.awt.Panel panel2; 1998 private java.awt.Panel panel3; 1999 private java.awt.Panel panel4; 2000 private java.awt.Panel panel5; 2001 private java.awt.Panel panel6; 2002 private java.awt.Button runSQLConsoleLoginButton; 2003 private java.awt.Label runSQLConsoleLoginLabel; 2004 private java.awt.Button runSQLConsoleNextButton; 2005 private java.awt.Panel runSQLConsolePanel; 2006 private java.awt.TextField runSQLConsolePasswordField; 2007 private java.awt.Button runSQLConsoleSkipButton; 2008 private java.awt.TextArea runSQLConsoleTextArea; 2009 private java.awt.Button runUnixScriptsNextButton; 2010 private java.awt.Panel runUnixScriptsPanel; 2011 private java.awt.Button sqlDBExitButton; 2012 private java.awt.Button sqlDBHelpButton; 2013 private java.awt.TextField sqlDBHostNameTextField; 2014 private java.awt.Panel sqlDBInfoPanel; 2015 private java.awt.Button sqlDBNextButton; 2016 private java.awt.TextField sqlDBPasswordTextField; 2017 private java.awt.Button sqlDBPreviousButton; 2018 private java.awt.TextField sqlDBUserNameTextField; 2019 private java.awt.TextField sqlDBVerifyPasswordTextField; 2020 private java.awt.Button startDBNextButton; 2021 private java.awt.Panel startDBPanel; 2022 private java.awt.TextField statusBar; 2023 private java.awt.TextArea textArea1; 2024 private java.awt.Panel welcomePanel; 2025 private java.awt.Button welcomeScreenAcceptLicenseButton; 2026 private java.awt.Button welcomeScreenExitButton; 2027 2029 private String os; 2030 private ConfigParams installParams = new ConfigParams(); 2031 private Locale locale = new Locale("en", "US"); 2032 private DataValidator dataValidator = new DataValidator(installParams); 2033 private TextArea printer; 2034} 2035 | Popular Tags |