Package com.biglybt.pif.update
Interface UpdateInstaller
- All Known Implementing Classes:
UpdateInstallerImpl
public interface UpdateInstaller
-
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.void
destroy()
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
-
Method Details
-
addResource
Add a resource to the installation. The file will be saved away for later use.- 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 actionsis
-- Throws:
UpdateException
-
addResource
void addResource(String resource_name, InputStream is, boolean closeInputStream) throws UpdateException Add a resource to the installation. The file will be saved away for later use.- 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 actionsis
-closeInputStream
- if false, the InputStream is won't be closed- Throws:
UpdateException
-
getInstallDir
String getInstallDir()Returns the absolute path of the app install dir (i.e. where .jar etc is located)- Returns:
-
getUserDir
String getUserDir()Returns the absolute path of the user dir (i.e. where config is stored)- Returns:
-
addMoveAction
Add an installation "move" action to move either an absolute file or resource- Parameters:
to_file
- absolutefrom_file
- either absolute or relative- Throws:
UpdateException
-
addChangeRightsAction
Add an installation "change rights" action to change a file rights- Parameters:
rights
- the rights, for example "776"to_file
- absolute- Throws:
UpdateException
-
addRemoveAction
Adds an action to remove either a directory (recursively delete) or file- Parameters:
file
-- Throws:
UpdateException
-
installNow
Runs the action now, not as part of a shutdown/restart of Vuze- Throws:
UpdateException
-
destroy
void destroy()
-