Class RepositoryRefDefinition


  • public final class RepositoryRefDefinition
    extends Object
    The source reference for the GitRepository object.
    • Constructor Detail

      • RepositoryRefDefinition

        public RepositoryRefDefinition()
    • Method Detail

      • branch

        public String branch()
        Get the branch property: The git repository branch name to checkout.
        Returns:
        the branch value.
      • withBranch

        public RepositoryRefDefinition withBranch​(String branch)
        Set the branch property: The git repository branch name to checkout.
        Parameters:
        branch - the branch value to set.
        Returns:
        the RepositoryRefDefinition object itself.
      • tag

        public String tag()
        Get the tag property: The git repository tag name to checkout. This takes precedence over branch.
        Returns:
        the tag value.
      • withTag

        public RepositoryRefDefinition withTag​(String tag)
        Set the tag property: The git repository tag name to checkout. This takes precedence over branch.
        Parameters:
        tag - the tag value to set.
        Returns:
        the RepositoryRefDefinition object itself.
      • semver

        public String semver()
        Get the semver property: The semver range used to match against git repository tags. This takes precedence over tag.
        Returns:
        the semver value.
      • withSemver

        public RepositoryRefDefinition withSemver​(String semver)
        Set the semver property: The semver range used to match against git repository tags. This takes precedence over tag.
        Parameters:
        semver - the semver value to set.
        Returns:
        the RepositoryRefDefinition object itself.
      • commit

        public String commit()
        Get the commit property: The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.
        Returns:
        the commit value.
      • withCommit

        public RepositoryRefDefinition withCommit​(String commit)
        Set the commit property: The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.
        Parameters:
        commit - the commit value to set.
        Returns:
        the RepositoryRefDefinition object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.