Class UninstallOperation
java.lang.Object
org.eclipse.equinox.p2.operations.ProfileChangeOperation
org.eclipse.equinox.p2.operations.UninstallOperation
- All Implemented Interfaces:
IProfileChangeJob
An UninstallOperation describes an operation that uninstalls
IInstallableUnits from
a profile.
The following snippet shows how one might use an UninstallOperation to perform a synchronous resolution and
then kick off an uninstall in the background:
UninstallOperation op = new UninstallOperation(session, new IInstallableUnit [] { removeThisIU });
IStatus result = op.resolveModal(monitor);
if (result.isOK()) {
op.getProvisioningJob(monitor).schedule();
}
- Since:
- 2.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorsConstructorDescriptionUninstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toUninstall) Create an uninstall operation on the specified provisioning session that uninstalls the specified IInstallableUnits. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcomputeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor) Compute the profile change request for this operation, adding any relevant intermediate status to the supplied status.protected StringReturn an appropriate name for the provisioning job.protected StringReturn an appropriate name for the resolution job.Methods inherited from class org.eclipse.equinox.p2.operations.ProfileChangeOperation
getProfileChangeRequest, getProfileId, getProvisioningContext, getProvisioningJob, getProvisioningPlan, getResolutionDetails, getResolutionDetails, getResolutionResult, getResolveJob, hasResolved, prepareToResolve, resolveModal, setProfileId, setProvisioningContext, updateJobProvisioningContexts
-
Constructor Details
-
UninstallOperation
Create an uninstall operation on the specified provisioning session that uninstalls the specified IInstallableUnits. Unless otherwise specified, the operation will be associated with the currently running profile.- Parameters:
session- the session to use for obtaining provisioning servicestoUninstall- the IInstallableUnits to be installed into the profile.
-
-
Method Details
-
computeProfileChangeRequest
Description copied from class:ProfileChangeOperationCompute the profile change request for this operation, adding any relevant intermediate status to the supplied status.- Specified by:
computeProfileChangeRequestin classProfileChangeOperation- Parameters:
status- a multi-status to be used to add relevant status. If a profile change request cannot be computed for any reason, a status should be added to explain the problem.monitor- the progress monitor to use for computing the profile change request
-
getProvisioningJobName
Description copied from class:ProfileChangeOperationReturn an appropriate name for the provisioning job.- Specified by:
getProvisioningJobNamein classProfileChangeOperation- Returns:
- the provisioning job name.
-
getResolveJobName
Description copied from class:ProfileChangeOperationReturn an appropriate name for the resolution job.- Specified by:
getResolveJobNamein classProfileChangeOperation- Returns:
- the resolution job name.
-