org.gudy.azureus2.pluginsimpl.local.update
Class UpdateImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.update.UpdateImpl
All Implemented Interfaces:
Update

public class UpdateImpl
extends Object
implements Update


Field Summary
 
Fields inherited from interface org.gudy.azureus2.plugins.update.Update
RESTART_REQUIRED_MAYBE, RESTART_REQUIRED_NO, RESTART_REQUIRED_YES
 
Constructor Summary
protected UpdateImpl(UpdateCheckInstanceImpl _instance, UpdatableComponentImpl _component, String _name, String[] _desc, String _old_version, String _new_version, ResourceDownloader[] _downloaders, boolean _mandatory, int _restart_required)
           
 
Method Summary
 void addListener(UpdateListener l)
           
 void cancel()
          cancel this update
 void complete(boolean success)
          mark the update as complete and inform any listeners
 UpdateCheckInstance getCheckInstance()
           
protected  UpdatableComponentImpl getComponent()
           
 Object getDecision(int decision_type, String decision_name, String decision_description, Object decision_data)
           
 String getDesciptionURL()
           
 String[] getDescription()
           
 ResourceDownloader[] getDownloaders()
           
 String getName()
           
 String getNewVersion()
           
 String getOldVersion()
           
 String getRelativeURLBase()
           
 int getRestartRequired()
           
 Object getUserObject()
           
 boolean isCancelled()
           
 boolean isComplete()
           
 boolean isMandatory()
           
 void removeListener(UpdateListener l)
           
 void setDescriptionURL(String url)
           
 void setRelativeURLBase(String base)
           
 void setRestartRequired(int _restart_required)
           
 void setUserObject(Object obj)
           
 InputStream verifyData(InputStream is, boolean force)
           
 boolean wasSuccessful()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateImpl

protected UpdateImpl(UpdateCheckInstanceImpl _instance,
                     UpdatableComponentImpl _component,
                     String _name,
                     String[] _desc,
                     String _old_version,
                     String _new_version,
                     ResourceDownloader[] _downloaders,
                     boolean _mandatory,
                     int _restart_required)
Method Detail

getCheckInstance

public UpdateCheckInstance getCheckInstance()
Specified by:
getCheckInstance in interface Update

getComponent

protected UpdatableComponentImpl getComponent()

getName

public String getName()
Specified by:
getName in interface Update

getDescription

public String[] getDescription()
Specified by:
getDescription in interface Update

getRelativeURLBase

public String getRelativeURLBase()
Specified by:
getRelativeURLBase in interface Update

setRelativeURLBase

public void setRelativeURLBase(String base)
Specified by:
setRelativeURLBase in interface Update

getDesciptionURL

public String getDesciptionURL()
Specified by:
getDesciptionURL in interface Update
Returns:
null if no description url

setDescriptionURL

public void setDescriptionURL(String url)
Specified by:
setDescriptionURL in interface Update
Parameters:
url - URL to load instead of showing the description text)

getOldVersion

public String getOldVersion()
Specified by:
getOldVersion in interface Update

getNewVersion

public String getNewVersion()
Specified by:
getNewVersion in interface Update

getDownloaders

public ResourceDownloader[] getDownloaders()
Specified by:
getDownloaders in interface Update

isMandatory

public boolean isMandatory()
Specified by:
isMandatory in interface Update

setRestartRequired

public void setRestartRequired(int _restart_required)
Specified by:
setRestartRequired in interface Update

getRestartRequired

public int getRestartRequired()
Specified by:
getRestartRequired in interface Update

setUserObject

public void setUserObject(Object obj)
Specified by:
setUserObject in interface Update

getUserObject

public Object getUserObject()
Specified by:
getUserObject in interface Update

cancel

public void cancel()
Description copied from interface: Update
cancel this update

Specified by:
cancel in interface Update

complete

public void complete(boolean success)
Description copied from interface: Update
mark the update as complete and inform any listeners

Specified by:
complete in interface Update

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Update

isComplete

public boolean isComplete()
Specified by:
isComplete in interface Update

wasSuccessful

public boolean wasSuccessful()
Specified by:
wasSuccessful in interface Update

getDecision

public Object getDecision(int decision_type,
                          String decision_name,
                          String decision_description,
                          Object decision_data)
Specified by:
getDecision in interface Update

verifyData

public InputStream verifyData(InputStream is,
                              boolean force)
                       throws UpdateException
Specified by:
verifyData in interface Update
Throws:
UpdateException

addListener

public void addListener(UpdateListener l)
Specified by:
addListener in interface Update

removeListener

public void removeListener(UpdateListener l)
Specified by:
removeListener in interface Update