Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-03-08 20:41:20 -0500
committerSusan Franklin2010-03-08 20:41:20 -0500
commitb6f54c6de86ecb2811d2d105dfeb3d22fc298b5a (patch)
tree6dbe2cffc1d2184a800815536589486ea83c9c9d /bundles/org.eclipse.equinox.p2.repository
parent15cae78a65c657234d79fa501494ae91c86c4544 (diff)
downloadrt.equinox.p2-b6f54c6de86ecb2811d2d105dfeb3d22fc298b5a.tar.gz
rt.equinox.p2-b6f54c6de86ecb2811d2d105dfeb3d22fc298b5a.tar.xz
rt.equinox.p2-b6f54c6de86ecb2811d2d105dfeb3d22fc298b5a.zip
Bug 229183 - [director] [api] ProvisioningContex does not handle repository in a consistent way
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactDescriptorQuery.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactDescriptorQuery.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactDescriptorQuery.java
index 56337f1be..26e096645 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactDescriptorQuery.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactDescriptorQuery.java
@@ -12,12 +12,12 @@
package org.eclipse.equinox.p2.repository.artifact;
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
import java.util.*;
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
/**
* A general purpose query for matching {@link IArtifactDescriptor} instances
@@ -74,6 +74,15 @@ public class ArtifactDescriptorQuery extends ExpressionMatchQuery<IArtifactDescr
}
/**
+ * The query will match descriptors whose <code>id</code> and <code>versionRange</code>
+ * match the supplied key
+ * @param key the artifact key to match. Cannot be <code>null</code>.
+ */
+ public ArtifactDescriptorQuery(IArtifactKey key) {
+ super(IArtifactDescriptor.class, createExpression(key.getId(), new VersionRange(key.getVersion(), true, key.getVersion(), true), null, null));
+ }
+
+ /**
* The query will match descriptors with the given <code>id</code>, <code>versionRange</code>,
* <code>format</code>, and <code>properties</code>.
* @param id the descriptor id to match. Can not be <code>null</code>

Back to the top