Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2011-09-18 15:50:32 -0400
committerPascal Rapicault2011-09-18 15:50:32 -0400
commit06094b9d62eba8012082ba41d255369cc62f859e (patch)
tree1005217325726b55c12f9fbe53cfccbdcddcff7e /bundles/org.eclipse.equinox.p2.engine/src
parent235312dc10fea6ae579d4b951aba6cb0e31b571c (diff)
downloadrt.equinox.p2-06094b9d62eba8012082ba41d255369cc62f859e.tar.gz
rt.equinox.p2-06094b9d62eba8012082ba41d255369cc62f859e.tar.xz
rt.equinox.p2-06094b9d62eba8012082ba41d255369cc62f859e.zip
Add API to get the future state from a provisioning planv20110918-1950
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.engine/src')
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java18
2 files changed, 27 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
index 0c679a59f..992f4adaa 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
@@ -24,6 +24,7 @@ public class ProvisioningPlan implements IProvisioningPlan {
final IProfile profile;
final List<Operand> operands = new ArrayList<Operand>();
final ProvisioningContext context;
+ IQueryable<IInstallableUnit> futureState;
IStatus status;
private IProvisioningPlan installerPlan;
@@ -144,4 +145,12 @@ public class ProvisioningPlan implements IProvisioningPlan {
return;
operands.add(new InstallableUnitPropertyOperand(iu, name, currentValue, value));
}
+
+ public IQueryable<IInstallableUnit> getFutureState() {
+ return futureState;
+ }
+
+ public void setFuturePlan(IQueryable<IInstallableUnit> futureState) {
+ this.futureState = futureState;
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
index c67ab03a1..2493b85fd 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
@@ -58,6 +58,15 @@ public interface IProvisioningPlan {
public IProfile getProfile();
/**
+ * Returns the set of IUs that will constitute the profile if the plan is executed successfully.
+ *
+ * @return The set of the IUs that will constitute the profile after the plan is executed successfully, or @null if the
+ * plan is in error or the value has not been set.
+ * @since 2.2
+ */
+ public IQueryable<IInstallableUnit> getFutureState();
+
+ /**
* Returns the proposed set of installable units to be removed from this profile.
*
* @return The proposed profile removals.
@@ -173,4 +182,13 @@ public interface IProvisioningPlan {
* @param to the installable unit to add
*/
public void updateInstallableUnit(IInstallableUnit from, IInstallableUnit to);
+
+ /**
+ * Sets the value that is returned by the method getFutureState.
+ * Note that this method is a simple setter and will not cause any update to the other fields of this object.
+ * This field can be set to @null.
+ * @param futureState A set of IU representing the future plan if the plan is executed successfully.
+ * @since 2.2
+ */
+ public void setFuturePlan(IQueryable<IInstallableUnit> futureState);
} \ No newline at end of file

Back to the top