Package com.atlassian.bamboo.plan.branch
Class VcsBranchManagerImpl
- java.lang.Object
-
- com.atlassian.bamboo.plan.branch.VcsBranchManagerImpl
-
- All Implemented Interfaces:
VcsBranchManager
public class VcsBranchManagerImpl extends Object implements VcsBranchManager
-
-
Constructor Summary
Constructors Constructor Description VcsBranchManagerImpl(@NotNull VcsBranchDao vcsBranchDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createAll(@NotNull ImmutableChain chain, @NotNull Iterable<VcsBranch> vcsBranches)
Creates new VCS branches.void
createAll(@NotNull Iterable<BambooVcsBranch> vcsBranches)
Creates new VCS branches.void
deleteAll(@NotNull ImmutableChain chain)
void
deleteAll(@NotNull Collection<BambooVcsBranch> vcsBranches)
List<BambooVcsBranch>
findByChain(@NotNull ImmutableChain chain)
@Nullable BambooVcsBranch
findByChainAndName(long chainId, @NotNull String branchName)
List<BambooVcsBranch>
findByChainId(long chainId)
Note: the returned VCS branches will not have a chain associated with them.List<BambooVcsBranch>
findNotDeletedByChain(@NotNull ImmutableChain chain)
Given a chain, this will return a list ofBambooVcsBranch
of which Bamboo hasn't detected yet that they were deleted in the repository.void
save(@NotNull BambooVcsBranch branch)
void
saveAll(@NotNull ImmutableChain chain, @NotNull Iterable<VcsBranch> vcsBranches)
void
saveAll(@NotNull Iterable<BambooVcsBranch> vcsBranches)
-
-
-
Constructor Detail
-
VcsBranchManagerImpl
public VcsBranchManagerImpl(@NotNull @NotNull VcsBranchDao vcsBranchDao)
-
-
Method Detail
-
findByChain
public List<BambooVcsBranch> findByChain(@NotNull @NotNull ImmutableChain chain)
- Specified by:
findByChain
in interfaceVcsBranchManager
-
findByChainAndName
@Nullable public @Nullable BambooVcsBranch findByChainAndName(long chainId, @NotNull @NotNull String branchName)
- Specified by:
findByChainAndName
in interfaceVcsBranchManager
-
findNotDeletedByChain
public List<BambooVcsBranch> findNotDeletedByChain(@NotNull @NotNull ImmutableChain chain)
Description copied from interface:VcsBranchManager
Given a chain, this will return a list ofBambooVcsBranch
of which Bamboo hasn't detected yet that they were deleted in the repository.- Specified by:
findNotDeletedByChain
in interfaceVcsBranchManager
- Parameters:
chain
- the chain for which we want to find VCS branches.- Returns:
- a list of
BambooVcsBranch
which still exists in the repository according to Bamboo
-
findByChainId
public List<BambooVcsBranch> findByChainId(long chainId)
Description copied from interface:VcsBranchManager
Note: the returned VCS branches will not have a chain associated with them.- Specified by:
findByChainId
in interfaceVcsBranchManager
-
save
public void save(@NotNull @NotNull BambooVcsBranch branch)
- Specified by:
save
in interfaceVcsBranchManager
-
deleteAll
public void deleteAll(@NotNull @NotNull ImmutableChain chain)
- Specified by:
deleteAll
in interfaceVcsBranchManager
-
deleteAll
public void deleteAll(@NotNull @NotNull Collection<BambooVcsBranch> vcsBranches)
- Specified by:
deleteAll
in interfaceVcsBranchManager
-
saveAll
public void saveAll(@NotNull @NotNull Iterable<BambooVcsBranch> vcsBranches)
- Specified by:
saveAll
in interfaceVcsBranchManager
-
createAll
public void createAll(@NotNull @NotNull Iterable<BambooVcsBranch> vcsBranches)
Description copied from interface:VcsBranchManager
Creates new VCS branches. If any of the branches will match an existing entity in the database, a new entity will not be created - instead, the existing one will have it's detected deletion date cleared.- Specified by:
createAll
in interfaceVcsBranchManager
-
saveAll
public void saveAll(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull Iterable<VcsBranch> vcsBranches)
- Specified by:
saveAll
in interfaceVcsBranchManager
-
createAll
public void createAll(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull Iterable<VcsBranch> vcsBranches)
Description copied from interface:VcsBranchManager
Creates new VCS branches. If any of the branches will match an existing entity in the database, a new entity will not be created - instead, the existing one will have it's detected deletion date cleared.- Specified by:
createAll
in interfaceVcsBranchManager
-
-