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
-
Field Summary
Fields inherited from interface com.atlassian.bamboo.utils.CreationDateProvider
ORDERING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VcsPullRequestImpl
cloneForAnotherRootId
(@NotNull VcsPullRequest pullRequest, long newRootVcsId) boolean
getKey()
@NotNull String
@NotNull String
long
@Nullable VcsForkDto
int
hashCode()
boolean
isOpen()
void
void
setOpen
(boolean open) void
void
setSourceRepositoryId
(Long sourceRepositoryId) void
void
setTargetRepositoryId
(long targetRepositoryId) void
setVcsForkDto
(@Nullable VcsForkDto vcsForkDto) void
setVcsForkDto
(@Nullable String sourceParentIdentifier, @Nullable String sourceRepositoryIdentifier) toString()
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
Methods inherited from interface com.atlassian.bamboo.utils.CreationDateProvider
getCreationDate
Methods inherited from interface com.atlassian.bamboo.plan.pullrequest.VcsPullRequest
getLastModificationDate, isFromFork
-
Constructor Details
-
VcsPullRequestImpl
public VcsPullRequestImpl() -
VcsPullRequestImpl
-
-
Method Details
-
cloneForAnotherRootId
public static VcsPullRequestImpl cloneForAnotherRootId(@NotNull @NotNull VcsPullRequest pullRequest, long newRootVcsId) -
getKey
- Specified by:
getKey
in interfaceVcsPullRequest
- Returns:
- repository specific pull request key
-
setKey
- Specified by:
setKey
in interfaceMutableVcsPullRequest
- Parameters:
vcsPullRequestKey
- VCS-specific id of pull request
-
getSourceRepositoryId
- Specified by:
getSourceRepositoryId
in interfaceVcsPullRequest
- Returns:
- source repository id or null if source repository is out of Bamboo control
-
setSourceRepositoryId
- Specified by:
setSourceRepositoryId
in interfaceMutableVcsPullRequest
- Parameters:
sourceRepositoryId
- source repository id
-
getTargetRepositoryId
public long getTargetRepositoryId()- Specified by:
getTargetRepositoryId
in interfaceVcsPullRequest
- Returns:
- target repository id
-
setTargetRepositoryId
public void setTargetRepositoryId(long targetRepositoryId) - Specified by:
setTargetRepositoryId
in interfaceMutableVcsPullRequest
- Parameters:
targetRepositoryId
- target repository id
-
getSource
- Specified by:
getSource
in interfaceVcsPullRequest
- Returns:
- source branch name or git ref
-
setSource
- Specified by:
setSource
in interfaceMutableVcsPullRequest
- Parameters:
source
- branch name or git ref
-
getTarget
- Specified by:
getTarget
in interfaceVcsPullRequest
- Returns:
- name of target branch name or git ref
-
setTarget
- Specified by:
setTarget
in interfaceMutableVcsPullRequest
- Parameters:
target
- branch name or git ref
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfaceVcsPullRequest
- Returns:
- if pull request is open or merged/declined
-
setOpen
public void setOpen(boolean open) - Specified by:
setOpen
in interfaceMutableVcsPullRequest
- Parameters:
open
- pull request open status
-
getVcsForkDto
- Specified by:
getVcsForkDto
in interfaceVcsPullRequest
- Returns:
- data access object connected with pull requests made from forked repositories
-
setVcsForkDto
- Specified by:
setVcsForkDto
in interfaceMutableVcsPullRequest
- 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 interfaceMutableVcsPullRequest
- Parameters:
sourceParentIdentifier
- the project identifier of forked/source repository, e.g. project keysourceRepositoryIdentifier
- the forked repository identifier, e.g. repository slug
-
equals
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
toString
-