Eclipse Platform
Release 3.6

org.eclipse.equinox.p2.operations
Class ProfileModificationJob

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.core.internal.jobs.InternalJob
          extended by org.eclipse.core.runtime.jobs.Job
              extended by org.eclipse.equinox.p2.operations.ProvisioningJob
                  extended by org.eclipse.equinox.p2.operations.ProfileModificationJob
All Implemented Interfaces:
Comparable, IAdaptable, IProfileChangeJob

public class ProfileModificationJob
extends ProvisioningJob
implements IProfileChangeJob

A job that modifies a profile according to a specified provisioning plan.

Since:
2.0
Restriction:
This class is not intended to be subclassed by clients.

Field Summary
 
Fields inherited from class org.eclipse.equinox.p2.operations.ProvisioningJob
RESTART_NONE, RESTART_ONLY, RESTART_OR_APPLY
 
Fields inherited from class org.eclipse.core.runtime.jobs.Job
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING
 
Fields inherited from class org.eclipse.core.internal.jobs.InternalJob
manager
 
Constructor Summary
ProfileModificationJob(String name, ProvisioningSession session, String profileId, IProvisioningPlan plan, ProvisioningContext context)
          Create a job that will update a profile according to the specified provisioning plan.
 
Method Summary
 String getProfileId()
          Return the string id of the profile involved in this job.
 int getRestartPolicy()
          Return the restart policy that is appropriate for this job.
 IStatus runModal(IProgressMonitor monitor)
          Perform the specific work involved in running this job in the current thread.
 void setPhaseSet(IPhaseSet phaseSet)
          Set the phase set to be used when running the provisioning plan.
 void setRestartPolicy(int policy)
          Set the restart policy that describes whether restart is needed after performing this job.
 void setTaskName(String label)
          Sets the top level task name for progress when running this operation.
 
Methods inherited from class org.eclipse.equinox.p2.operations.ProvisioningJob
getErrorStatus, getSession, run, setAdditionalProgressMonitor
 
Methods inherited from class org.eclipse.core.runtime.jobs.Job
addJobChangeListener, belongsTo, cancel, canceling, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule
 
Methods inherited from class org.eclipse.core.internal.jobs.InternalJob
compareTo
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

ProfileModificationJob

public ProfileModificationJob(String name,
                              ProvisioningSession session,
                              String profileId,
                              IProvisioningPlan plan,
                              ProvisioningContext context)
Create a job that will update a profile according to the specified provisioning plan.

Parameters:
name - the name of the job
session - the provisioning session to use to obtain provisioning services
profileId - the id of the profile to be altered
plan - the provisioning plan describing how the profile is to be altered
context - the provisioning context describing how the operation is to be performed
Method Detail

setPhaseSet

public void setPhaseSet(IPhaseSet phaseSet)
Set the phase set to be used when running the provisioning plan. This method need only be used when the default phase set is not sufficient. For example, clients could use this method to perform a sizing or to download artifacts without provisioning them.

Parameters:
phaseSet - the provisioning phases to be run during provisioning.

getProfileId

public String getProfileId()
Description copied from interface: IProfileChangeJob
Return the string id of the profile involved in this job.

Specified by:
getProfileId in interface IProfileChangeJob
Returns:
the id of the profile

runModal

public IStatus runModal(IProgressMonitor monitor)
Description copied from class: ProvisioningJob
Perform the specific work involved in running this job in the current thread. This method can be called directly by clients, or in the course of running the job in the background.

Specified by:
runModal in class ProvisioningJob
Parameters:
monitor - the progress monitor to use for the operation
Returns:
a status indicating the result of the operation.

setTaskName

public void setTaskName(String label)
Sets the top level task name for progress when running this operation.

Parameters:
label - the label to be used for the task name

getRestartPolicy

public int getRestartPolicy()
Description copied from class: ProvisioningJob
Return the restart policy that is appropriate for this job.

Overrides:
getRestartPolicy in class ProvisioningJob
Returns:
a constant indicating the restart policy
See Also:
ProvisioningJob.RESTART_NONE, ProvisioningJob.RESTART_ONLY, ProvisioningJob.RESTART_OR_APPLY

setRestartPolicy

public void setRestartPolicy(int policy)
Set the restart policy that describes whether restart is needed after performing this job.

Parameters:
policy - an integer describing the restart policy
See Also:
ProvisioningJob.RESTART_NONE, ProvisioningJob.RESTART_ONLY, ProvisioningJob.RESTART_OR_APPLY

Eclipse Platform
Release 3.6

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.