Browse Source

Adding fluent api methods

pull/57/head
Martin Stockhammer 4 years ago
parent
commit
3162ea79e6

+ 25
- 0
archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ArtifactReference.java View File

@@ -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.
*

+ 10
- 0
archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/ProjectReference.java View File

@@ -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.
*

+ 15
- 0
archiva-modules/archiva-base/archiva-model/src/main/java/org/apache/archiva/model/VersionedReference.java View File

@@ -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.
*

Loading…
Cancel
Save