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 java.lang.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, java.lang.String _name, java.lang.String[] _desc, java.lang.String _old_version, java.lang.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()
           
 java.lang.Object getDecision(int decision_type, java.lang.String decision_name, java.lang.String decision_description, java.lang.Object decision_data)
           
 java.lang.String getDesciptionURL()
           
 java.lang.String[] getDescription()
           
 ResourceDownloader[] getDownloaders()
           
 java.lang.String getName()
           
 java.lang.String getNewVersion()
           
 java.lang.String getOldVersion()
           
 java.lang.String getRelativeURLBase()
           
 int getRestartRequired()
           
 java.lang.Object getUserObject()
           
 boolean isCancelled()
           
 boolean isComplete()
           
 boolean isMandatory()
           
 void removeListener(UpdateListener l)
           
 void setDescriptionURL(java.lang.String url)
           
 void setRelativeURLBase(java.lang.String base)
           
 void setRestartRequired(int _restart_required)
           
 void setUserObject(java.lang.Object obj)
           
 java.io.InputStream verifyData(java.io.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,
                     java.lang.String _name,
                     java.lang.String[] _desc,
                     java.lang.String _old_version,
                     java.lang.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 java.lang.String getName()
Specified by:
getName in interface Update

getDescription

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

getRelativeURLBase

public java.lang.String getRelativeURLBase()
Specified by:
getRelativeURLBase in interface Update

setRelativeURLBase

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

getDesciptionURL

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

setDescriptionURL

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

getOldVersion

public java.lang.String getOldVersion()
Specified by:
getOldVersion in interface Update

getNewVersion

public java.lang.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(java.lang.Object obj)
Specified by:
setUserObject in interface Update

getUserObject

public java.lang.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 java.lang.Object getDecision(int decision_type,
                                    java.lang.String decision_name,
                                    java.lang.String decision_description,
                                    java.lang.Object decision_data)
Specified by:
getDecision in interface Update

verifyData

public java.io.InputStream verifyData(java.io.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