Skip to main content
summaryrefslogtreecommitdiffstats
path: root/p2
diff options
context:
space:
mode:
authorDoug Schaefer2009-04-07 02:33:12 +0000
committerDoug Schaefer2009-04-07 02:33:12 +0000
commit962ee7affa644a3aa2863cddc9d9aa207fe469a9 (patch)
tree31fe1d9222b8c0d25b5924a1fe1d8f8ddc54b70d /p2
parent6143779d73ad20bc53064fe2c83e31957c69536e (diff)
downloadorg.eclipse.cdt-962ee7affa644a3aa2863cddc9d9aa207fe469a9.tar.gz
org.eclipse.cdt-962ee7affa644a3aa2863cddc9d9aa207fe469a9.tar.xz
org.eclipse.cdt-962ee7affa644a3aa2863cddc9d9aa207fe469a9.zip
New implementation of InstallDir artifact repo.
Diffstat (limited to 'p2')
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallDirArtifactRepository.java78
-rw-r--r--p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallDirArtifactRepositoryFactory.java28
2 files changed, 106 insertions, 0 deletions
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallDirArtifactRepository.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallDirArtifactRepository.java
new file mode 100644
index 00000000000..e7f8266755b
--- /dev/null
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallDirArtifactRepository.java
@@ -0,0 +1,78 @@
+package org.eclipse.cdt.p2.internal.repo.artifact;
+
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
+import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
+import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.AbstractArtifactRepository;
+
+public class InstallDirArtifactRepository extends AbstractArtifactRepository {
+
+ public static String type = InstallDirArtifactRepository.class.getName();
+ private static String version = "1.0.0";
+ private static String description = "Artifact repository managing installed contents";
+ private static String provider = "Eclipse";
+
+ @SuppressWarnings("unchecked")
+ public InstallDirArtifactRepository(String name, URI location, Map properties) {
+ super(name, type, version, location, description, provider, properties);
+ }
+
+ @Override
+ public boolean contains(IArtifactDescriptor descriptor) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean contains(IArtifactKey key) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public IStatus getArtifact(IArtifactDescriptor descriptor,
+ OutputStream destination, IProgressMonitor monitor) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public IArtifactKey[] getArtifactKeys() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public IStatus getArtifacts(IArtifactRequest[] requests,
+ IProgressMonitor monitor) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public OutputStream getOutputStream(IArtifactDescriptor descriptor)
+ throws ProvisionException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IStatus getRawArtifact(IArtifactDescriptor descriptor,
+ OutputStream destination, IProgressMonitor monitor) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallDirArtifactRepositoryFactory.java b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallDirArtifactRepositoryFactory.java
new file mode 100644
index 00000000000..9844870c3bf
--- /dev/null
+++ b/p2/org.eclipse.cdt.p2/src/org/eclipse/cdt/p2/internal/repo/artifact/InstallDirArtifactRepositoryFactory.java
@@ -0,0 +1,28 @@
+package org.eclipse.cdt.p2.internal.repo.artifact;
+
+import java.net.URI;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
+import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory;
+
+public class InstallDirArtifactRepositoryFactory extends
+ ArtifactRepositoryFactory {
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public IArtifactRepository create(URI location, String name, String type, Map properties) throws ProvisionException {
+ if (InstallDirArtifactRepository.type.equals(type))
+ return new InstallDirArtifactRepository(name, location, properties);
+ else
+ return null;
+ }
+
+ @Override
+ public IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
+ return null;
+ }
+
+}

Back to the top