update
Class JAPUpdateWizard

java.lang.Object
  extended by gui.wizard.BasicWizard
      extended by update.JAPUpdateWizard
All Implemented Interfaces:
Wizard, java.lang.Runnable

public final class JAPUpdateWizard
extends BasicWizard
implements java.lang.Runnable


Nested Class Summary
(package private)  class JAPUpdateWizard.JapDownloadManager
          This class manages the download process of a new Jap version jar file.
 
Field Summary
private static java.io.File CLASSFILE
           
 JAPDownloadWizardPage downloadPage
           
private static java.lang.String EXTENSION_BACKUP
           
private static java.lang.String EXTENSION_NEW
           
 JAPFinishWizardPage finishPage
           
private  BasicWizardHost host
           
private  JAPVersionInfo japVersionInfo
           
private  byte[] m_arBufferNewJapJar
           
private  java.io.File m_fileAktJapJar
           
private  java.io.File m_fileJapJarCopy
           
private  java.io.File m_fileNewJapJar
           
private  int m_Status
           
private  java.lang.String m_strAktJapJarExtension
           
private  java.lang.String m_strAktJapJarFileName
           
private  java.lang.String m_strAktJapJarPath
           
private  java.lang.String m_strNewJapVersion
           
private  java.lang.String m_strTempDirectory
           
private static java.lang.String MSG_ADMIN_RIGHTS_NEEDED
           
private static java.lang.String MSG_ENTER_ADMIN_PASSWORD
           
static java.lang.String MSG_JAVA_TOO_OLD
           
private  boolean updateAborted
           
static int UPDATESTATUS_ABORTED
           
static int UPDATESTATUS_ERROR
           
static int UPDATESTATUS_SUCCESS
           
private  java.lang.Thread updateThread
           
private  java.io.File updJapJar
           
 JAPWelcomeWizardPage welcomePage
           
 
Fields inherited from class gui.wizard.BasicWizard
m_PageIndex, m_Pages
 
Constructor Summary
  JAPUpdateWizard(JAPVersionInfo info, java.awt.Component a_container)
           
  JAPUpdateWizard(JAPVersionInfo info, JAPDialog a_dialog)
           
private JAPUpdateWizard(JAPVersionInfo info, java.lang.Object a_parent)
           
 
Method Summary
private  int applyJARDiffJAPJar()
           
 WizardPage back()
           
private  boolean checkSignature()
          Step 4 check the signature of the downloaded file
private  int createNewJAPJar()
           
private  int downloadUpdate()
          Downloads a new JAP jar file.
 WizardPage finish()
           
 int getStatus()
           
 WizardPage next()
           
private  int overwriteJapJar()
           
private  void parsePathToJapJar()
           
private  int renameJapJar()
           
private  void resetChanges()
           
 void run()
           
private  void setJapJarFile(java.io.File japjarfile)
           
private  void startUpdateThread()
           
 void wizardCompleted()
           
 
Methods inherited from class gui.wizard.BasicWizard
addWizardPage, getHost, getWizardTitle, help, initTotalSteps, invokeWizard, setHost, setWizardTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

welcomePage

public JAPWelcomeWizardPage welcomePage

downloadPage

public JAPDownloadWizardPage downloadPage

finishPage

public JAPFinishWizardPage finishPage

host

private BasicWizardHost host

m_strTempDirectory

private java.lang.String m_strTempDirectory

MSG_JAVA_TOO_OLD

public static final java.lang.String MSG_JAVA_TOO_OLD

MSG_ADMIN_RIGHTS_NEEDED

private static final java.lang.String MSG_ADMIN_RIGHTS_NEEDED

MSG_ENTER_ADMIN_PASSWORD

private static final java.lang.String MSG_ENTER_ADMIN_PASSWORD

m_strAktJapJarFileName

private java.lang.String m_strAktJapJarFileName

m_strAktJapJarExtension

private java.lang.String m_strAktJapJarExtension

m_strAktJapJarPath

private java.lang.String m_strAktJapJarPath

EXTENSION_BACKUP

private static final java.lang.String EXTENSION_BACKUP
See Also:
Constant Field Values

EXTENSION_NEW

private static final java.lang.String EXTENSION_NEW
See Also:
Constant Field Values

CLASSFILE

private static final java.io.File CLASSFILE

updateAborted

private boolean updateAborted

m_strNewJapVersion

private java.lang.String m_strNewJapVersion

japVersionInfo

private JAPVersionInfo japVersionInfo

m_fileAktJapJar

private java.io.File m_fileAktJapJar

m_fileJapJarCopy

private java.io.File m_fileJapJarCopy

m_fileNewJapJar

private java.io.File m_fileNewJapJar

updJapJar

private java.io.File updJapJar

m_arBufferNewJapJar

private byte[] m_arBufferNewJapJar

updateThread

private java.lang.Thread updateThread

m_Status

private int m_Status

UPDATESTATUS_SUCCESS

public static final int UPDATESTATUS_SUCCESS
See Also:
Constant Field Values

UPDATESTATUS_ABORTED

public static final int UPDATESTATUS_ABORTED
See Also:
Constant Field Values

UPDATESTATUS_ERROR

public static final int UPDATESTATUS_ERROR
See Also:
Constant Field Values
Constructor Detail

JAPUpdateWizard

public JAPUpdateWizard(JAPVersionInfo info,
                       JAPDialog a_dialog)

JAPUpdateWizard

public JAPUpdateWizard(JAPVersionInfo info,
                       java.awt.Component a_container)

JAPUpdateWizard

private JAPUpdateWizard(JAPVersionInfo info,
                        java.lang.Object a_parent)
Method Detail

getStatus

public int getStatus()

startUpdateThread

private void startUpdateThread()

run

public void run()
Specified by:
run in interface java.lang.Runnable

setJapJarFile

private void setJapJarFile(java.io.File japjarfile)

next

public WizardPage next()
Specified by:
next in interface Wizard
Overrides:
next in class BasicWizard

finish

public WizardPage finish()
Specified by:
finish in interface Wizard
Overrides:
finish in class BasicWizard

back

public WizardPage back()
Specified by:
back in interface Wizard
Overrides:
back in class BasicWizard

wizardCompleted

public void wizardCompleted()
Specified by:
wizardCompleted in interface Wizard
Overrides:
wizardCompleted in class BasicWizard

parsePathToJapJar

private void parsePathToJapJar()

renameJapJar

private int renameJapJar()

downloadUpdate

private int downloadUpdate()
Downloads a new JAP jar file.

Returns:
The error code of the download (0 - successful, -1 - there was an error / abort).

createNewJAPJar

private int createNewJAPJar()

applyJARDiffJAPJar

private int applyJARDiffJAPJar()

checkSignature

private boolean checkSignature()
Step 4 check the signature of the downloaded file

Returns:
true, if Signature of downloaded JAP.jar is ok

overwriteJapJar

private int overwriteJapJar()

resetChanges

private void resetChanges()