aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-model
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-02-10 23:20:42 +0100
committerMartin Stockhammer <martin_s@apache.org>2020-02-10 23:20:42 +0100
commit3162ea79e672c098abae8d31a74ad0bf3d3d7f7c (patch)
tree615231f0af4b14dd304164f9e164095497af865a /archiva-modules/archiva-base/archiva-model
parentaf4c1a763b5a73a3f30f0b3dd1cd9de55d2b00ca (diff)
downloadarchiva-3162ea79e672c098abae8d31a74ad0bf3d3d7f7c.tar.gz
archiva-3162ea79e672c098abae8d31a74ad0bf3d3d7f7c.zip
Adding fluent api methods
Diffstat (limited to 'archiva-modules/archiva-base/archiva-model')
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArtifactReference.java25
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ProjectReference.java10
-rw-r--r--archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/VersionedReference.java15
3 files changed, 50 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArtifactReference.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArtifactReference.java
index aaaf9e808..93173773f 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArtifactReference.java
+++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArtifactReference.java
@@ -83,6 +83,11 @@ public class ArtifactReference
return this.artifactId;
} //-- String getArtifactId()
+ public ArtifactReference artifactId(String artifactId) {
+ this.artifactId = artifactId;
+ return this;
+ }
+
/**
* Get the classifier for this artifact.
*
@@ -93,6 +98,11 @@ public class ArtifactReference
return this.classifier;
} //-- String getClassifier()
+ public ArtifactReference classifier(String classifier) {
+ this.classifier = classifier;
+ return this;
+ }
+
/**
* Get the Group ID of the repository content.
*
@@ -103,6 +113,11 @@ public class ArtifactReference
return this.groupId;
} //-- String getGroupId()
+ public ArtifactReference groupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
/**
* Get the type of artifact.
*
@@ -113,6 +128,11 @@ public class ArtifactReference
return this.type;
} //-- String getType()
+ public ArtifactReference type(String type) {
+ this.type = type;
+ return this;
+ }
+
/**
* Get the version of the repository content.
*
@@ -123,6 +143,11 @@ public class ArtifactReference
return this.version;
} //-- String getVersion()
+ public ArtifactReference version(String version) {
+ this.version = version;
+ return this;
+ }
+
/**
* Set the Artifact ID of the repository content.
*
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ProjectReference.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ProjectReference.java
index 3009b0d88..c8bf1fedd 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ProjectReference.java
+++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ProjectReference.java
@@ -62,6 +62,11 @@ public class ProjectReference
return this.artifactId;
} //-- String getArtifactId()
+ public ProjectReference artifactId(String artifactId) {
+ this.artifactId = artifactId;
+ return this;
+ }
+
/**
* Get the Group ID of the project reference.
*
@@ -72,6 +77,11 @@ public class ProjectReference
return this.groupId;
} //-- String getGroupId()
+ public ProjectReference groupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
/**
* Set the Artifact ID of the project reference.
*
diff --git a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/VersionedReference.java b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/VersionedReference.java
index f4949322e..f2185eed4 100644
--- a/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/VersionedReference.java
+++ b/archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/VersionedReference.java
@@ -69,6 +69,11 @@ public class VersionedReference
return this.artifactId;
} //-- String getArtifactId()
+ public VersionedReference artifactId(String artifactId) {
+ this.artifactId = artifactId;
+ return this;
+ }
+
/**
* Get the Group ID of the repository content.
*
@@ -79,6 +84,11 @@ public class VersionedReference
return this.groupId;
} //-- String getGroupId()
+ public VersionedReference groupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
/**
* Get the version of the repository content.
*
@@ -89,6 +99,11 @@ public class VersionedReference
return this.version;
} //-- String getVersion()
+ public VersionedReference version(String version) {
+ this.version = version;
+ return this;
+ }
+
/**
* Set the Artifact ID of the repository content.
*