public interface ApplicationInstaller
Modifier and Type | Method and Description |
---|---|
void |
addApplicationInstallationListener(ApplicationInstallationListener applicationInstallationListener)
Adds an application installation listener.
|
boolean |
canUninstall(Application application)
Checks if we can uninstall the given application.
|
Application |
install(InputStream stream)
Installs an application from an input stream.
|
Application |
install(InputStream stream,
IProgressMonitor monitor)
Installs an application from an input stream.
|
void |
removeApplicationInstallationListener(ApplicationInstallationListener applicationInstallationListener)
Removes an application installation listener.
|
boolean |
uninstall(Application application)
Uninstalls an application.
|
boolean |
uninstall(Application application,
IProgressMonitor monitor)
Uninstalls an application.
|
void addApplicationInstallationListener(ApplicationInstallationListener applicationInstallationListener)
It will be notified for each application installation or uninstallation.
applicationInstallationListener
- the listener to add.boolean canUninstall(Application application)
application
- the application to check.true
if the application can been uninstalled, false
otherwise.Application install(InputStream stream) throws ApplicationOperationException
stream
- the stream containing the application.SecurityException
- if a security manager exits and if the caller does not have the appropriate permissions.ApplicationOperationException
- if any unexpected errors occur while installing this application.Application install(InputStream stream, IProgressMonitor monitor) throws ApplicationOperationException
stream
- the stream containing the application.monitor
- the progress monitor to use for reporting progress to the user. It is the caller's responsibility to
call done() on the given monitor.SecurityException
- if a security manager exits and if the caller does not have the appropriate permissions.ApplicationOperationException
- if any unexpected errors occur while installing this application.void removeApplicationInstallationListener(ApplicationInstallationListener applicationInstallationListener)
If the given listener is not registered, nothing is done.
applicationInstallationListener
- the listener to remove.boolean uninstall(Application application) throws ApplicationOperationException
application
- the application to uninstall.true
if the application has been uninstalled, false
otherwise.SecurityException
- if a security manager exits and if the caller does not have the appropriate permissions.ApplicationOperationException
- if any unexpected errors occur while uninstalling this application.boolean uninstall(Application application, IProgressMonitor monitor) throws ApplicationOperationException
application
- the application to uninstall.monitor
- the progress monitor to use for reporting progress to the user. It is the caller's responsibility to
call done() on the given monitor.true
if the application has been uninstalled, false
otherwise.SecurityException
- if a security manager exits and if the caller does not have the appropriate permissions.ApplicationOperationException
- if any unexpected errors occur while uninstalling this application.