Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2010-03-05 22:32:23 +0000
committerJohn Arthorne2010-03-05 22:32:23 +0000
commit9fe7fc7078564daa547dc308fff7bc5ee15d4eaa (patch)
treec0df702c26b00d50a3e9397f9b07855c3af11845 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2
parent6681d1baf3a6f5152768995ecca95e2238cbadd4 (diff)
downloadrt.equinox.p2-9fe7fc7078564daa547dc308fff7bc5ee15d4eaa.tar.gz
rt.equinox.p2-9fe7fc7078564daa547dc308fff7bc5ee15d4eaa.tar.xz
rt.equinox.p2-9fe7fc7078564daa547dc308fff7bc5ee15d4eaa.zip
Bug 293340 - [api][repository] Review of the repository package
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractWrappedArtifactRepository.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestMetadataRepository.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java4
4 files changed, 17 insertions, 21 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractWrappedArtifactRepository.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractWrappedArtifactRepository.java
index 701d97765..b96c52d6c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractWrappedArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractWrappedArtifactRepository.java
@@ -93,6 +93,10 @@ public class AbstractWrappedArtifactRepository implements IArtifactRepository {
return delegate.getProperties();
}
+ public String getProperty(String key) {
+ return delegate.getProperty(key);
+ }
+
public String getProvider() {
return delegate.getProvider();
}
@@ -113,22 +117,10 @@ public class AbstractWrappedArtifactRepository implements IArtifactRepository {
return delegate.isModifiable();
}
- public void setDescription(String description) {
- delegate.setDescription(description);
- }
-
- public void setName(String name) {
- delegate.setName(name);
- }
-
public String setProperty(String key, String value) {
return delegate.setProperty(key, value);
}
- public void setProvider(String provider) {
- delegate.setProvider(provider);
- }
-
public Object getAdapter(Class adapter) {
return delegate.getAdapter(adapter);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java
index d7fcb5bfb..0a3815173 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestArtifactRepository.java
@@ -129,7 +129,7 @@ public class TestArtifactRepository extends AbstractArtifactRepository {
}
public void initialize(URI repoURL, InputStream descriptorFile) {
- location = repoURL;
+ setLocation(repoURL);
}
public boolean contains(IArtifactDescriptor descriptor) {
@@ -142,7 +142,7 @@ public class TestArtifactRepository extends AbstractArtifactRepository {
public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
ProcessingStepHandler handler = new ProcessingStepHandler();
- destination = handler.createAndLink(agent, descriptor.getProcessingSteps(), null, destination, monitor);
+ destination = handler.createAndLink(getProvisioningAgent(), descriptor.getProcessingSteps(), null, destination, monitor);
testhandler.download(keysToLocations.get(descriptor.getArtifactKey()), destination, monitor);
return Status.OK_STATUS;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestMetadataRepository.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestMetadataRepository.java
index d6b0c733c..fc3a7c1fd 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestMetadataRepository.java
@@ -93,13 +93,13 @@ public class TestMetadataRepository extends AbstractMetadataRepository {
}
public void initialize(RepositoryState state) {
- this.name = state.Name;
- this.type = state.Type;
- this.version = state.Version.toString();
- this.provider = state.Provider;
- this.description = state.Description;
- this.location = state.Location;
- this.properties = state.Properties;
+ setName(state.Name);
+ setType(state.Type);
+ setVersion(state.Version.toString());
+ setProvider(state.Provider);
+ setDescription(state.Description);
+ setLocation(state.Location);
+ setProperties(state.Properties);
this.units.addAll(Arrays.asList(state.Units));
this.repositories.addAll(Arrays.asList(state.Repositories));
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java
index 042ae4dee..0e97e1009 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/TestArtifactRepository.java
@@ -222,6 +222,10 @@ public class TestArtifactRepository implements IArtifactRepository {
return OrderedProperties.unmodifiableProperties(properties);
}
+ public String getProperty(String key) {
+ return properties.get(key);
+ }
+
public String getProvider() {
return provider;
}

Back to the top