Interface EnvironmentRepositoryLinkDao
- All Superinterfaces:
BambooObjectDao<EnvironmentRepositoryLink>
- All Known Implementing Classes:
EnvironmentRepositoryLinkHibernateDao
-
Method Summary
Modifier and TypeMethodDescriptionvoid
detachAllRepositoriesFromEnvironment
(@NotNull InternalEnvironment environment) Remove allPlanRepositoryLink
defined for theEnvironment
.void
detachAllRepositoriesFromEnvironment
(@NotNull EnvironmentDeletionAdapter deletionAdapter) Remove allPlanRepositoryLink
defined for theEnvironment
.@Nullable EnvironmentRepositoryLink
getEnvironmentRepositoryLink
(@NotNull InternalEnvironment environment, long repositoryId) @NotNull List<EnvironmentRepositoryLink>
getEnvironmentRepositoryLinks
(@NotNull InternalEnvironment environment) @NotNull List<EnvironmentRepositoryLink>
getEnvironmentRepositoryLinksForRepository
(long repositoryId) @NotNull List<MutableEnvironment>
getEnvironmentsUsingRepository
(long repositoryId) linkRepositoryToEnvironment
(MutableEnvironment environment, RepositoryDataEntity repositoryDataEntity, int index) Creates and saves connection between repository and and a deployment environment.void
removeRepositoryFromEnvironment
(@NotNull EnvironmentRepositoryLink environmentRepositoryLink) Remove singlePlanRepositoryLink
.Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
Method Details
-
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
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
- 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:
-