Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.engine/src')
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Value.java9
2 files changed, 27 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java
index fb80a02e1..027cad904 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2007, 2013 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
@@ -15,6 +15,8 @@ import java.util.Map;
import org.eclipse.core.runtime.IStatus;
/**
+ * An action that performs one step of a provisioning operation for a particular
+ * {@link Touchpoint}.
* @since 2.0
*/
public abstract class ProvisioningAction {
@@ -28,8 +30,19 @@ public abstract class ProvisioningAction {
return memento;
}
+ /**
+ * Performs the provisioning action.
+ * @param parameters The action parameters
+ * @return A status indicating whether the action was successful
+ */
public abstract IStatus execute(Map<String, Object> parameters);
+ /**
+ * Performs the inverse of this provisioning action. This should reverse
+ * any effects from a previous invocation of the {@link #execute(Map)} method.
+ * @param parameters The action parameters
+ * @return A status indicating whether the action was successful
+ */
public abstract IStatus undo(Map<String, Object> parameters);
/**
@@ -37,6 +50,7 @@ public abstract class ProvisioningAction {
* to subsequent actions.
* This method is only invoked by p2 once execute() has been executed.
* @return the result of the action execution.
+ * @since 2.3
*/
public Value<?> getResult() {
return Value.NO_VALUE;
@@ -47,6 +61,10 @@ public abstract class ProvisioningAction {
this.touchpoint = touchpoint;
}
+ /**
+ * Returns the touchpoint that this action is operating under.
+ * @return the touchpoint
+ */
public Touchpoint getTouchpoint() {
return touchpoint;
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Value.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Value.java
index 15ecf1599..b0cb15613 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Value.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Value.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Landmark Graphics Corporation
+ * Copyright (c) 2012, 2013 Landmark Graphics 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
@@ -7,9 +7,16 @@
*
* Contributors:
* Landmark Graphics Corporation - initial API and implementation
+ * IBM Corporation - ongoing maintenance
*******************************************************************************/
package org.eclipse.equinox.p2.engine.spi;
+/**
+ * An object that encapsulates the result of performing a provisioning action.
+ *
+ * @see ProvisioningAction#getResult()
+ * @since 2.3
+ */
public class Value<T> {
public static final Value<Object> NO_VALUE = new Value<Object>(null);
private T value;

Back to the top