aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-09-13 12:02:36 +0000
committerOlivier Lamy <olamy@apache.org>2011-09-13 12:02:36 +0000
commit7a01429a4423cc5f064b7690c6abf493496a02a7 (patch)
tree7487df5b6fa334a3b5569a1c5b5384c79029bd11 /archiva-modules/archiva-web/archiva-rest
parentb4959a42f5873905e7306c1365044896e722e3f5 (diff)
downloadarchiva-7a01429a4423cc5f064b7690c6abf493496a02a7.tar.gz
archiva-7a01429a4423cc5f064b7690c6abf493496a02a7.zip
format cleanup : no code change
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1170131 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java131
1 files changed, 63 insertions, 68 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java
index 251c5ea8c..a98585291 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java
@@ -40,74 +40,16 @@ public class Artifact
public Artifact()
{
-
- }
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
- if ( o == null || getClass() != o.getClass() )
- {
- return false;
- }
-
- Artifact artifact = (Artifact) o;
-
- if ( !artifactId.equals( artifact.artifactId ) )
- {
- return false;
- }
- if ( !groupId.equals( artifact.groupId ) )
- {
- return false;
- }
- if ( !repositoryId.equals( artifact.repositoryId ) )
- {
- return false;
- }
- if ( type != null ? !type.equals( artifact.type ) : artifact.type != null )
- {
- return false;
- }
- if ( !version.equals( artifact.version ) )
- {
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode()
- {
- int result = repositoryId.hashCode();
- result = 31 * result + groupId.hashCode();
- result = 31 * result + artifactId.hashCode();
- result = 31 * result + version.hashCode();
- result = 31 * result + ( type != null ? type.hashCode() : 0 );
- return result;
- }
-
- @Override
- public String toString()
- {
- return "Artifact{" + "repositoryId='" + repositoryId + '\'' + ", groupId='" + groupId + '\'' + ", artifactId='"
- + artifactId + '\'' + ", version='" + version + '\'' + ", type='" + type + '\'' + '}';
+ // no op
}
public Artifact( String repositoryId, String groupId, String artifactId, String version, String type )
-// String type, Date whenGathered )
{
this.repositoryId = repositoryId;
this.groupId = groupId;
this.artifactId = artifactId;
this.version = version;
this.type = type;
- //this.whenGathered = whenGathered;
}
public String getGroupId()
@@ -135,11 +77,6 @@ public class Artifact
return repositoryId;
}
- /*public Date getWhenGathered()
- {
- return whenGathered;
- }*/
-
public void setGroupId( String groupId )
{
this.groupId = groupId;
@@ -165,9 +102,67 @@ public class Artifact
this.repositoryId = repositoryId;
}
- /*@ServiceBeanField( "whenGathered" )
- public void setWhenGathered( Date whenGathered )
+ @Override
+ public boolean equals( Object o )
{
- this.whenGathered = whenGathered;
- }*/
+ if ( this == o )
+ {
+ return true;
+ }
+ if ( o == null || getClass() != o.getClass() )
+ {
+ return false;
+ }
+
+ Artifact artifact = (Artifact) o;
+
+ if ( !artifactId.equals( artifact.artifactId ) )
+ {
+ return false;
+ }
+ if ( !groupId.equals( artifact.groupId ) )
+ {
+ return false;
+ }
+ if ( !repositoryId.equals( artifact.repositoryId ) )
+ {
+ return false;
+ }
+ if ( type != null ? !type.equals( artifact.type ) : artifact.type != null )
+ {
+ return false;
+ }
+ if ( !version.equals( artifact.version ) )
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ int result = repositoryId.hashCode();
+ result = 31 * result + groupId.hashCode();
+ result = 31 * result + artifactId.hashCode();
+ result = 31 * result + version.hashCode();
+ result = 31 * result + ( type != null ? type.hashCode() : 0 );
+ return result;
+ }
+
+ @Override
+ public String toString()
+ {
+ final StringBuilder sb = new StringBuilder();
+ sb.append( "Artifact" );
+ sb.append( "{repositoryId='" ).append( repositoryId ).append( '\'' );
+ sb.append( ", groupId='" ).append( groupId ).append( '\'' );
+ sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
+ sb.append( ", version='" ).append( version ).append( '\'' );
+ sb.append( ", type='" ).append( type ).append( '\'' );
+ sb.append( '}' );
+ return sb.toString();
+ }
+
}