Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoribull2010-01-05 07:57:50 +0000
committeribull2010-01-05 07:57:50 +0000
commite5411e00d6ed04f5e025ce34e78cda24b29cbb16 (patch)
treeeb3d4766e2bed32ec73adb84b3b05aa329e12c29
parentd0c30a8ffebee1f345a3749e95c22c5676842fb7 (diff)
downloadrt.equinox.p2-e5411e00d6ed04f5e025ce34e78cda24b29cbb16.tar.gz
rt.equinox.p2-e5411e00d6ed04f5e025ce34e78cda24b29cbb16.tar.xz
rt.equinox.p2-e5411e00d6ed04f5e025ce34e78cda24b29cbb16.zip
Bug 265574 - Interfaces for Artifact Repositories
This adds an Interface for ProcessingStepDescriptor, and this interface is used instead of the concrete class.
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java (renamed from bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ProcessingStepDescriptor.java)50
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/SimpleArtifactRepositoryTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Adder.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ByteShifter.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Counter.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Multiplier.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java6
32 files changed, 199 insertions, 119 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java
index a29e88213..70e2966db 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.optimizers;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -40,12 +42,12 @@ public abstract class AbstractDeltaStep extends AbstractBufferingStep {
this.repository = repository;
}
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public void initialize(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
super.initialize(descriptor, context);
readArtifactKey(descriptor);
}
- protected void readArtifactKey(ProcessingStepDescriptor descriptor) {
+ protected void readArtifactKey(IProcessingStepDescriptor descriptor) {
try {
key = ArtifactKey.parse(descriptor.getData());
} catch (IllegalArgumentException e) {
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java
index b83736c58..d9cdefc9e 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
import java.io.IOException;
import java.io.OutputStream;
import java.util.*;
@@ -170,8 +172,8 @@ public class Optimizer {
System.out.println("\t with jar delta against " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
String predecessorData = descriptors[i].getArtifactKey().toExternalForm();
ArtifactDescriptor newDescriptor = new ArtifactDescriptor(canonical);
- ProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(JAR_DELTA_PATCH_STEP, predecessorData, true);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {patchStep};
+ IProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(JAR_DELTA_PATCH_STEP, predecessorData, true);
+ IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {patchStep};
newDescriptor.setProcessingSteps(steps);
newDescriptor.setProperty(IArtifactDescriptor.FORMAT, JAR_DELTA_FORMAT);
OutputStream repositoryStream = null;
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java
index 167b33f7b..776bc7262 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
import java.io.IOException;
import java.io.OutputStream;
import java.util.*;
@@ -183,8 +185,8 @@ public class Optimizer {
System.out.println("\t with " + strategy + " against " + descriptors[i].getArtifactKey());
String predecessorData = descriptors[i].getArtifactKey().toExternalForm();
ArtifactDescriptor newDescriptor = new ArtifactDescriptor(complete);
- ProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(strategy, predecessorData, true);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {patchStep};
+ IProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(strategy, predecessorData, true);
+ IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {patchStep};
newDescriptor.setProcessingSteps(steps);
newDescriptor.setProperty(IArtifactDescriptor.FORMAT, strategy);
OutputStream repositoryStream = null;
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java
index 77657db0c..76165e798 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
import java.io.IOException;
import java.io.OutputStream;
import java.util.Iterator;
@@ -61,7 +63,7 @@ public class Optimizer {
private void optimize(IArtifactDescriptor descriptor) {
ArtifactDescriptor newDescriptor = new ArtifactDescriptor(descriptor);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+ IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
newDescriptor.setProcessingSteps(steps);
newDescriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
OutputStream repositoryStream = null;
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java
index 5f4ff5183..049cfb411 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.processors;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.net.URI;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -28,7 +30,7 @@ import org.eclipse.equinox.p2.repository.artifact.*;
*/
public abstract class AbstractDeltaProcessorStep extends AbstractDeltaStep {
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public void initialize(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
super.initialize(descriptor, context);
if (!getStatus().isOK())
return;
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
index 6eac04d79..d79f88394 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.processors.md5;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -19,7 +21,6 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.osgi.util.NLS;
public class MD5Verifier extends ProcessingStep {
@@ -38,7 +39,7 @@ public class MD5Verifier extends ProcessingStep {
}
//This handle the case where the MD5 verification is initiated by a processing step
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public void initialize(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
super.initialize(descriptor, context);
String data = descriptor.getData();
if (IArtifactDescriptor.DOWNLOAD_MD5.equals(data))
@@ -50,7 +51,7 @@ public class MD5Verifier extends ProcessingStep {
basicInitialize(descriptor);
}
- private void basicInitialize(ProcessingStepDescriptor descriptor) {
+ private void basicInitialize(IProcessingStepDescriptor descriptor) {
int code = (descriptor == null) ? IStatus.ERROR : descriptor.isRequired() ? IStatus.ERROR : IStatus.INFO;
if (expectedMD5 == null || expectedMD5.length() != 32)
setStatus(new Status(code, Activator.ID, NLS.bind(Messages.Error_invalid_hash, expectedMD5)));
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
index 33f77a7e1..cf5778e67 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.processors.pack200;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -19,7 +21,6 @@ import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
import org.eclipse.equinox.internal.p2.jarprocessor.UnpackStep;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.Options;
@@ -36,7 +37,7 @@ public class Pack200ProcessorStep extends AbstractBufferingStep {
return new BufferedOutputStream(new FileOutputStream(incoming));
}
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public void initialize(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
super.initialize(descriptor, context);
if (!UnpackStep.canUnpack())
setStatus(new Status(IStatus.ERROR, Activator.ID, "Unpack facility not configured")); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
index 686bd2192..8ecc035a0 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.repository.simple;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
import java.io.*;
import java.net.URL;
import java.util.*;
@@ -26,8 +28,7 @@ import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
import org.eclipse.equinox.internal.provisional.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.*;
import org.eclipse.osgi.util.NLS;
import org.osgi.framework.BundleContext;
import org.xml.sax.*;
@@ -191,7 +192,7 @@ public class SimpleArtifactRepositoryIO {
end(ARTIFACTS_ELEMENT);
}
- private void writeProcessingSteps(ProcessingStepDescriptor[] processingSteps) {
+ private void writeProcessingSteps(IProcessingStepDescriptor[] processingSteps) {
if (processingSteps.length > 0) {
start(PROCESSING_STEPS_ELEMENT);
attribute(COLLECTION_SIZE_ATTRIBUTE, processingSteps.length);
@@ -450,7 +451,7 @@ public class SimpleArtifactRepositoryIO {
properties = (repositoryPropertiesHandler == null ? new OrderedProperties(0) : repositoryPropertiesHandler.getProperties());
currentArtifact.addRepositoryProperties(properties);
- ProcessingStepDescriptor[] processingSteps = (processingStepsHandler == null ? new ProcessingStepDescriptor[0] //
+ IProcessingStepDescriptor[] processingSteps = (processingStepsHandler == null ? new ProcessingStepDescriptor[0] //
: processingStepsHandler.getProcessingSteps());
currentArtifact.setProcessingSteps(processingSteps);
artifacts.add(currentArtifact);
@@ -460,15 +461,15 @@ public class SimpleArtifactRepositoryIO {
protected class ProcessingStepsHandler extends AbstractHandler {
- private List<ProcessingStepDescriptor> processingSteps;
+ private List<IProcessingStepDescriptor> processingSteps;
public ProcessingStepsHandler(AbstractHandler parentHandler, Attributes attributes) {
super(parentHandler, PROCESSING_STEPS_ELEMENT);
String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- processingSteps = (size != null ? new ArrayList<ProcessingStepDescriptor>(new Integer(size).intValue()) : new ArrayList<ProcessingStepDescriptor>(4));
+ processingSteps = (size != null ? new ArrayList<IProcessingStepDescriptor>(new Integer(size).intValue()) : new ArrayList<IProcessingStepDescriptor>(4));
}
- public ProcessingStepDescriptor[] getProcessingSteps() {
+ public IProcessingStepDescriptor[] getProcessingSteps() {
return processingSteps.toArray(new ProcessingStepDescriptor[processingSteps.size()]);
}
@@ -486,7 +487,7 @@ public class SimpleArtifactRepositoryIO {
private final String[] required = new String[] {ID_ATTRIBUTE, STEP_REQUIRED_ATTRIBUTE};
private final String[] optional = new String[] {STEP_DATA_ATTRIBUTE};
- public ProcessingStepHandler(AbstractHandler parentHandler, Attributes attributes, List<ProcessingStepDescriptor> processingSteps) {
+ public ProcessingStepHandler(AbstractHandler parentHandler, Attributes attributes, List<IProcessingStepDescriptor> processingSteps) {
super(parentHandler, PROCESSING_STEP_ELEMENT);
String[] attributeValues = parseAttributes(attributes, required, optional);
processingSteps.add(new ProcessingStepDescriptor(attributeValues[0], attributeValues[2], checkBoolean(PROCESSING_STEP_ELEMENT, STEP_REQUIRED_ATTRIBUTE, attributeValues[1]).booleanValue()));
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java
index 731218f2b..403670e1a 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java
@@ -11,12 +11,13 @@
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.IOException;
import java.io.OutputStream;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
/**
* ProcessingSteps process the data written to them and pass the resultant data on
@@ -40,7 +41,7 @@ public abstract class ProcessingStep extends OutputStream implements IStateful {
* @param descriptor description of the step
* @param context the context in which the step is being used
*/
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public void initialize(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
// nothing to do here!
}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java
index 96e31da46..0387fcd28 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.OutputStream;
import java.util.ArrayList;
import org.eclipse.core.runtime.*;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.ArtifactOutputStream;
import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.osgi.util.NLS;
/**
@@ -43,7 +44,7 @@ public class ProcessingStepHandler {
IExtensionPoint point = registry.getExtensionPoint(PROCESSING_STEPS_EXTENSION_ID);
if (point == null)
return false;
- ProcessingStepDescriptor[] steps = descriptor.getProcessingSteps();
+ IProcessingStepDescriptor[] steps = descriptor.getProcessingSteps();
for (int i = 0; i < steps.length; i++) {
if (point.getExtension(steps[i].getProcessorId()) == null)
return false;
@@ -126,14 +127,14 @@ public class ProcessingStepHandler {
return null;
}
- public ProcessingStep[] create(ProcessingStepDescriptor[] descriptors, IArtifactDescriptor context) {
+ public ProcessingStep[] create(IProcessingStepDescriptor[] descriptors, IArtifactDescriptor context) {
ProcessingStep[] result = new ProcessingStep[descriptors.length];
for (int i = 0; i < descriptors.length; i++)
result[i] = create(descriptors[i], context);
return result;
}
- public ProcessingStep create(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public ProcessingStep create(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
IExtensionRegistry registry = RegistryFactory.getRegistry();
IExtension extension = registry.getExtension(PROCESSING_STEPS_EXTENSION_ID, descriptor.getProcessorId());
Exception error;
@@ -156,7 +157,7 @@ public class ProcessingStepHandler {
return result;
}
- public OutputStream createAndLink(ProcessingStepDescriptor[] descriptors, IArtifactDescriptor context, OutputStream output, IProgressMonitor monitor) {
+ public OutputStream createAndLink(IProcessingStepDescriptor[] descriptors, IArtifactDescriptor context, OutputStream output, IProgressMonitor monitor) {
if (descriptors == null)
return output;
ProcessingStep[] steps = create(descriptors, context);
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
index 0991f7614..3f9d46af1 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
@@ -32,8 +34,7 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.VersionRange;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.*;
import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.*;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.osgi.service.environment.EnvironmentInfo;
import org.eclipse.osgi.service.resolver.*;
@@ -189,7 +190,7 @@ public class MetadataGeneratorHelper {
// TODO - this is wrong but I'm testing a work-around for bug 205842
result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
}
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+ IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
result.setProcessingSteps(steps);
result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
return result;
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
index ed474c9cd..f6f3469a0 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
@@ -10,6 +10,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.publisher;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
import java.io.*;
import java.util.*;
import java.util.Map.Entry;
@@ -203,7 +205,7 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
// TODO - this is wrong but I'm testing a work-around for bug 205842
result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
}
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+ IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
result.setProcessingSteps(steps);
result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
return result;
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
index 5a02fcca6..54e04fbba 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
@@ -11,6 +11,8 @@
package org.eclipse.equinox.p2.internal.repository.tools;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@ -145,7 +147,7 @@ public class RecreateRepositoryApplication extends AbstractApplication {
ArtifactDescriptor result = new ArtifactDescriptor(key);
result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, installSize);
result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(packFile.length()));
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+ IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
result.setProcessingSteps(steps);
result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
return result;
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java
index 0ada118dd..4d64628d3 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java
@@ -97,7 +97,7 @@ public interface IArtifactDescriptor {
*
* @return the list of processing steps for this descriptor
*/
- public abstract ProcessingStepDescriptor[] getProcessingSteps();
+ public abstract IProcessingStepDescriptor[] getProcessingSteps();
/**
* Return the artifact repository that holds the artifact described by this descriptor.
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java
new file mode 100644
index 000000000..5b45e0279
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+* Copyright (c) 2010 EclipseSource 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:
+* EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact;
+
+/**
+ * Describes a processing step. Processing steps are pieces of code that participate
+ * in the the transfer of an artifact between artifact repositories. A step may alter
+ * the shape of the artifact from its storage format in the repository (such as performing
+ * compression), or it may perform additional checks on the transferred bytes such as
+ * checksums or signature verification.
+ *
+ * @see IArtifactDescriptor#getProcessingSteps()
+ * @since 2.0
+ */
+public interface IProcessingStepDescriptor {
+
+ /**
+ * Returns the fully qualified id of the processing step extension.
+ *
+ * @return The fully qualified processing step extension id
+ */
+ public abstract String getProcessorId();
+
+ public abstract String getData();
+
+ /**
+ * Returns whether the successful execution of this processing step is
+ * required for the transfer to be successful. If the processing step extension
+ * is not installed, or fails to execute, then the artifact transfer will fail if the
+ * step is required. Failure of optional steps will result in warnings but not prevent
+ * the transfer from succeeding.
+ *
+ * @return <code>true</code> if the transfer will fail if this step does not succeed,
+ * and <code>false</code> otherwise
+ */
+ public abstract boolean isRequired();
+
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java
index a1587c9d2..3a5db5ae8 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java
@@ -21,13 +21,13 @@ import org.eclipse.equinox.p2.repository.artifact.*;
* @since 2.0
*/
public class ArtifactDescriptor implements IArtifactDescriptor {
- private static final ProcessingStepDescriptor[] EMPTY_STEPS = new ProcessingStepDescriptor[0];
+ private static final IProcessingStepDescriptor[] EMPTY_STEPS = new ProcessingStepDescriptor[0];
protected IArtifactKey key; // The key associated with this artifact
// The list of post processing steps that must be applied one the artifact once it
// has been downloaded (e.g, unpack, then md5 checksum, then...)
- protected ProcessingStepDescriptor[] processingSteps = EMPTY_STEPS;
+ protected IProcessingStepDescriptor[] processingSteps = EMPTY_STEPS;
protected Map<String, String> properties = new OrderedProperties();
protected transient IArtifactRepository repository;
@@ -80,11 +80,11 @@ public class ArtifactDescriptor implements IArtifactDescriptor {
return OrderedProperties.unmodifiableProperties(properties);
}
- public ProcessingStepDescriptor[] getProcessingSteps() {
+ public IProcessingStepDescriptor[] getProcessingSteps() {
return processingSteps;
}
- public void setProcessingSteps(ProcessingStepDescriptor[] value) {
+ public void setProcessingSteps(IProcessingStepDescriptor[] value) {
processingSteps = value == null ? EMPTY_STEPS : value;
}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ProcessingStepDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java
index d4c0330f8..3d8f9645c 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ProcessingStepDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java
@@ -8,19 +8,11 @@
* Contributors:
* compeople AG (Stefan Liebig) - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.p2.repository.artifact;
+package org.eclipse.equinox.p2.repository.artifact.spi;
-/**
- * Describes a processing step. Processing steps are pieces of code that participate
- * in the the transfer of an artifact between artifact repositories. A step may alter
- * the shape of the artifact from its storage format in the repository (such as performing
- * compression), or it may perform additional checks on the transferred bytes such as
- * checksums or signature verification.
- *
- * @see IArtifactDescriptor#getProcessingSteps()
- * @since 2.0
- */
-public class ProcessingStepDescriptor {
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
+public class ProcessingStepDescriptor implements IProcessingStepDescriptor {
private final String processorId; //the operation to be applied (e.g: unpack, md5, signature verification, etc.)
private final String data; //data requested for the processing (eg. expected checksum)
@@ -40,28 +32,22 @@ public class ProcessingStepDescriptor {
this.required = required;
}
- /**
- * Returns the fully qualified id of the processing step extension.
- *
- * @return The fully qualified processing step extension id
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor#getProcessorId()
*/
public String getProcessorId() {
return processorId;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor#getData()
+ */
public String getData() {
return data;
}
- /**
- * Returns whether the successful execution of this processing step is
- * required for the transfer to be successful. If the processing step extension
- * is not installed, or fails to execute, then the artifact transfer will fail if the
- * step is required. Failure of optional steps will result in warnings but not prevent
- * the transfer from succeeding.
- *
- * @return <code>true</code> if the transfer will fail if this step does not succeed,
- * and <code>false</code> otherwise
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor#isRequired()
*/
public boolean isRequired() {
return required;
@@ -87,20 +73,20 @@ public class ProcessingStepDescriptor {
return true;
if (obj == null)
return false;
- if (!(obj instanceof ProcessingStepDescriptor))
+ if (!(obj instanceof IProcessingStepDescriptor))
return false;
- final ProcessingStepDescriptor other = (ProcessingStepDescriptor) obj;
+ final IProcessingStepDescriptor other = (IProcessingStepDescriptor) obj;
if (data == null) {
- if (other.data != null)
+ if (other.getData() != null)
return false;
- } else if (!data.equals(other.data))
+ } else if (!data.equals(other.getData()))
return false;
if (processorId == null) {
- if (other.processorId != null)
+ if (other.getProcessorId() != null)
return false;
- } else if (!processorId.equals(other.processorId))
+ } else if (!processorId.equals(other.getProcessorId()))
return false;
- if (required != other.required)
+ if (required != other.isRequired())
return false;
return true;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java
index 9c13016c1..faa974b2c 100644
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java
@@ -10,6 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.optimizers;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.*;
import java.util.Arrays;
import junit.framework.TestCase;
@@ -20,7 +24,6 @@ import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
import org.eclipse.equinox.p2.tests.optimizers.TestData;
@@ -46,7 +49,7 @@ public class JBDiffStepTest extends TestCase {
IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/eclipse-3.2.exe");
MockableJBDiffStep differ = new MockableJBDiffStep(repoMock);
- ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
+ IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
differ.initialize(stepDescriptor, descriptor);
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java
index 5a4f3f281..b30172559 100644
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java
@@ -10,6 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.optimizers;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.*;
import java.util.Arrays;
import junit.framework.TestCase;
@@ -20,7 +24,6 @@ import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
import org.eclipse.equinox.p2.tests.optimizers.TestData;
@@ -38,7 +41,7 @@ public class JBDiffZipStepTest extends TestCase {
public void testDiffJdt32to33() throws IOException {
IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar");
MockableJBDiffZipStep differ = new MockableJBDiffZipStep(repoMock);
- ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
+ IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
differ.initialize(stepDescriptor, descriptor);
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java
index a4264fbc0..29933241d 100644
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java
@@ -11,6 +11,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.optimizers;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.*;
import java.util.zip.ZipInputStream;
import junit.framework.TestCase;
@@ -22,7 +26,6 @@ import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processin
import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
import org.eclipse.equinox.p2.tests.optimizers.TestData;
@@ -54,7 +57,7 @@ public class JarDeltaOptimizerTest extends TestCase {
public void testOptimization() throws IOException {
IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/testdata_1.0.0.1.jar");
ProcessingStep step = new MockableJarDeltaOptimizerStep(repoMock);
- ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
+ IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.0.0.2"));
ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
step.initialize(stepDescriptor, descriptor);
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java
index 455d82da3..9909817df 100644
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java
@@ -10,6 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.processors;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.*;
import java.util.Arrays;
import junit.framework.TestCase;
@@ -21,7 +25,6 @@ import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processin
import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.equinox.p2.tests.optimizers.TestData;
@@ -34,7 +37,7 @@ public class JBPatchStepTest extends TestCase {
public void testPatchEclipseExe32to33() throws IOException {
IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/eclipse-3.2.exe");
ProcessingStep patcher = new MockableJBPatchStep(repoMock);
- ProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
+ IProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
ArtifactDescriptor context = new ArtifactDescriptor(key);
patcher.initialize(descriptor, context);
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java
index f5aa33b04..faf1034b9 100644
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java
@@ -10,6 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.processors;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.*;
import java.util.Arrays;
import junit.framework.TestCase;
@@ -21,7 +25,6 @@ import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processin
import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.equinox.p2.tests.optimizers.TestData;
@@ -52,7 +55,7 @@ public class JBPatchZipStepTest extends TestCase {
IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar");
ProcessingStep patcher = new MockableJBPatchZipStep(repoMock);
- ProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
+ IProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
ArtifactDescriptor context = new ArtifactDescriptor(key);
patcher.initialize(descriptor, context);
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java
index 0b7e96075..eac7b5612 100644
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java
@@ -11,6 +11,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.processors;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.*;
import java.util.zip.ZipInputStream;
import junit.framework.TestCase;
@@ -22,7 +26,6 @@ import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processin
import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.equinox.p2.tests.optimizers.TestData;
@@ -39,7 +42,7 @@ public class JarDeltaProcessorTest extends TestCase {
public void testProcessing() throws IOException {
IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/testdata_1.0.0.1.jar");
ProcessingStep step = new MockableJarDeltaProcessorStep(repoMock);
- ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
+ IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.0.0.2"));
ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
step.initialize(stepDescriptor, descriptor);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java
index 7eb41e5dd..e4dbb5d0f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java
@@ -18,7 +18,7 @@ import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifact
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.internal.provisional.p2.metadata.Version;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class ArtifactRepositoryWithReferenceDescriptors extends AbstractProvisioningTest {
@@ -40,13 +40,13 @@ public class ArtifactRepositoryWithReferenceDescriptors extends AbstractProvisio
repo = createArtifactRepository(getTempFolder().toURI(), null);
File fileLocation = getTestData("Artifacts for repositor with references", "testData/referenceArtifactRepo/test1 Reference.jar");
descriptor1 = new SimpleArtifactDescriptor(new ArtifactKey("osgi.bundle", "test1Reference", Version.create("1.0.0")));
- descriptor1.setProcessingSteps(new ProcessingStepDescriptor[0]);
+ descriptor1.setProcessingSteps(new IProcessingStepDescriptor[0]);
descriptor1.setRepositoryProperty("artifact.reference", fileLocation.toURL().toExternalForm());
descriptor1.setRepositoryProperty("file.name", fileLocation.getAbsolutePath());
descriptor1.setRepositoryProperty("file.lastModified", Long.toString(fileLocation.lastModified()));
descriptor2 = new SimpleArtifactDescriptor(new ArtifactKey("osgi.bundle", "test1Reference", Version.create("1.0.0")));
- descriptor2.setProcessingSteps(new ProcessingStepDescriptor[0]);
+ descriptor2.setProcessingSteps(new IProcessingStepDescriptor[0]);
descriptor2.setRepositoryProperty("artifact.reference", fileLocation.toURI().toString());
descriptor2.setRepositoryProperty("file.name", fileLocation.getAbsolutePath());
descriptor2.setRepositoryProperty("file.lastModified", Long.toString(fileLocation.lastModified()));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/SimpleArtifactRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/SimpleArtifactRepositoryTest.java
index 466e42a3f..db2f9e857 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/SimpleArtifactRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/SimpleArtifactRepositoryTest.java
@@ -12,6 +12,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
@@ -252,7 +254,7 @@ public class SimpleArtifactRepositoryTest extends AbstractProvisioningTest {
// Create a descriptor for a packed repo
ArtifactDescriptor descriptor = new ArtifactDescriptor(new ArtifactKey("org.eclipse.update.feature", "test", Version.parseVersion("1.0.0")));
descriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
- descriptor.setProcessingSteps(new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)});
+ descriptor.setProcessingSteps(new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)});
// Create repository
Map properties = new HashMap();
@@ -268,7 +270,7 @@ public class SimpleArtifactRepositoryTest extends AbstractProvisioningTest {
}
private static class TestDescriptor implements IArtifactDescriptor {
- private static final ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[0];
+ private static final IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[0];
private IArtifactKey artifactKey;
private Properties properties = new Properties();
@@ -280,7 +282,7 @@ public class SimpleArtifactRepositoryTest extends AbstractProvisioningTest {
return artifactKey;
}
- public ProcessingStepDescriptor[] getProcessingSteps() {
+ public IProcessingStepDescriptor[] getProcessingSteps() {
return steps;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Adder.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Adder.java
index 841009f0a..c83d8c7bf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Adder.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Adder.java
@@ -11,13 +11,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository.processing;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.IOException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
public class Adder extends ProcessingStep {
@@ -32,7 +33,7 @@ public class Adder extends ProcessingStep {
this.operand = operand;
}
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public void initialize(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
super.initialize(descriptor, context);
try {
operand = Integer.valueOf(descriptor.getData()).intValue();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ByteShifter.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ByteShifter.java
index cc8b8e2be..a40339ff6 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ByteShifter.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ByteShifter.java
@@ -11,13 +11,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository.processing;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.IOException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
public class ByteShifter extends ProcessingStep {
@@ -33,7 +34,7 @@ public class ByteShifter extends ProcessingStep {
basicInitialize(null);
}
- private void basicInitialize(ProcessingStepDescriptor descriptor) {
+ private void basicInitialize(IProcessingStepDescriptor descriptor) {
// if the status is already set to something that not ok, we've already found a problem.
if (!getStatus().isOK())
return;
@@ -51,7 +52,7 @@ public class ByteShifter extends ProcessingStep {
setStatus(new Status(code, Activator.ID, "ByteShifter operand invalid: " + operand));
}
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public void initialize(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
super.initialize(descriptor, context);
try {
operand = Integer.valueOf(descriptor.getData()).intValue();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Counter.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Counter.java
index ab8f7243b..9fac7255b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Counter.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Counter.java
@@ -10,13 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository.processing;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.IOException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
public class Counter extends ProcessingStep {
@@ -33,7 +34,7 @@ public class Counter extends ProcessingStep {
basicInitialize(null);
}
- private void basicInitialize(ProcessingStepDescriptor descriptor) {
+ private void basicInitialize(IProcessingStepDescriptor descriptor) {
// if the status is already set to something that not ok, we've already found a problem.
if (!getStatus().isOK())
return;
@@ -51,7 +52,7 @@ public class Counter extends ProcessingStep {
setStatus(new Status(code, Activator.ID, "Counter size not set"));
}
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public void initialize(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
super.initialize(descriptor, context);
String data = descriptor.getData();
if (data == null)
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Multiplier.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Multiplier.java
index a021278df..f4d71f5d8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Multiplier.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/Multiplier.java
@@ -11,13 +11,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository.processing;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.IOException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
public class Multiplier extends ProcessingStep {
@@ -32,7 +33,7 @@ public class Multiplier extends ProcessingStep {
this.operand = operand;
}
- public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+ public void initialize(IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
super.initialize(descriptor, context);
try {
operand = Integer.valueOf(descriptor.getData()).intValue();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java
index 109f60deb..3e870d33a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/processing/ProcessingStepHandlerTest.java
@@ -11,6 +11,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository.processing;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
import java.io.*;
import java.util.Arrays;
import junit.framework.TestCase;
@@ -20,7 +24,6 @@ import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
import org.eclipse.equinox.internal.p2.jarprocessor.PackStep;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
import org.eclipse.equinox.p2.tests.TestActivator;
public class ProcessingStepHandlerTest extends TestCase {
@@ -31,7 +34,7 @@ public class ProcessingStepHandlerTest extends TestCase {
IProgressMonitor monitor = new NullProgressMonitor();
public void testExecuteNoPSs() throws IOException {
- ProcessingStepDescriptor[] descriptors = new ProcessingStepDescriptor[0];
+ IProcessingStepDescriptor[] descriptors = new IProcessingStepDescriptor[0];
OutputStream result = new ByteArrayOutputStream(10);
OutputStream testStream = handler.createAndLink(descriptors, null, result, monitor);
testStream.write("Test".getBytes());
@@ -127,7 +130,7 @@ public class ProcessingStepHandlerTest extends TestCase {
//this test is only applicable if pack200 is available
if (!PackStep.canPack())
return;
- ProcessingStepDescriptor[] descriptors = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)};
+ IProcessingStepDescriptor[] descriptors = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)};
ProcessingStep[] steps = handler.create(descriptors, null);
ByteArrayOutputStream result = new ByteArrayOutputStream(100000);
OutputStream testStream = handler.link(steps, result, monitor);
@@ -139,7 +142,7 @@ public class ProcessingStepHandlerTest extends TestCase {
}
public void testCreateByteShifterPS() {
- ProcessingStepDescriptor[] descriptors = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.ByteShifter", "1", true)};
+ IProcessingStepDescriptor[] descriptors = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.ByteShifter", "1", true)};
ProcessingStep[] steps = handler.create(descriptors, null);
assertNotNull(steps);
assertEquals(1, steps.length);
@@ -155,7 +158,7 @@ public class ProcessingStepHandlerTest extends TestCase {
// }
public void testCreateAdderPS() {
- ProcessingStepDescriptor[] descriptors = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Adder", "1", true)};
+ IProcessingStepDescriptor[] descriptors = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Adder", "1", true)};
ProcessingStep[] steps = handler.create(descriptors, null);
assertNotNull(steps);
assertEquals(1, steps.length);
@@ -163,7 +166,7 @@ public class ProcessingStepHandlerTest extends TestCase {
}
public void testCreateMultiplierPS() {
- ProcessingStepDescriptor[] descriptors = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Multiplier", "2", true)};
+ IProcessingStepDescriptor[] descriptors = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Multiplier", "2", true)};
ProcessingStep[] steps = handler.create(descriptors, null);
assertNotNull(steps);
assertEquals(1, steps.length);
@@ -171,7 +174,7 @@ public class ProcessingStepHandlerTest extends TestCase {
}
public void testCreatePack200UnpackerPS() {
- ProcessingStepDescriptor[] descriptors = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)};
+ IProcessingStepDescriptor[] descriptors = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)};
ProcessingStep[] steps = handler.create(descriptors, null);
assertNotNull(steps);
assertEquals(1, steps.length);
@@ -179,9 +182,9 @@ public class ProcessingStepHandlerTest extends TestCase {
}
public void testCreatePSsAndAssureOrderingOfPSs1() throws IOException {
- ProcessingStepDescriptor adder = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Adder", "1", true);
- ProcessingStepDescriptor multiplier = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Multiplier", "2", true);
- ProcessingStepDescriptor[] descriptors = new ProcessingStepDescriptor[] {adder, multiplier};
+ IProcessingStepDescriptor adder = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Adder", "1", true);
+ IProcessingStepDescriptor multiplier = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Multiplier", "2", true);
+ IProcessingStepDescriptor[] descriptors = new IProcessingStepDescriptor[] {adder, multiplier};
ProcessingStep[] steps = handler.create(descriptors, null);
ByteArrayOutputStream result = new ByteArrayOutputStream(10);
OutputStream testStream = handler.link(steps, result, monitor);
@@ -191,9 +194,9 @@ public class ProcessingStepHandlerTest extends TestCase {
}
public void testCreatePSsAndAssureOrderingOfPSs2() throws IOException {
- ProcessingStepDescriptor adder = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Adder", "1", true);
- ProcessingStepDescriptor multiplier = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Multiplier", "2", true);
- ProcessingStepDescriptor[] descriptors = new ProcessingStepDescriptor[] {multiplier, adder};
+ IProcessingStepDescriptor adder = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Adder", "1", true);
+ IProcessingStepDescriptor multiplier = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Multiplier", "2", true);
+ IProcessingStepDescriptor[] descriptors = new IProcessingStepDescriptor[] {multiplier, adder};
ProcessingStep[] steps = handler.create(descriptors, null);
ByteArrayOutputStream result = new ByteArrayOutputStream(10);
OutputStream testStream = handler.link(steps, result, monitor);
@@ -203,9 +206,9 @@ public class ProcessingStepHandlerTest extends TestCase {
}
public void testLinkPSs() throws IOException {
- ProcessingStepDescriptor adder = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Adder", "1", true);
- ProcessingStepDescriptor multiplier = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Multiplier", "2", true);
- ProcessingStepDescriptor[] descriptors = new ProcessingStepDescriptor[] {adder, multiplier};
+ IProcessingStepDescriptor adder = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Adder", "1", true);
+ IProcessingStepDescriptor multiplier = new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Multiplier", "2", true);
+ IProcessingStepDescriptor[] descriptors = new IProcessingStepDescriptor[] {adder, multiplier};
ByteArrayOutputStream result = new ByteArrayOutputStream(10);
OutputStream testStream = handler.createAndLink(descriptors, null, result, monitor);
testStream.write(new byte[] {1, 2, 3, 4, 5});
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
index 3cdd35afc..e82f5f841 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
@@ -20,7 +20,7 @@ import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.ProcessingStepDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
@@ -67,8 +67,8 @@ public class ProvElementLabelProvider extends LabelProvider implements ITableLab
IArtifactKey key = (IArtifactKey) obj;
return key.getId() + " [" + key.getClassifier() + "]"; //$NON-NLS-1$//$NON-NLS-2$
}
- if (obj instanceof ProcessingStepDescriptor) {
- ProcessingStepDescriptor descriptor = (ProcessingStepDescriptor) obj;
+ if (obj instanceof IProcessingStepDescriptor) {
+ IProcessingStepDescriptor descriptor = (IProcessingStepDescriptor) obj;
return descriptor.getProcessorId();
}
if (obj instanceof IRequiredCapability) {
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
index 6c0a882d8..b30424f73 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.updatesite.artifact;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
import java.net.URI;
import java.util.*;
import org.eclipse.core.runtime.*;
@@ -116,7 +118,7 @@ public class UpdateSiteArtifactRepositoryFactory extends ArtifactRepositoryFacto
featureArtifactDescriptor = new SimpleArtifactDescriptor(featureKey);
featureURL = updateSite.getFeatureURI(feature.getId(), feature.getVersion());
featureArtifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, featureURL.toString() + PACK_EXT);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+ IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
featureArtifactDescriptor.setProcessingSteps(steps);
featureArtifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
allSiteArtifacts.add(featureArtifactDescriptor);
@@ -138,7 +140,7 @@ public class UpdateSiteArtifactRepositoryFactory extends ArtifactRepositoryFacto
artifactDescriptor = new SimpleArtifactDescriptor(key);
pluginURL = updateSite.getPluginURI(entry);
artifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, pluginURL.toString() + PACK_EXT);
- ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+ IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
artifactDescriptor.setProcessingSteps(steps);
artifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
allSiteArtifacts.add(artifactDescriptor);

Back to the top