This is an automated email from the ASF dual-hosted git repository. martin_s pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/archiva.git
commit 3162ea79e672c098abae8d31a74ad0bf3d3d7f7c Author: Martin Stockhammer <[email protected]> AuthorDate: Mon Feb 10 23:20:42 2020 +0100 Adding fluent api methods --- .../apache/archiva/model/ArtifactReference.java | 25 ++++++++++++++++++++++ .../org/apache/archiva/model/ProjectReference.java | 10 +++++++++ .../apache/archiva/model/VersionedReference.java | 15 +++++++++++++ 3 files changed, 50 insertions(+) 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 aaaf9e8..9317377 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 3009b0d..c8bf1fe 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 f494932..f2185ee 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. *
