Interface EnvironmentRepositoryLinkDao
-
- All Superinterfaces:
BambooObjectDao<EnvironmentRepositoryLink>
- All Known Implementing Classes:
EnvironmentRepositoryLinkHibernateDao
public interface EnvironmentRepositoryLinkDao extends BambooObjectDao<EnvironmentRepositoryLink>
-
-
Method Summary
-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
getEnvironmentRepositoryLinks
@NotNull @NotNull List<EnvironmentRepositoryLink> getEnvironmentRepositoryLinks(@NotNull @NotNull InternalEnvironment environment)
- Parameters:
environment
-- Returns:
- list of Source Repository relationships defined for the
Environment
sorted byEnvironmentRepositoryLink.getPosition()
-
getEnvironmentRepositoryLinksForRepository
@NotNull @NotNull List<EnvironmentRepositoryLink> getEnvironmentRepositoryLinksForRepository(long repositoryId)
- Parameters:
repositoryId
-- Returns:
- list of Source Repository relationships defined for the given repository
-
getEnvironmentRepositoryLink
@Nullable @Nullable EnvironmentRepositoryLink getEnvironmentRepositoryLink(@NotNull @NotNull InternalEnvironment environment, long repositoryId)
- Parameters:
environment
-repositoryId
-- Returns:
- relationship between entity and repository if it exists, null otherwise
-
detachAllRepositoriesFromEnvironment
void detachAllRepositoriesFromEnvironment(@NotNull @NotNull InternalEnvironment environment)
Remove allPlanRepositoryLink
defined for theEnvironment
. Does not deleteRepositoryDataEntity
objects.- Parameters:
environment
-
-
detachAllRepositoriesFromEnvironment
void detachAllRepositoriesFromEnvironment(@NotNull @NotNull EnvironmentDeletionAdapter deletionAdapter)
Remove allPlanRepositoryLink
defined for theEnvironment
. Does not deleteRepositoryDataEntity
objects.- Parameters:
deletionAdapter
-
-
removeRepositoryFromEnvironment
void removeRepositoryFromEnvironment(@NotNull @NotNull EnvironmentRepositoryLink environmentRepositoryLink)
Remove singlePlanRepositoryLink
. Does not deleteRepositoryDataEntity
- Parameters:
environmentRepositoryLink
-
-
getEnvironmentsUsingRepository
@NotNull @NotNull List<MutableEnvironment> getEnvironmentsUsingRepository(long repositoryId)
- Parameters:
repositoryId
- repository id- Returns:
- list of
Environment
s using given repository
-
linkRepositoryToEnvironment
EnvironmentRepositoryLink linkRepositoryToEnvironment(MutableEnvironment environment, RepositoryDataEntity repositoryDataEntity, int index)
Creates and saves connection between repository and and a deployment environment.- Parameters:
environment
-repositoryDataEntity
-index
-- Returns:
-
-