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
Constructors Constructor Description VcsPullRequestImpl()
VcsPullRequestImpl(VcsPullRequest pullRequest)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VcsPullRequestImpl
cloneForAnotherRootId(@NotNull VcsPullRequest pullRequest, long newRootVcsId)
boolean
equals(Object o)
String
getKey()
@NotNull String
getSource()
Long
getSourceRepositoryId()
@NotNull String
getTarget()
long
getTargetRepositoryId()
@Nullable VcsForkDto
getVcsForkDto()
int
hashCode()
boolean
isOpen()
void
setKey(String vcsPullRequestKey)
void
setOpen(boolean open)
void
setSource(@NotNull String source)
void
setSourceRepositoryId(Long sourceRepositoryId)
void
setTarget(@NotNull String target)
void
setTargetRepositoryId(long targetRepositoryId)
void
setVcsForkDto(@Nullable VcsForkDto vcsForkDto)
void
setVcsForkDto(@Nullable String sourceParentIdentifier, @Nullable String sourceRepositoryIdentifier)
String
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 Detail
-
VcsPullRequestImpl
public VcsPullRequestImpl()
-
VcsPullRequestImpl
public VcsPullRequestImpl(VcsPullRequest pullRequest)
-
-
Method Detail
-
cloneForAnotherRootId
public static VcsPullRequestImpl cloneForAnotherRootId(@NotNull @NotNull VcsPullRequest pullRequest, long newRootVcsId)
-
getKey
public String getKey()
- Specified by:
getKey
in interfaceVcsPullRequest
- Returns:
- repository specific pull request key
-
setKey
public void setKey(String vcsPullRequestKey)
- Specified by:
setKey
in interfaceMutableVcsPullRequest
- Parameters:
vcsPullRequestKey
- VCS-specific id of pull request
-
getSourceRepositoryId
public Long getSourceRepositoryId()
- Specified by:
getSourceRepositoryId
in interfaceVcsPullRequest
- Returns:
- source repository id or null if source repository is out of Bamboo control
-
setSourceRepositoryId
public void setSourceRepositoryId(Long sourceRepositoryId)
- 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
@NotNull public @NotNull String getSource()
- Specified by:
getSource
in interfaceVcsPullRequest
- Returns:
- source branch name or git ref
-
setSource
public void setSource(@NotNull @NotNull String source)
- Specified by:
setSource
in interfaceMutableVcsPullRequest
- Parameters:
source
- branch name or git ref
-
getTarget
@NotNull public @NotNull String getTarget()
- Specified by:
getTarget
in interfaceVcsPullRequest
- Returns:
- name of target branch name or git ref
-
setTarget
public void setTarget(@NotNull @NotNull String target)
- 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
@Nullable public @Nullable VcsForkDto getVcsForkDto()
- Specified by:
getVcsForkDto
in interfaceVcsPullRequest
- Returns:
- data access object connected with pull requests made from forked repositories
-
setVcsForkDto
public void setVcsForkDto(@Nullable @Nullable VcsForkDto vcsForkDto)
- 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
public boolean equals(Object o)
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
-