net.sf.taverna.raven.profile
Class ProfileUpdateHandler

java.lang.Object
  extended by net.sf.taverna.raven.profile.ProfileUpdateHandler

public class ProfileUpdateHandler
extends java.lang.Object

Handles checking if a new version of of a profile is available, and the copying of the remote profile version to the current if its is selected.

Author:
Stuart Owen

Constructor Summary
ProfileUpdateHandler(java.net.URL profileListURL, java.net.URL currentProfileURL)
          Processes the profiles and profile list at the URLS and determines if an updated profile is available.
 
Method Summary
 boolean isNewVersionAvailable()
           
 void updateLocalProfile(java.io.File localFile)
          Copies the latest profile to the local file
 void updateLocalProfile(ProfileVersion newVersion, java.io.File localFile)
          Updates the local profile to that specified by newVersion
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileUpdateHandler

public ProfileUpdateHandler(java.net.URL profileListURL,
                            java.net.URL currentProfileURL)
Processes the profiles and profile list at the URLS and determines if an updated profile is available.

Parameters:
profileListURL - - URL to the list of available profiles
currentProfileURL - - URL to the local profile currently in use
Method Detail

updateLocalProfile

public void updateLocalProfile(java.io.File localFile)
                        throws java.lang.Exception
Copies the latest profile to the local file

Parameters:
localFile - - File for the local profile
Throws:
java.lang.Exception

updateLocalProfile

public void updateLocalProfile(ProfileVersion newVersion,
                               java.io.File localFile)
                        throws java.lang.Exception
Updates the local profile to that specified by newVersion

Parameters:
newVersion -
localFile -
Throws:
java.lang.Exception

isNewVersionAvailable

public boolean isNewVersionAvailable()