diff options
author | Simon Kaegi | 2007-10-03 03:21:09 +0000 |
---|---|---|
committer | Simon Kaegi | 2007-10-03 03:21:09 +0000 |
commit | b4add63cbe2ed0ab75190c8a3daff74065392ab9 (patch) | |
tree | 87261ea152b4cc3b27d01489f224cdf5baa884e2 /bundles/org.eclipse.equinox.p2.touchpoint.natives | |
parent | e63078ac2152a314cccc4e7dbf1d474f0421cc1a (diff) | |
download | rt.equinox.p2-b4add63cbe2ed0ab75190c8a3daff74065392ab9.tar.gz rt.equinox.p2-b4add63cbe2ed0ab75190c8a3daff74065392ab9.tar.xz rt.equinox.p2-b4add63cbe2ed0ab75190c8a3daff74065392ab9.zip |
Bug 204402 [prov] Use pre and post phase for install/uninstall
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.natives')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java index 32690e883..4a53dd8ec 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java @@ -12,10 +12,8 @@ package org.eclipse.equinox.internal.p2.touchpoint.natives; import java.io.File; import java.net.URL; -import java.util.HashSet; -import java.util.Set; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; +import java.util.*; +import org.eclipse.core.runtime.*; import org.eclipse.equinox.p2.artifact.repository.*; import org.eclipse.equinox.p2.core.helpers.ServiceHelper; import org.eclipse.equinox.p2.core.location.AgentLocation; @@ -42,11 +40,14 @@ public class NativeTouchpoint implements ITouchpoint { public ITouchpointAction[] getActions(String phaseID, final Profile profile, final Operand operand) { if (phaseID.equals("collect")) { ITouchpointAction action = new ITouchpointAction() { - public Object execute() { - return collect(operand.second(), profile); + public IStatus execute(Map parameters) { + IArtifactRequest[] requests = collect(operand.second(), profile); + Collection artifactRequests = (Collection) parameters.get("artifactRequests"); + artifactRequests.add(requests); + return null; } - public Object undo() { + public IStatus undo(Map parameters) { return null; } }; @@ -55,11 +56,11 @@ public class NativeTouchpoint implements ITouchpoint { if (phaseID.equals("install")) { ITouchpointAction action = new ITouchpointAction() { - public Object execute() { + public IStatus execute(Map parameters) { return doInstall(operand.second(), profile); } - public Object undo() { + public IStatus undo(Map parameters) { return doUninstall(operand.second(), profile); } }; @@ -67,11 +68,11 @@ public class NativeTouchpoint implements ITouchpoint { } if (phaseID.equals("uninstall")) { ITouchpointAction action = new ITouchpointAction() { - public Object execute() { + public IStatus execute(Map parameters) { return doUninstall(operand.first(), profile); } - public Object undo() { + public IStatus undo(Map parameters) { return doInstall(operand.first(), profile); } }; @@ -175,4 +176,12 @@ public class NativeTouchpoint implements ITouchpoint { return location.getArtifactRepositoryURL(); } + public IStatus completePhase(IProgressMonitor monitor, Profile profile, String phaseId, Map touchpointParameters) { + return null; + } + + public IStatus initializePhase(IProgressMonitor monitor, Profile profile, String phaseId, Map touchpointParameters) { + return null; + } + } |