Class Touchpoint
IPhaseSet
.- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method is called at the end of an engine operation after all phases have been executed and after the touchpoint has had prepare called.completeOperand
(IProfile profile, Map<String, Object> parameters) This method is called at the end of processing of a single engine operand (for example a given installable unit being installed or uninstalled).completePhase
(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) This method is called at the end of execution of an engine phase.initializeOperand
(IProfile profile, Map<String, Object> parameters) This method is called at the beginning of processing of a single engine operand (for example a given installable unit being installed or uninstalled).initializePhase
(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) This method is called at the beginning of execution of an engine phase.This method is called at the end of an engine operation after all phases have been executed but prior to the operation being formally committed/persisted.qualifyAction
(String actionId) This method is for backwards compatibility only, to be used by touchpoints that existed prior to action ids being fully qualified by the engine.This method is called at the end of an engine operation after all phases have been executed.
-
Constructor Details
-
Touchpoint
public Touchpoint()
-
-
Method Details
-
qualifyAction
This method is for backwards compatibility only, to be used by touchpoints that existed prior to action ids being fully qualified by the engine.- Parameters:
actionId
- the unqualified action id- Returns:
- the qualified action id
- Since:
- 2.0
- Restriction:
- This method is not intended to be referenced by clients.
-
initializePhase
public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) This method is called at the beginning of execution of an engine phase. This is an opportunity for the touchpoint to initialize any phase-specific structures.The result of this method can be used to abort execution of the entire engine operation, by using a severity of
IStatus.ERROR
orIStatus.CANCEL
. The result can also contain warnings or informational status that will be aggregated and returned to the caller ofIEngine.perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)
.- Parameters:
monitor
- a progress monitor, ornull
if progress reporting and cancellation are not desiredprofile
- the profile that is being operated onphaseId
- the id of the phaseparameters
- data provided by the engine to the touchpoint- Returns:
- the result of phase initialization
-
completePhase
public IStatus completePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) This method is called at the end of execution of an engine phase. This is an opportunity for the touchpoint to clean up any phase-specific structures or perform any final work for the current phase.The result of this method can be used to abort execution of the entire engine operation, by using a severity of
IStatus.ERROR
orIStatus.CANCEL
. The result can also contain warnings or informational status that will be aggregated and returned to the caller ofIEngine.perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)
.- Parameters:
monitor
- a progress monitor, ornull
if progress reporting and cancellation are not desiredprofile
- the profile that is being operated onphaseId
- the id of the phaseparameters
- data provided by the engine to the touchpoint- Returns:
- the result of phase completion
-
initializeOperand
This method is called at the beginning of processing of a single engine operand (for example a given installable unit being installed or uninstalled). This is an opportunity for the touchpoint to initialize any data structures specific to a single operand.The result of this method can be used to abort execution of the entire engine operation, by using a severity of
IStatus.ERROR
orIStatus.CANCEL
. The result can also contain warnings or informational status that will be aggregated and returned to the caller ofIEngine.perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)
.- Parameters:
profile
- the profile that is being operated onparameters
- data provided by the engine to the touchpoint- Returns:
- the result of initialization
-
completeOperand
This method is called at the end of processing of a single engine operand (for example a given installable unit being installed or uninstalled). This is an opportunity for the touchpoint to clean up any data structures specific to a single operand.The result of this method can be used to abort execution of the entire engine operation, by using a severity of
IStatus.ERROR
orIStatus.CANCEL
. The result can also contain warnings or informational status that will be aggregated and returned to the caller ofIEngine.perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)
.- Parameters:
profile
- the profile that is being operated onparameters
- data provided by the engine to the touchpoint- Returns:
- the result of the completion work
-
prepare
This method is called at the end of an engine operation after all phases have been executed but prior to the operation being formally committed/persisted. This is an opportunity to perform any final checks against the profile, or log any information that might be needed to recover if the operation fails to complete in a regular manner.The result of this method can be used to abort execution of the entire engine operation, by using a severity of
IStatus.ERROR
orIStatus.CANCEL
. The result can also contain warnings or informational status that will be aggregated and returned to the caller ofIEngine.perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)
.- Parameters:
profile
- the profile about to be modified- Returns:
- the result of preparation work
-
commit
This method is called at the end of an engine operation after all phases have been executed and after the touchpoint has had prepare called. When this method is invoked, it signals that the engine operation was a complete success, and the touchpoint should commit or persist any changes it has made to some persistent storage (for example the file system).The result of this method can be used to report on the success or failure of the commit. However, at this point it is too late for the engine operation to fail, and the result returned from this method will not prevent the engine from completing its work.
- Parameters:
profile
- the profile that was modified- Returns:
- the result of commit work
-
rollback
This method is called at the end of an engine operation after all phases have been executed. When this method is invoked, it signals that the engine operation was a failure, and the touchpoint should discard any changes it has made.The result of this method can be used to report on the success or failure of the rollback. However, at this point it is too late for the engine operation to be stopped, and the result returned from this method will not prevent the engine from completing its rollback work.
- Parameters:
profile
- the profile that was modified- Returns:
- the result of commit work
-