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

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

public class UpdateInstallerImpl
extends Object
implements UpdateInstaller


Field Summary
protected static String ACTIONS_LEGACY
           
protected static String ACTIONS_UTF8
           
protected static AEMonitor class_mon
           
protected static String UPDATE_DIR
           
 
Constructor Summary
protected UpdateInstallerImpl(UpdateManagerImpl _manager)
           
 
Method Summary
 void addChangeRightsAction(String rights, String to_file)
          Add an installation "change rights" action to change a file rights
 void addMoveAction(String from_file_or_resource, String to_file)
          Add an installation "move" action to move either an absolute file or resource
 void addRemoveAction(String file)
          Adds an action to remove either a directory (recursively delete) or file
 void addResource(String resource_name, InputStream is)
          Add a resource to the installation.
 void addResource(String resource_name, InputStream is, boolean closeInputStream)
          Add a resource to the installation.
protected  void appendAction(String data)
           
protected static void checkForFailedInstalls(UpdateManagerImpl manager)
           
 void destroy()
           
 String getInstallDir()
          Returns the absolute path of the Azureus install dir (i.e.
 String getUserDir()
          Returns the absolute path of the user dir (i.e.
 void installNow(UpdateInstallerListener listener)
          Runs the action now, not as part of a shutdown/restart of Vuze
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UPDATE_DIR

protected static final String UPDATE_DIR
See Also:
Constant Field Values

ACTIONS_LEGACY

protected static final String ACTIONS_LEGACY
See Also:
Constant Field Values

ACTIONS_UTF8

protected static final String ACTIONS_UTF8
See Also:
Constant Field Values

class_mon

protected static AEMonitor class_mon
Constructor Detail

UpdateInstallerImpl

protected UpdateInstallerImpl(UpdateManagerImpl _manager)
                       throws UpdateException
Throws:
UpdateException
Method Detail

checkForFailedInstalls

protected static void checkForFailedInstalls(UpdateManagerImpl manager)

addResource

public void addResource(String resource_name,
                        InputStream is)
                 throws UpdateException
Description copied from interface: UpdateInstaller
Add a resource to the installation. The file will be saved away for later use.

Specified by:
addResource in interface UpdateInstaller
Parameters:
resource_name - non-qualified name for the resource - i.e. not an absolute file name but rather something local like "fred". This can then be used later in actions
Throws:
UpdateException

addResource

public void addResource(String resource_name,
                        InputStream is,
                        boolean closeInputStream)
                 throws UpdateException
Description copied from interface: UpdateInstaller
Add a resource to the installation. The file will be saved away for later use.

Specified by:
addResource in interface UpdateInstaller
Parameters:
resource_name - non-qualified name for the resource - i.e. not an absolute file name but rather something local like "fred". This can then be used later in actions
closeInputStream - if false, the InputStream is won't be closed
Throws:
UpdateException

getInstallDir

public String getInstallDir()
Description copied from interface: UpdateInstaller
Returns the absolute path of the Azureus install dir (i.e. where Azureus2.jar etc is located)

Specified by:
getInstallDir in interface UpdateInstaller
Returns:

getUserDir

public String getUserDir()
Description copied from interface: UpdateInstaller
Returns the absolute path of the user dir (i.e. where config is stored)

Specified by:
getUserDir in interface UpdateInstaller
Returns:

addMoveAction

public void addMoveAction(String from_file_or_resource,
                          String to_file)
                   throws UpdateException
Description copied from interface: UpdateInstaller
Add an installation "move" action to move either an absolute file or resource

Specified by:
addMoveAction in interface UpdateInstaller
to_file - absolute
Throws:
UpdateException

addChangeRightsAction

public void addChangeRightsAction(String rights,
                                  String to_file)
                           throws UpdateException
Description copied from interface: UpdateInstaller
Add an installation "change rights" action to change a file rights

Specified by:
addChangeRightsAction in interface UpdateInstaller
Parameters:
rights - the rights, for example "776"
to_file - absolute
Throws:
UpdateException

addRemoveAction

public void addRemoveAction(String file)
                     throws UpdateException
Description copied from interface: UpdateInstaller
Adds an action to remove either a directory (recursively delete) or file

Specified by:
addRemoveAction in interface UpdateInstaller
Throws:
UpdateException

appendAction

protected void appendAction(String data)
                     throws UpdateException
Throws:
UpdateException

installNow

public void installNow(UpdateInstallerListener listener)
                throws UpdateException
Description copied from interface: UpdateInstaller
Runs the action now, not as part of a shutdown/restart of Vuze

Specified by:
installNow in interface UpdateInstaller
Throws:
UpdateException

destroy

public void destroy()
Specified by:
destroy in interface UpdateInstaller