Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2008-01-31 07:15:47 +0000
committerSimon Kaegi2008-01-31 07:15:47 +0000
commit171738bc60c1243703640921e406d280b6b321a5 (patch)
tree3794a6e7dd45e88050dd7a07cf5d626cb7c7ea13 /bundles/org.eclipse.equinox.p2.touchpoint.natives
parent51f3cd91c4c564ce34ba33b2702c90e0a944cd67 (diff)
downloadrt.equinox.p2-171738bc60c1243703640921e406d280b6b321a5.tar.gz
rt.equinox.p2-171738bc60c1243703640921e406d280b6b321a5.tar.xz
rt.equinox.p2-171738bc60c1243703640921e406d280b6b321a5.zip
Bug 212336 [prov] Tighten up API for Profile and ProfileRegistry
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.natives')
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java15
2 files changed, 9 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
index a755c7789..9f6b264b4 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
@@ -7,6 +7,7 @@ Bundle-Localization: plugin
Bundle-Version: 0.1.0.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.natives.Activator
Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.internal.p2.engine,
org.eclipse.equinox.p2.artifact.repository,
org.eclipse.equinox.p2.core,
org.eclipse.equinox.p2.core.location,
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 40fcc3fcd..b6f5fda65 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
@@ -15,6 +15,7 @@ import java.net.URL;
import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.engine.Profile;
import org.eclipse.equinox.p2.artifact.repository.*;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.core.location.AgentLocation;
@@ -34,7 +35,7 @@ public class NativeTouchpoint extends Touchpoint {
if (actionId.equals("collect")) {
return new ProvisioningAction() {
public IStatus execute(Map parameters) {
- Profile profile = (Profile) parameters.get("profile");
+ IProfile profile = (IProfile) parameters.get("profile");
InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get("operand");
try {
IArtifactRequest[] requests = collect(operand.second(), profile);
@@ -107,7 +108,7 @@ public class NativeTouchpoint extends Touchpoint {
return MetadataFactory.createTouchpointType("native", new Version(1, 0, 0));
}
- IArtifactRequest[] collect(IInstallableUnit installableUnit, Profile profile) throws ProvisionException {
+ IArtifactRequest[] collect(IInstallableUnit installableUnit, IProfile profile) throws ProvisionException {
IArtifactKey[] toDownload = installableUnit.getArtifacts();
if (toDownload == null)
return new IArtifactRequest[0];
@@ -126,8 +127,8 @@ public class NativeTouchpoint extends Touchpoint {
return result;
}
- private String getInstallFolder(Profile profile) {
- return profile.getProperty(Profile.PROP_INSTALL_FOLDER);
+ private String getInstallFolder(IProfile profile) {
+ return profile.getProperty(IProfile.PROP_INSTALL_FOLDER);
}
private static AgentLocation getAgentLocation() {
@@ -166,7 +167,7 @@ public class NativeTouchpoint extends Touchpoint {
return (location != null ? location.getArtifactRepositoryURL() : null);
}
- public IStatus initializePhase(IProgressMonitor monitor, Profile profile, String phaseId, Map touchpointParameters) {
+ public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
touchpointParameters.put("installFolder", getInstallFolder(profile));
return null;
}
@@ -208,7 +209,7 @@ public class NativeTouchpoint extends Touchpoint {
for (int i = 0; i < unzippedFiles.length; i++)
unzippedFileNameBuffer.append(unzippedFiles[i].getAbsolutePath()).append("|");
- String unzipped = profile.internalSetInstallableUnitProperty(iu, "unzipped" + "|" + originalSource + "|" + target, unzippedFileNameBuffer.toString());
+ String unzipped = profile.setInstallableUnitProperty(iu, "unzipped" + "|" + originalSource + "|" + target, unzippedFileNameBuffer.toString());
return Status.OK_STATUS;
}
@@ -222,7 +223,7 @@ public class NativeTouchpoint extends Touchpoint {
return createError("The \"target\" parameter was not set in the \"cleanupzip\" action.");
IInstallableUnit iu = (IInstallableUnit) parameters.get("iu");
- Profile profile = (Profile) parameters.get("profile");
+ IProfile profile = (IProfile) parameters.get("profile");
String unzipped = profile.getInstallableUnitProperty(iu, "unzipped" + "|" + source + "|" + target);

Back to the top