Class InstallOperation
- java.lang.Object
-
- org.eclipse.equinox.p2.operations.ProfileChangeOperation
-
- org.eclipse.equinox.p2.operations.InstallOperation
-
- All Implemented Interfaces:
IProfileChangeJob
- Direct Known Subclasses:
SynchronizeOperation
public class InstallOperation extends ProfileChangeOperation
An InstallOperation describes an operation that installs IInstallableUnits into a profile. The following snippet shows how one might use an InstallOperation to perform a synchronous resolution and then kick off an install in the background:InstallOperation op = new InstallOperation(session, new IInstallableUnit [] { myIU }); IStatus result = op.resolveModal(monitor); if (result.isOK()) { op.getProvisioningJob(monitor).schedule(); }
- Since:
- 2.0
- See Also:
ProfileChangeOperation
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<IInstallableUnit>
toInstall
-
Constructor Summary
Constructors Constructor Description InstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toInstall)
Create an install operation on the specified provisioning session that installs the supplied IInstallableUnits.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor)
Compute the profile change request for this operation, adding any relevant intermediate status to the supplied status.protected String
getProvisioningJobName()
Return an appropriate name for the provisioning job.protected String
getResolveJobName()
Return 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
-
-
-
-
Field Detail
-
toInstall
protected Collection<IInstallableUnit> toInstall
- Since:
- 2.1
-
-
Constructor Detail
-
InstallOperation
public InstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toInstall)
Create an install operation on the specified provisioning session that installs the supplied IInstallableUnits. Unless otherwise specified, the operation will be associated with the currently running profile.- Parameters:
session
- the session to use for obtaining provisioning servicestoInstall
- the IInstallableUnits to be installed into the profile.
-
-
Method Detail
-
computeProfileChangeRequest
protected void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor)
Description copied from class:ProfileChangeOperation
Compute the profile change request for this operation, adding any relevant intermediate status to the supplied status.- Specified by:
computeProfileChangeRequest
in 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
-
getResolveJobName
protected String getResolveJobName()
Description copied from class:ProfileChangeOperation
Return an appropriate name for the resolution job.- Specified by:
getResolveJobName
in classProfileChangeOperation
- Returns:
- the resolution job name.
-
getProvisioningJobName
protected String getProvisioningJobName()
Description copied from class:ProfileChangeOperation
Return an appropriate name for the provisioning job.- Specified by:
getProvisioningJobName
in classProfileChangeOperation
- Returns:
- the provisioning job name.
-
-