Class ArtifactReferenceBuilder
- java.lang.Object
-
- com.solace.serdes.common.resolver.strategy.ArtifactReferenceBuilder
-
public class ArtifactReferenceBuilder extends Object
Builder class for creating ArtifactReference instances.This builder provides a fluent API for constructing ArtifactReference objects with various properties such as group ID, artifact ID, version, global ID, content ID, name, and content hash.
Example usage:
ArtifactReference reference = new ArtifactReferenceBuilder() .groupId("myGroup") .artifactId("myArtifact") .version("1.0.0") .build();
-
-
Constructor Summary
Constructors Constructor Description ArtifactReferenceBuilder()
Constructs a new ArtifactReferenceBuilder instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactReferenceBuilder
artifactId(String artifactId)
Sets the artifact ID for the artifact reference.ArtifactReferenceImpl
build()
Builds a new ArtifactReference instance with the configured properties.ArtifactReferenceBuilder
contentId(Long contentId)
Sets the content ID for the artifact reference.ArtifactReferenceBuilder
globalId(Long globalId)
Sets the global ID for the artifact reference.ArtifactReferenceBuilder
groupId(String groupId)
Sets the group ID for the artifact reference.ArtifactReferenceBuilder
name(String name)
Sets the name for the artifact reference.ArtifactReferenceBuilder
version(String version)
Sets the version for the artifact reference.
-
-
-
Method Detail
-
groupId
public ArtifactReferenceBuilder groupId(String groupId)
Sets the group ID for the artifact reference.- Parameters:
groupId
- The group ID- Returns:
- This builder instance for method chaining
-
artifactId
public ArtifactReferenceBuilder artifactId(String artifactId)
Sets the artifact ID for the artifact reference.- Parameters:
artifactId
- The artifact ID- Returns:
- This builder instance for method chaining
-
version
public ArtifactReferenceBuilder version(String version)
Sets the version for the artifact reference.- Parameters:
version
- The version- Returns:
- This builder instance for method chaining
-
globalId
public ArtifactReferenceBuilder globalId(Long globalId)
Sets the global ID for the artifact reference.- Parameters:
globalId
- The global ID- Returns:
- This builder instance for method chaining
-
contentId
public ArtifactReferenceBuilder contentId(Long contentId)
Sets the content ID for the artifact reference.- Parameters:
contentId
- The content ID- Returns:
- This builder instance for method chaining
-
name
public ArtifactReferenceBuilder name(String name)
Sets the name for the artifact reference.- Parameters:
name
- The name- Returns:
- This builder instance for method chaining
-
build
public ArtifactReferenceImpl build()
Builds a new ArtifactReference instance with the configured properties. If no group ID is set, it defaults to "default".- Returns:
- A new ArtifactReference instance
-
-