]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.repo/src/org/argeo/slc/repo/ArtifactDistribution.java
Move Argeo SLC JCR components to Argeo JCR
[gpl/argeo-slc.git] / org.argeo.slc.repo / src / org / argeo / slc / repo / ArtifactDistribution.java
diff --git a/org.argeo.slc.repo/src/org/argeo/slc/repo/ArtifactDistribution.java b/org.argeo.slc.repo/src/org/argeo/slc/repo/ArtifactDistribution.java
deleted file mode 100644 (file)
index bc496f1..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.argeo.slc.repo;
-
-import org.argeo.slc.CategoryNameVersion;
-import org.argeo.slc.build.Distribution;
-import org.eclipse.aether.artifact.Artifact;
-import org.eclipse.aether.artifact.DefaultArtifact;
-
-/** A {@link Distribution} based on an Aether {@link Artifact} */
-public class ArtifactDistribution implements Distribution,
-               CategoryNameVersion {
-       private final Artifact artifact;
-
-       public ArtifactDistribution(Artifact artifact) {
-               this.artifact = artifact;
-       }
-
-       public ArtifactDistribution(String coords) {
-               this(new DefaultArtifact(coords));
-       }
-
-       /** Aether coordinates of the underlying artifact. */
-       public String getDistributionId() {
-               return artifact.toString();
-       }
-
-       public Artifact getArtifact() {
-               return artifact;
-       }
-
-       public String getName() {
-               return getArtifact().getArtifactId();
-       }
-
-       public String getVersion() {
-               return getArtifact().getVersion();
-       }
-
-       public String getCategory() {
-               return getArtifact().getGroupId();
-       }
-
-       @Override
-       public int hashCode() {
-               return artifact.hashCode();
-       }
-
-       @Override
-       public boolean equals(Object obj) {
-               if (obj instanceof CategoryNameVersion) {
-                       CategoryNameVersion cnv = (CategoryNameVersion) obj;
-                       return getCategory().equals(cnv.getCategory())
-                                       && getName().equals(cnv.getName())
-                                       && getVersion().equals(cnv.getVersion());
-               } else
-                       return artifact.equals(obj);
-       }
-
-       @Override
-       public String toString() {
-               return getDistributionId();
-       }
-
-}