cz.polous.andaria
Class PatchItem

java.lang.Object
  extended by cz.polous.andaria.PatchItem

 class PatchItem
extends java.lang.Object

PatchItem: Object of one patch file and procedures to control it.

Author:
Martin Polehla (andaria_patcher@polous.cz)

Field Summary
private  java.lang.Boolean autoInstallFlag
           
private  java.util.Date currentDate
           
private  java.lang.String currentVersion
           
private  java.util.Date date
           
private  java.text.DateFormat dateFormat
           
private  java.lang.String description
           
private  java.lang.Boolean downloaded
           
private  java.lang.String fileName
           
private  java.math.BigInteger hash
           
private  java.lang.Boolean installed
           
private  java.lang.Boolean installFlag
           
private static Log log
           
private  java.lang.String name
           
 PatchPanel panel
           
private  java.lang.Boolean requiredFlag
           
private  long size
           
private  java.lang.String version
           
 
Constructor Summary
PatchItem(java.lang.String[] data)
          Creates a new instance of PatchItem
 
Method Summary
 boolean getAutoInstallFlag()
           
 java.text.DateFormat getDateFormat()
           
 java.lang.String getDates()
           
 java.lang.String getDescription()
           
 java.lang.String getFileName()
           
 java.lang.String getHash()
           
 javax.swing.JPanel getInFrame()
           
 java.lang.String getInLine()
           
 boolean getInstallFlag()
           
 java.lang.String getLocalFileName()
           
 java.lang.String getName()
           
 java.lang.String getRemoteFileName()
           
 long getSize()
           
 java.lang.String getVersion()
           
 java.lang.String getVersions()
           
 boolean checkHash()
          Control local if local file hash (md5) is rigth
 boolean isInstalled()
           
 boolean isPacked()
           
 boolean isRequired()
           
 void setAutoInstallFlag(boolean b)
           
 void setDownloaded(boolean b)
           
 void setInstalled()
          Set patch Item as intalled - uncheck in patchlist - set to settings
 void setInstallFlag(boolean b)
           
 void switchInstallFlag()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name

hash

private java.math.BigInteger hash

version

private java.lang.String version

currentVersion

private java.lang.String currentVersion

date

private java.util.Date date

currentDate

private java.util.Date currentDate

requiredFlag

private java.lang.Boolean requiredFlag

installFlag

private java.lang.Boolean installFlag

autoInstallFlag

private java.lang.Boolean autoInstallFlag

installed

private java.lang.Boolean installed

description

private java.lang.String description

fileName

private java.lang.String fileName

size

private long size

downloaded

private java.lang.Boolean downloaded

log

private static Log log

panel

public PatchPanel panel

dateFormat

private final java.text.DateFormat dateFormat
Constructor Detail

PatchItem

public PatchItem(java.lang.String[] data)
Creates a new instance of PatchItem

Method Detail

getDateFormat

public java.text.DateFormat getDateFormat()

getInLine

public java.lang.String getInLine()

getInFrame

public javax.swing.JPanel getInFrame()

getLocalFileName

public java.lang.String getLocalFileName()

getRemoteFileName

public java.lang.String getRemoteFileName()

getName

public java.lang.String getName()

getDescription

public java.lang.String getDescription()

getDates

public java.lang.String getDates()

getVersion

public java.lang.String getVersion()

getVersions

public java.lang.String getVersions()

getHash

public java.lang.String getHash()

getFileName

public java.lang.String getFileName()

getSize

public long getSize()

isInstalled

public boolean isInstalled()

isPacked

public boolean isPacked()

isRequired

public boolean isRequired()

getInstallFlag

public boolean getInstallFlag()

getAutoInstallFlag

public boolean getAutoInstallFlag()

setDownloaded

public void setDownloaded(boolean b)

setAutoInstallFlag

public void setAutoInstallFlag(boolean b)

setInstallFlag

public void setInstallFlag(boolean b)

switchInstallFlag

public void switchInstallFlag()

checkHash

public boolean checkHash()
                  throws java.io.IOException,
                         java.lang.Exception
Control local if local file hash (md5) is rigth

Returns:
If hash check passed. If an error ocures, returned value will be false too.
Throws:
java.io.IOException
java.lang.Exception

setInstalled

public void setInstalled()
Set patch Item as intalled - uncheck in patchlist - set to settings