Class RemediationOperation
- java.lang.Object
-
- org.eclipse.equinox.p2.operations.ProfileChangeOperation
-
- org.eclipse.equinox.p2.operations.RemediationOperation
-
- All Implemented Interfaces:
IProfileChangeJob
public class RemediationOperation extends ProfileChangeOperation
EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the p2 team.
- Since:
- 2.3
- Restriction:
-
-
Constructor Summary
Constructors Constructor Description RemediationOperation(ProvisioningSession session, IProfileChangeRequest iProfileChangeRequest)
RemediationOperation(ProvisioningSession session, IProfileChangeRequest originalRequest, RemedyConfig[] remedyConfigs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Remedy
bestSolutionChangingTheRequest()
Remedy
bestSolutionChangingWhatIsInstalled()
protected void
computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor)
Compute the profile change request for this operation, adding any relevant intermediate status to the supplied status.Remedy
getCurrentRemedy()
org.eclipse.equinox.internal.p2.director.ProfileChangeRequest
getOriginalRequest()
ProvisioningJob
getProvisioningJob(IProgressMonitor monitor)
Return a provisioning job that can be used to perform the resolved operation.protected String
getProvisioningJobName()
Return an appropriate name for the provisioning job.List<Remedy>
getRemedies()
RemedyConfig[]
getRemedyConfigs()
IStatus
getResolutionResult()
Return a status indicating the result of resolving this operation.protected String
getResolveJobName()
Return an appropriate name for the resolution job.void
setCurrentRemedy(Remedy currentRemedy)
-
Methods inherited from class org.eclipse.equinox.p2.operations.ProfileChangeOperation
getProfileChangeRequest, getProfileId, getProvisioningContext, getProvisioningPlan, getResolutionDetails, getResolutionDetails, getResolveJob, hasResolved, prepareToResolve, resolveModal, setProfileId, setProvisioningContext, updateJobProvisioningContexts
-
-
-
-
Constructor Detail
-
RemediationOperation
public RemediationOperation(ProvisioningSession session, IProfileChangeRequest iProfileChangeRequest)
-
RemediationOperation
public RemediationOperation(ProvisioningSession session, IProfileChangeRequest originalRequest, RemedyConfig[] remedyConfigs)
-
-
Method Detail
-
getRemedyConfigs
public RemedyConfig[] getRemedyConfigs()
-
getCurrentRemedy
public Remedy getCurrentRemedy()
-
setCurrentRemedy
public void setCurrentRemedy(Remedy currentRemedy)
-
bestSolutionChangingTheRequest
public Remedy bestSolutionChangingTheRequest()
-
bestSolutionChangingWhatIsInstalled
public Remedy bestSolutionChangingWhatIsInstalled()
-
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.
-
getProvisioningJob
public ProvisioningJob getProvisioningJob(IProgressMonitor monitor)
Description copied from class:ProfileChangeOperation
Return a provisioning job that can be used to perform the resolved operation. The job is created using the default values associated with a new job. It is up to clients to configure the priority of the job and set any appropriate properties, such asJob.setUser(boolean)
,Job.setSystem(boolean)
, orJob.setProperty(QualifiedName, Object)
, before scheduling it.- Overrides:
getProvisioningJob
in classProfileChangeOperation
- Parameters:
monitor
- a progress monitor that should be used to report the job's progress in addition to the standard job progress reporting. Can benull
. If provided, this monitor will be called from a background thread.- Returns:
- a job that can be used to perform the provisioning operation. This may be
null
if the operation has not been resolved, or if a plan could not be obtained when attempting to resolve. If the job is null and the operation has been resolved, then the resolution result will explain the problem. - See Also:
ProfileChangeOperation.hasResolved()
,ProfileChangeOperation.getResolutionResult()
-
getOriginalRequest
public org.eclipse.equinox.internal.p2.director.ProfileChangeRequest getOriginalRequest()
-
getResolutionResult
public IStatus getResolutionResult()
Description copied from class:ProfileChangeOperation
Return a status indicating the result of resolving this operation. Anull
return indicates that resolving has not occurred yet.- Overrides:
getResolutionResult
in classProfileChangeOperation
- Returns:
- the status of the resolution, or
null
if resolution has not yet occurred.
-
-