aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-repository-layer
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-03-21 18:01:43 +0100
committerMartin Stockhammer <martin_s@apache.org>2020-03-21 18:01:43 +0100
commit2a6bcd0c6a403958cab80826642b360697441f51 (patch)
treed7f6600b0e7a34dd590124165c759706bb202551 /archiva-modules/archiva-base/archiva-repository-layer
parent729da5803c7c6f7924c29f599c2bb77d003700b8 (diff)
downloadarchiva-2a6bcd0c6a403958cab80826642b360697441f51.tar.gz
archiva-2a6bcd0c6a403958cab80826642b360697441f51.zip
Adding toString methods to content items
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-layer')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaArtifact.java16
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaNamespace.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaProject.java5
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java6
4 files changed, 33 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaArtifact.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaArtifact.java
index b17a9c5af..d4d9ef2f5 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaArtifact.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaArtifact.java
@@ -159,6 +159,22 @@ public class ArchivaArtifact extends ArchivaContentItem implements Artifact
return result;
}
+ @Override
+ public String toString( )
+ {
+ final StringBuilder sb = new StringBuilder( "ArchivaArtifact{" );
+ sb.append( "id='" ).append( id ).append( '\'' );
+ sb.append( ", artifactVersion='" ).append( artifactVersion ).append( '\'' );
+ sb.append( ", version=" ).append( version );
+ sb.append( ", type='" ).append( type ).append( '\'' );
+ sb.append( ", classifier='" ).append( classifier ).append( '\'' );
+ sb.append( ", remainder='" ).append( remainder ).append( '\'' );
+ sb.append( ", contentType='" ).append( contentType ).append( '\'' );
+ sb.append( ", artifactType=" ).append( artifactType );
+ sb.append( '}' );
+ return sb.toString( );
+ }
+
private static class Builder
extends ContentItemBuilder<ArchivaArtifact, ArtifactOptBuilder, WithVersionObjectBuilder>
implements ArtifactVersionBuilder, WithVersionObjectBuilder, ArtifactWithIdBuilder, ArtifactOptBuilder
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaNamespace.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaNamespace.java
index 5371e0335..b85f25a60 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaNamespace.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaNamespace.java
@@ -87,6 +87,12 @@ public class ArchivaNamespace extends ArchivaContentItem implements Namespace
return result;
}
+ @Override
+ public String toString( )
+ {
+ return namespace;
+ }
+
private static class Builder extends ContentItemBuilder<ArchivaNamespace, NamespaceOptBuilder, WithNamespaceBuilder>
implements WithNamespaceBuilder, NamespaceOptBuilder
{
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaProject.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaProject.java
index 4d902f33f..ac72f6217 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaProject.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaProject.java
@@ -97,6 +97,11 @@ public class ArchivaProject extends ArchivaContentItem implements Project
return result;
}
+ @Override
+ public String toString( )
+ {
+ return id + ", namespace="+namespace.toString();
+ }
/*
* Builder class
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java
index 90b69217f..e10d3b1c5 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java
@@ -107,6 +107,12 @@ public class ArchivaVersion extends ArchivaContentItem implements Version
return result;
}
+ @Override
+ public String toString( )
+ {
+ return version+", project="+project.toString();
+ }
+
private static final class Builder extends ContentItemBuilder<ArchivaVersion, VersionOptBuilder, WithProjectBuilder>
implements WithProjectBuilder, WithVersionBuilder, VersionOptBuilder
{