org.jasen.update
Class JasenAutoUpdateParcelWrapper

java.lang.Object
  extended byorg.jasen.update.JasenAutoUpdateParcelWrapper

public class JasenAutoUpdateParcelWrapper
extends Object

Provides a read-only wrapper around an update parcel.

An update parcel is the summary information about an update which is downloaded prior to the update itself

Author:
Jason Polites

Constructor Summary
JasenAutoUpdateParcelWrapper(JasenAutoUpdateParcel parcel)
           
 
Method Summary
 String getArchiveName()
          Gets the name of the update package to be downloaded.
 String getClassName()
          Gets the name of the class that will be executed after the update has been downloaded.
 List getFiles()
          Gets the list of files contained in the update.
 String getJarName()
          Gets the name of the jar file which contains the executable class.
 String getJarPath()
          Gets the local (relative) path to which the jar file will be deposited.
 boolean getRetainJar()
          A boolean value which indicates whether the jar file will be retained after the update has completed.
 long getSize()
          Gets the size (in bytes) of the update.
 String getUpdateDate()
          Gets the date of the update as a String.
 String getUpdateId()
          Gets the ID of the update.
 boolean getWebUpdateRequired()
          A boolean value which indicates whether a separate (manual) website update is required.
 String getWebUpdateUrl()
          If a website update is required, returns the URL of the site containing the update.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JasenAutoUpdateParcelWrapper

public JasenAutoUpdateParcelWrapper(JasenAutoUpdateParcel parcel)
Method Detail

getArchiveName

public String getArchiveName()
Gets the name of the update package to be downloaded.

Returns:
The name of the update package (jar)

getClassName

public String getClassName()
Gets the name of the class that will be executed after the update has been downloaded. May be null.

Returns:
The fully qualified class name of the class to be executed
See Also:
AutoUpdateExecutor

getFiles

public List getFiles()
Gets the list of files contained in the update.

Returns:
A list of JasenAutoUpdateFile objects
See Also:
JasenAutoUpdateFile

getJarName

public String getJarName()
Gets the name of the jar file which contains the executable class. May be null.

Returns:
The name (relative path) of the jar file in which the executable class is contained
See Also:
AutoUpdateExecutor

getJarPath

public String getJarPath()
Gets the local (relative) path to which the jar file will be deposited.

Returns:
The local relative path of the jar file

getRetainJar

public boolean getRetainJar()
A boolean value which indicates whether the jar file will be retained after the update has completed.

Returns:
True if the jar file will be retained, false otherwise or if there was no jar file

getSize

public long getSize()
Gets the size (in bytes) of the update.

Returns:
The size in bytes

getUpdateDate

public String getUpdateDate()
Gets the date of the update as a String.

Returns:
A String representation of the update in dd-MM-yyyy HH:mm format

getUpdateId

public String getUpdateId()
Gets the ID of the update. This should be different for every update.

Returns:
A string representation of the ID. The ID itself is usually an integer

getWebUpdateRequired

public boolean getWebUpdateRequired()
A boolean value which indicates whether a separate (manual) website update is required.

Returns:
True if there is further updates which cannot be completed via Auto Update, false otherwise.

getWebUpdateUrl

public String getWebUpdateUrl()
If a website update is required, returns the URL of the site containing the update. May be null.

Returns:
The URL of the update site from which further (manual) updates should be installed.