@Test void equality() { ArchivaArtifact item1 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact" ) .withArtifactVersion( "3.0.484848" ) .withType( "jar" ) .withClassifier( "private" ) .withRemainder( "jar.sha1" ) .withContentType( "text/html" ) .build( ); ArchivaArtifact item2 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact" ) .withArtifactVersion( "3.0.484849" ) .withType( "jar" ) .withClassifier( "private" ) .withRemainder( "jar.sha1" ) .withContentType( "text/html" ) .build( ); ArchivaArtifact item3 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact" ) .withArtifactVersion( "3.0.484848" ) .withType( "jar" ) .withClassifier( "private" ) .withRemainder( "jar.sha1" ) .withContentType( "text/html" ) .build( ); ArchivaArtifact item4 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact" ) .withArtifactVersion( "3.0.484848" ) .withType( "sourcejar" ) .withClassifier( "private" ) .withRemainder( "jar.sha1" ) .withContentType( "text/html" ) .build( ); ArchivaArtifact item5 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact" ) .withArtifactVersion( "3.0.484848" ) .withType( "jar" ) .withClassifier( "public" ) .withRemainder( "jar.sha1" ) .withContentType( "text/html" ) .build( ); ArchivaArtifact item6 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact" ) .withArtifactVersion( "3.0.484848" ) .withType( "jar" ) .withClassifier( "private" ) .withRemainder( "jar.md5" ) .withContentType( "text/html" ) .build( ); ArchivaArtifact item7 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact" ) .withArtifactVersion( "3.0.484848" ) .withType( "jar" ) .withClassifier( "private" ) .withRemainder( "jar.sha1" ) .withContentType( "text/xml" ) .build( ); ArchivaArtifact item8 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact2" ) .withArtifactVersion( "3.0.484848" ) .withType( "jar" ) .withClassifier( "private" ) .withRemainder( "jar.sha1" ) .withContentType( "text/html" ) .build( ); ArchivaArtifact item9 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact2" ) .build( ); ArchivaArtifact item10 = ArchivaArtifact.withAsset( asset ).withVersion( version ).withId( "testartifact2" ) .build( ); assertNotEquals( item1, item2 ); assertEquals( item1, item3 ); assertNotEquals( item1, item4 ); assertNotEquals( item1, item5 ); assertEquals( item1, item6 ); assertEquals( item1, item7 ); assertNotEquals( item1, item8 ); assertEquals( item9, item10 ); }
public static WithVersionObjectBuilder withAsset( StorageAsset asset ) { return new Builder( ).withAsset( asset ); }
ArchivaArtifact extends BaseContentItem implements Artifact { public static WithVersionObjectBuilder withAsset( StorageAsset asset ) { return new Builder( ).withAsset( asset ); } }
ArchivaArtifact extends BaseContentItem implements Artifact { public static WithVersionObjectBuilder withAsset( StorageAsset asset ) { return new Builder( ).withAsset( asset ); } private  ArchivaArtifact( ); }
ArchivaArtifact extends BaseContentItem implements Artifact { public static WithVersionObjectBuilder withAsset( StorageAsset asset ) { return new Builder( ).withAsset( asset ); } private  ArchivaArtifact( ); @Override String getId( ); @Override String getArtifactVersion( ); @Override Version getVersion( ); @Override String getType( ); @Override String getClassifier( ); @Override String getRemainder( ); @Override String getContentType( ); @Override ArtifactType getDataType( ); @Override Namespace getNamespace( ); @Override Project getProject( ); static WithVersionObjectBuilder withAsset( StorageAsset asset ); @Override boolean equals( Object o ); @Override int hashCode( ); @Override String toString( ); static String defaultString( String value ); String toKey(  ); }
ArchivaArtifact extends BaseContentItem implements Artifact { public static WithVersionObjectBuilder withAsset( StorageAsset asset ) { return new Builder( ).withAsset( asset ); } private  ArchivaArtifact( ); @Override String getId( ); @Override String getArtifactVersion( ); @Override Version getVersion( ); @Override String getType( ); @Override String getClassifier( ); @Override String getRemainder( ); @Override String getContentType( ); @Override ArtifactType getDataType( ); @Override Namespace getNamespace( ); @Override Project getProject( ); static WithVersionObjectBuilder withAsset( StorageAsset asset ); @Override boolean equals( Object o ); @Override int hashCode( ); @Override String toString( ); static String defaultString( String value ); String toKey(  );  }