Version 1.2 (June 2013)
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
soft_update.Update_IDynomics Class Reference

Performs an update to the iDynomics tool if a new version has been detected. More...

Inheritance diagram for soft_update.Update_IDynomics:

Public Member Functions

 Update_IDynomics ()
 Constructor to launch the procedure of an iDynomics update. More...
 
void copy (String srFile, String dtFile) throws FileNotFoundException, IOException
 Replaces old version of a file with the updated version from the repository. More...
 

Static Public Member Functions

static void main (String args[])
 Main method - called to begin the process of updating iDynomics. More...
 

Public Attributes

String pathToURLhtml = "http://www.biosciences-labs.bham.ac.uk/kreftlab/iDynomics/updater_check/url.html"
 

Detailed Description

Performs an update to the iDynomics tool if a new version has been detected.

This class should be thought of as a standalone class. It may be packaged within iDynomics, and called by iDynomics, but is run independently as its own jar file. The purpose of this is to download the latest version from the web repository, extract the files, update the currently downloaded version to the new version, and then delete files used in the update. As this is changing class files, one of which could be the main simulator, the simulation should be shut down when this is done. Therefore, iDynomics calls this jar and exits - the update can be performed, and the user should then restart iDynomics.

This code has been amended from a freely available example update procedure written by Thomas Otero, documented here: http://www.dreamincode.net/forums/topic/190944-creating-an-updater-in-java/

Author
Thomas Otero - Created the original code and made this available online. This has been modified from his code.
Kieran Alden - Altered this code to fit iDynomics specifically and added the required documentation to suit doxygen output

Constructor & Destructor Documentation

soft_update.Update_IDynomics.Update_IDynomics ( )

Constructor to launch the procedure of an iDynomics update.

This constructor begins the update procedure by calling the methods to create a status window that specifies update progress, and the methods to perform the download of the update and copying of the relevant files

Member Function Documentation

void soft_update.Update_IDynomics.copy ( String  srFile,
String  dtFile 
) throws FileNotFoundException, IOException

Replaces old version of a file with the updated version from the repository.

This method replaces an old version of a simulation file with an up to date version

Parameters
srFilePath to the new updated file
dtFilePath to the file to be replaced
Exceptions
FileNotFoundExceptionException should this file not be found
IOExceptionException should there be an input/output error during copying
static void soft_update.Update_IDynomics.main ( String  args[])
static

Main method - called to begin the process of updating iDynomics.

This method is launched by the simulator when the user chooses to update iDynomics. The relevant download, unzip, and copy methods are then run as required.

Parameters
argsProgram arguments - though none are required in this case

Member Data Documentation

String soft_update.Update_IDynomics.pathToURLhtml = "http://www.biosciences-labs.bham.ac.uk/kreftlab/iDynomics/updater_check/url.html"

Path to the web address where url.html can be found - this file contains the web address of the update package


The documentation for this class was generated from the following file: