Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 7b976aa69780149efd6659985a22fefbf9e53dae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*******************************************************************************
 * Copyright (c) 2007 IBM Corporation and others. All rights reserved. This
 * program and the accompanying materials are made available under the terms of
 * the Eclipse Public License v1.0 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

package org.eclipse.equinox.prov.engine;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;

/**
 * The provisioning action interface represents a unit of work
 * that can be performed during a provisioning activity.
 * The granularity of the action can vary from a simple,
 * indivisible unit of work to a complex, organized collection
 * of steps.
 * <p>
 * The results of an provisioning activity must be revert-able
 * an error or if a cancellation occurs. A provisioning action
 * that will return an error or cancel status may choose to revert
 * any work performed before returning or may indicate that
 * the caller must explicitly revert.
 */
public interface IProvisioningAction {

	public IStatus perform(AbstractProvisioningTransaction transaction, IProgressMonitor monitor);

	public IStatus revert(AbstractProvisioningTransaction transaction, IProgressMonitor monitor);

	public boolean shouldRevertOnError();

}

Back to the top