Class VcsPullRequestImpl

java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.plan.pullrequest.VcsPullRequestImpl
All Implemented Interfaces:
BambooIdProvider, BambooObject, MutableVcsPullRequest, VcsPullRequest, CreationDateProvider, Cloneable

@Entity public class VcsPullRequestImpl extends com.atlassian.core.bean.EntityObject implements MutableVcsPullRequest
  • Constructor Details

    • VcsPullRequestImpl

      public VcsPullRequestImpl()
    • VcsPullRequestImpl

      public VcsPullRequestImpl(VcsPullRequest pullRequest)
  • Method Details

    • cloneForAnotherRootId

      public static VcsPullRequestImpl cloneForAnotherRootId(@NotNull @NotNull VcsPullRequest pullRequest, long newRootVcsId)
    • getKey

      public String getKey()
      Specified by:
      getKey in interface VcsPullRequest
      Returns:
      repository specific pull request key
    • setKey

      public void setKey(String vcsPullRequestKey)
      Specified by:
      setKey in interface MutableVcsPullRequest
      Parameters:
      vcsPullRequestKey - VCS-specific id of pull request
    • getSourceRepositoryId

      public Long getSourceRepositoryId()
      Specified by:
      getSourceRepositoryId in interface VcsPullRequest
      Returns:
      source repository id or null if source repository is out of Bamboo control
    • setSourceRepositoryId

      public void setSourceRepositoryId(Long sourceRepositoryId)
      Specified by:
      setSourceRepositoryId in interface MutableVcsPullRequest
      Parameters:
      sourceRepositoryId - source repository id
    • getTargetRepositoryId

      public long getTargetRepositoryId()
      Specified by:
      getTargetRepositoryId in interface VcsPullRequest
      Returns:
      target repository id
    • setTargetRepositoryId

      public void setTargetRepositoryId(long targetRepositoryId)
      Specified by:
      setTargetRepositoryId in interface MutableVcsPullRequest
      Parameters:
      targetRepositoryId - target repository id
    • getSource

      @NotNull public @NotNull String getSource()
      Specified by:
      getSource in interface VcsPullRequest
      Returns:
      source branch name or git ref
    • setSource

      public void setSource(@NotNull @NotNull String source)
      Specified by:
      setSource in interface MutableVcsPullRequest
      Parameters:
      source - branch name or git ref
    • getTarget

      @NotNull public @NotNull String getTarget()
      Specified by:
      getTarget in interface VcsPullRequest
      Returns:
      name of target branch name or git ref
    • setTarget

      public void setTarget(@NotNull @NotNull String target)
      Specified by:
      setTarget in interface MutableVcsPullRequest
      Parameters:
      target - branch name or git ref
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface VcsPullRequest
      Returns:
      if pull request is open or merged/declined
    • setOpen

      public void setOpen(boolean open)
      Specified by:
      setOpen in interface MutableVcsPullRequest
      Parameters:
      open - pull request open status
    • getVcsForkDto

      @Nullable public @Nullable VcsForkDto getVcsForkDto()
      Specified by:
      getVcsForkDto in interface VcsPullRequest
      Returns:
      data access object connected with pull requests made from forked repositories
    • setVcsForkDto

      public void setVcsForkDto(@Nullable @Nullable VcsForkDto vcsForkDto)
      Specified by:
      setVcsForkDto in interface MutableVcsPullRequest
      Parameters:
      vcsForkDto - forked pull request specific data access object
    • setVcsForkDto

      public void setVcsForkDto(@Nullable @Nullable String sourceParentIdentifier, @Nullable @Nullable String sourceRepositoryIdentifier)
      Specified by:
      setVcsForkDto in interface MutableVcsPullRequest
      Parameters:
      sourceParentIdentifier - the project identifier of forked/source repository, e.g. project key
      sourceRepositoryIdentifier - the forked repository identifier, e.g. repository slug
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class com.atlassian.core.bean.EntityObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class com.atlassian.core.bean.EntityObject
    • toString

      public String toString()
      Overrides:
      toString in class Object