Package com.biglybt.pifimpl.local.update
Class UpdateInstallerImpl
java.lang.Object
com.biglybt.pifimpl.local.update.UpdateInstallerImpl
- All Implemented Interfaces:
UpdateInstaller
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeRightsAction
(String rights, String to_file) Add an installation "change rights" action to change a file rightsvoid
addMoveAction
(String from_file_or_resource, String to_file) Add an installation "move" action to move either an absolute file or resourcevoid
addRemoveAction
(String file) Adds an action to remove either a directory (recursively delete) or filevoid
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) private void
void
destroy()
private String
escapeFile
(String file) Returns the absolute path of the app install dir (i.e.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
-
Field Details
-
UPDATE_DIR
- See Also:
-
ACTIONS_LEGACY
- See Also:
-
ACTIONS_UTF8
- See Also:
-
class_mon
-
manager
-
install_dir
-
-
Constructor Details
-
UpdateInstallerImpl
- Throws:
UpdateException
-
-
Method Details
-
checkForFailedInstalls
-
addResource
Description copied from interface:UpdateInstaller
Add a resource to the installation. The file will be saved away for later use.- Specified by:
addResource
in interfaceUpdateInstaller
- 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 interfaceUpdateInstaller
- 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 actionscloseInputStream
- if false, the InputStream is won't be closed- Throws:
UpdateException
-
getInstallDir
Description copied from interface:UpdateInstaller
Returns the absolute path of the app install dir (i.e. where .jar etc is located)- Specified by:
getInstallDir
in interfaceUpdateInstaller
- Returns:
-
getUserDir
Description copied from interface:UpdateInstaller
Returns the absolute path of the user dir (i.e. where config is stored)- Specified by:
getUserDir
in interfaceUpdateInstaller
- Returns:
-
addMoveAction
Description copied from interface:UpdateInstaller
Add an installation "move" action to move either an absolute file or resource- Specified by:
addMoveAction
in interfaceUpdateInstaller
to_file
- absolute- Throws:
UpdateException
-
addChangeRightsAction
Description copied from interface:UpdateInstaller
Add an installation "change rights" action to change a file rights- Specified by:
addChangeRightsAction
in interfaceUpdateInstaller
- Parameters:
rights
- the rights, for example "776"to_file
- absolute- Throws:
UpdateException
-
addRemoveAction
Description copied from interface:UpdateInstaller
Adds an action to remove either a directory (recursively delete) or file- Specified by:
addRemoveAction
in interfaceUpdateInstaller
- Throws:
UpdateException
-
escapeFile
-
appendAction
- Throws:
UpdateException
-
installNow
Description copied from interface:UpdateInstaller
Runs the action now, not as part of a shutdown/restart of Vuze- Specified by:
installNow
in interfaceUpdateInstaller
- Throws:
UpdateException
-
destroy
public void destroy()- Specified by:
destroy
in interfaceUpdateInstaller
-
deleteInstaller
private void deleteInstaller()
-