Class BitbucketClientRepository

    • Constructor Detail

      • BitbucketClientRepository

        public BitbucketClientRepository​(JsonObject object)
        Constructs this object.
        Parameters:
        object - JSON object for a repository
        Throws:
        IllegalArgumentException - if object is null or is not for a repository
      • BitbucketClientRepository

        public BitbucketClientRepository​(JsonObject object,
                                         BitbucketClient client)
        Constructs this object with a Bitbucket client.
        Parameters:
        object - JSON object for a repository
        client - Bitbucket client
        Throws:
        IllegalArgumentException - if object is null or is not for a repository
    • Method Detail

      • getSCM

        public final String getSCM()
        Returns the SCM type of the repository. The return value shall be either #GIT or #HG.
        Specified by:
        getSCM in interface BitbucketRepository
        Returns:
        the SCM type of the repository
      • getName

        public final String getName()
        Returns the name of the repository.
        Specified by:
        getName in interface BitbucketRepository
        Returns:
        the name of the repository
      • getUUID

        public final UUID getUUID()
        Returns the UUID of the repository.
        Specified by:
        getUUID in interface BitbucketRepository
        Returns:
        the UUID of the repository
      • getFullName

        public final String getFullName()
        Returns the full name of the repository.
        Specified by:
        getFullName in interface BitbucketRepository
        Returns:
        the full name of the repository
      • getDescription

        public final String getDescription()
        Returns the description of the repository.

        This implementation takes the string of "description" in the underlying JSON object.

        Specified by:
        getDescription in interface BitbucketRepository
        Returns:
        the description of the repository
      • isPrivate

        public final boolean isPrivate()
        Returns true if and only if the repository is private.
        Specified by:
        isPrivate in interface BitbucketRepository
        Returns:
        true if and only if the repository is private
      • getMainBranch

        public final BitbucketBranch getMainBranch()
        Returns the main branch of the repository.

        This implementation takes the object of "mainbranch" in the underlying JSON object.

        Specified by:
        getMainBranch in interface BitbucketRepository
        Returns:
        the main branch of the repository
      • hasIssueTracker

        public final boolean hasIssueTracker()
        Description copied from interface: BitbucketRepository
        Returns true if and only if the repository has a issue tracker.
        Specified by:
        hasIssueTracker in interface BitbucketRepository
        Returns:
        true if and only if the repository has a issue tracker
      • hasWiki

        public final boolean hasWiki()
        Description copied from interface: BitbucketRepository
        Returns true if and only if the repository has a wiki.
        Specified by:
        hasWiki in interface BitbucketRepository
        Returns:
        true if and only if the repository has a wiki
      • getCreated

        public final Instant getCreated()
        Returns the time when the repository was created.

        This implementation takes the date-time value of "created_on" in the underlying JSON object.

        Specified by:
        getCreated in interface BitbucketRepository
        Returns:
        the time when the repository was created
      • getUpdated

        public final Instant getUpdated()
        Returns the time when the repository was last updated.

        This implementation takes the date-time value of "updated_on" in the underlying JSON object.

        Specified by:
        getUpdated in interface BitbucketRepository
        Returns:
        the time when the repository was last updated
      • getIssue

        public final BitbucketIssue getIssue​(int id)
        Returns the issue specified by an identifier.
        Specified by:
        getIssue in interface BitbucketIssueTracker
        Parameters:
        id - identifier of the issue
        Returns:
        issue if found, null otherwise