Class 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 Detail

      • ArtifactReferenceBuilder

        public ArtifactReferenceBuilder()
        Constructs a new ArtifactReferenceBuilder instance.
    • 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