|
org.netbeans.modules.autoupdate.services 1.26.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.api.autoupdate.InstallSupport
public final class InstallSupport
Performs all operations scheduled on instance of OperationContainer.
Instance of InstallSupport can be obtained by calling OperationContainer.getSupport()
Typical scenario how to use:
OperationContainer created for chosen
operation: OperationContainer.createForInstall() or OperationContainer.createForUninstall() and contained
correct UpdateElements. See OperationContainerdoDownload(org.netbeans.api.progress.ProgressHandle, boolean) for downloading install data.doValidate(org.netbeans.api.autoupdate.InstallSupport.Validator, org.netbeans.api.progress.ProgressHandle) for verify consistency of downloaded data.doInstall(org.netbeans.api.autoupdate.InstallSupport.Installer, org.netbeans.api.progress.ProgressHandle) for install contained UpdateElement.doRestart(org.netbeans.api.autoupdate.OperationSupport.Restarter, org.netbeans.api.progress.ProgressHandle) or doRestartLater(org.netbeans.api.autoupdate.OperationSupport.Restarter).
UpdateElement element = ...;
OperationContainer<InstallSupport> container = createForInstall();
... add elements ...
InstallSupport support = container.getSupport();
Validator v = support.doDownload(null, false);
Installer i = support.doValidate(v, null);
Restarter r = support.doInstall(i, null);
if (r != null) {
support.doRestart(r, null);
}
| Nested Class Summary | |
|---|---|
static class |
InstallSupport.Installer
A helper object returned by a doValidate(org.netbeans.api.autoupdate.InstallSupport.Validator, org.netbeans.api.progress.ProgressHandle) for invoke
the method doInstall(org.netbeans.api.autoupdate.InstallSupport.Installer, org.netbeans.api.progress.ProgressHandle) |
static class |
InstallSupport.Validator
A helper object returned by a doDownload(org.netbeans.api.progress.ProgressHandle, boolean) for invoke
the method doValidate(org.netbeans.api.autoupdate.InstallSupport.Validator, org.netbeans.api.progress.ProgressHandle) |
| Method Summary | |
|---|---|
void |
doCancel()
Cancels changes done in previous calling methods. |
InstallSupport.Validator |
doDownload(ProgressHandle progress,
boolean isGlobal)
Downloads all instances i.e. |
OperationSupport.Restarter |
doInstall(InstallSupport.Installer installer,
ProgressHandle progress)
Validates all instances that have been verified in the previous step. |
void |
doRestart(OperationSupport.Restarter restarter,
ProgressHandle progress)
Completes the operation, applies all changes and ensures restart of the application immediately. |
void |
doRestartLater(OperationSupport.Restarter restarter)
Finishes operation, all the changes will be completed after restart the application. |
InstallSupport.Installer |
doValidate(InstallSupport.Validator validator,
ProgressHandle progress)
Validates all instances that have been downloaded in the previous step. |
String |
getCertificate(InstallSupport.Installer validator,
UpdateElement uElement)
Returns java.security.cert.Certificate.toString() of given UpdateElement. |
OperationContainer<InstallSupport> |
getContainer()
Returns the corresponing OperationContainer. |
boolean |
isSigned(InstallSupport.Installer validator,
UpdateElement uElement)
Returns if the UpdateElement is signed or not. |
boolean |
isTrusted(InstallSupport.Installer validator,
UpdateElement uElement)
Returns if the UpdateElement is trusted or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public InstallSupport.Validator doDownload(ProgressHandle progress,
boolean isGlobal)
throws OperationException
UpdateElements in corresponing OperationContainer.
progress - ProgressHandle for notification progress in downloading, can be nullisGlobal - if true then forces download instances into shared directories i.e. installation directory
Validator an instance of Validator which allows to verify downloaded instances in the next step
OperationException
public InstallSupport.Installer doValidate(InstallSupport.Validator validator,
ProgressHandle progress)
throws OperationException
validator - an instance of Validator that has been returned by {link @doDownload}. Mustn't be null.progress - ProgressHandle for notification progress in validation, can be null
Installer an instance of Installer which allows to install all verified instances
OperationExceptiondoDownload(org.netbeans.api.progress.ProgressHandle, boolean)
public OperationSupport.Restarter doInstall(InstallSupport.Installer installer,
ProgressHandle progress)
throws OperationException
installer - an instance of Installer that has been returned by InstallSupport#doValidate. Mustn't be null.progress - ProgressHandle for notification progress in installation, can be null
Restarter an instance of Restart if application restart is required for complete the install operation, or null
OperationExceptiondoValidate(org.netbeans.api.autoupdate.InstallSupport.Validator, org.netbeans.api.progress.ProgressHandle)
public void doCancel()
throws OperationException
OperationExceptionOperationException
public void doRestart(OperationSupport.Restarter restarter,
ProgressHandle progress)
throws OperationException
doInstall(org.netbeans.api.autoupdate.InstallSupport.Installer, org.netbeans.api.progress.ProgressHandle) returns non null instance of Restarter then
this method must be called to apply all changes.
restarter - instance of Restarter obtained from previous call doInstall(org.netbeans.api.autoupdate.InstallSupport.Installer, org.netbeans.api.progress.ProgressHandle). Mustn't be null.progress - instance of ProgressHandle or null
OperationExceptionOperationExceptionpublic void doRestartLater(OperationSupport.Restarter restarter)
doInstall(org.netbeans.api.autoupdate.InstallSupport.Installer, org.netbeans.api.progress.ProgressHandle) returns non null instance of Restarter then
this method must be called to apply all changes
restarter - instance of Restarter obtained from previous call doInstall(org.netbeans.api.autoupdate.InstallSupport.Installer, org.netbeans.api.progress.ProgressHandle).
Mustn't be null.
public String getCertificate(InstallSupport.Installer validator,
UpdateElement uElement)
UpdateElement.
validator - Installer an instance of Installer has been returned by {link @doValidate}uElement - UpdateElement
doValidate(org.netbeans.api.autoupdate.InstallSupport.Validator, org.netbeans.api.progress.ProgressHandle)
public boolean isTrusted(InstallSupport.Installer validator,
UpdateElement uElement)
UpdateElement is trusted or not.
validator - Installer an instance of Installer has been returned by {link @doValidate}uElement - UpdateElement
UpdateElementdoValidate(org.netbeans.api.autoupdate.InstallSupport.Validator, org.netbeans.api.progress.ProgressHandle),
java.security.cert.Certificate
public boolean isSigned(InstallSupport.Installer validator,
UpdateElement uElement)
UpdateElement is signed or not.
validator - Installer an instance of Installer has been returned by {link @doValidate}uElement - UpdateElement
UpdateElementdoValidate(org.netbeans.api.autoupdate.InstallSupport.Validator, org.netbeans.api.progress.ProgressHandle)public OperationContainer<InstallSupport> getContainer()
OperationContainer.
OperationContainer
|
org.netbeans.modules.autoupdate.services 1.26.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||