aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/metadata')
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java
index 456d63951..2f5a141f8 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java
@@ -25,6 +25,16 @@ public class License
private String url;
+ public License( String name, String url )
+ {
+ this.name = name;
+ this.url = url;
+ }
+
+ public License()
+ {
+ }
+
public String getName()
{
return name;
@@ -44,4 +54,44 @@ public class License
{
this.url = url;
}
+
+ @Override
+ public boolean equals( Object o )
+ {
+ if ( this == o )
+ {
+ return true;
+ }
+ if ( o == null || getClass() != o.getClass() )
+ {
+ return false;
+ }
+
+ License license = (License) o;
+
+ if ( name != null ? !name.equals( license.name ) : license.name != null )
+ {
+ return false;
+ }
+ if ( url != null ? !url.equals( license.url ) : license.url != null )
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ int result = name != null ? name.hashCode() : 0;
+ result = 31 * result + ( url != null ? url.hashCode() : 0 );
+ return result;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "License{" + "name='" + name + '\'' + ", url='" + url + '\'' + '}';
+ }
}