Class EditRepositoryImpl
java.lang.Object
com.atlassian.bamboo.configuration.repository.EditRepositoryImpl
- All Implemented Interfaces:
EditRepository
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.configuration.repository.EditRepository
EditRepository.WebhookTypeNeeded
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
areDivergentBranchesSupported
(@NotNull PartialVcsRepositoryData vcsRepositoryData) @NotNull List<DeploymentProject>
getBambooSpecsPermittedDeploymentProjects
(@NotNull PartialVcsRepositoryData vcsRepositoryData, @NotNull DeploymentProjectService deploymentProjectService) Returns a list of deployment projects which can be modified by Bamboo Specs stored in this repository.@NotNull List<ProjectIdentifier>
getBambooSpecsPermittedProjects
(@NotNull PartialVcsRepositoryData vcsRepositoryData, @NotNull ProjectManager projectManager) @NotNull List<RepositoryDataEntity>
getBambooSpecsPermittedRepositories
(@NotNull PartialVcsRepositoryData vcsRepositoryData) Returns a list of repositories which can be used by Bamboo Specs stored in this repository.@Nullable String
getDefaultBranch
(@NotNull PartialVcsRepositoryData vcsRepositoryData) getEditablePermissions
(@NotNull Map<BambooPermission, String> permissionLabels) getPermissionDependencies
(@NotNull String permissionName) boolean
isBambooSpecsCapable
(@Nullable VcsRepositoryModuleDescriptor vcsRepositoryModuleDescriptor) boolean
isBambooSpecsDetectionEnabled
(@Nullable PartialVcsRepositoryData vcsRepositoryData) Returns true if given repository has Bamboo Specs detection enabled, so any changes to these specs should trigger update of Bamboo configuration.boolean
isBambooSpecsDetectionRequiresWebhooks
(@Nullable PartialVcsRepositoryData vcsRepositoryData) boolean
isBambooSpecsPermittedToAllProjects
(@Nullable PartialVcsRepositoryData vcsRepositoryData) Returns true if Bamboo Specs stored in this repository is permitted to modify configuration of all projects in Bamboo.boolean
isBambooSpecsPermittedToAllProjectsEditable
(boolean hasAdminPermission, @NotNull BambooPermissionManager bambooPermissionManager) boolean
isBambooSpecsPermittedToAllRepositories
(@Nullable PartialVcsRepositoryData vcsRepositoryData, @NotNull RssPermissionManager rssPermissionManager) boolean
isBambooSpecsPermittedToAllRepositoriesEditable
(boolean hasAdminPermission, @NotNull BambooPermissionManager bambooPermissionManager) boolean
isShowOnboardingDialog
(@NotNull BambooUserManager bambooUserManager, @Nullable com.atlassian.user.User user) @NotNull EditRepository.WebhookTypeNeeded
webhookNeededByBambooSpecsDetection
(@Nullable PartialVcsRepositoryData vcsRepositoryData)
-
Constructor Details
-
EditRepositoryImpl
public EditRepositoryImpl()
-
-
Method Details
-
getEditablePermissions
@NotNull public @NotNull Map<String,String> getEditablePermissions(@NotNull @NotNull Map<BambooPermission, String> permissionLabels) - Specified by:
getEditablePermissions
in interfaceEditRepository
-
getPermissionDependencies
@NotNull public @NotNull List<String> getPermissionDependencies(@NotNull @NotNull String permissionName) - Specified by:
getPermissionDependencies
in interfaceEditRepository
-
isBambooSpecsCapable
public boolean isBambooSpecsCapable(@Nullable @Nullable VcsRepositoryModuleDescriptor vcsRepositoryModuleDescriptor) - Specified by:
isBambooSpecsCapable
in interfaceEditRepository
- Returns:
- boolean true if given repository type can store Bamboo Specs and notify about changes in it.
-
isBambooSpecsDetectionEnabled
public boolean isBambooSpecsDetectionEnabled(@Nullable @Nullable PartialVcsRepositoryData vcsRepositoryData) Description copied from interface:EditRepository
Returns true if given repository has Bamboo Specs detection enabled, so any changes to these specs should trigger update of Bamboo configuration.- Specified by:
isBambooSpecsDetectionEnabled
in interfaceEditRepository
- Returns:
- boolean true if enabled
-
isBambooSpecsPermittedToAllProjects
public boolean isBambooSpecsPermittedToAllProjects(@Nullable @Nullable PartialVcsRepositoryData vcsRepositoryData) Description copied from interface:EditRepository
Returns true if Bamboo Specs stored in this repository is permitted to modify configuration of all projects in Bamboo.- Specified by:
isBambooSpecsPermittedToAllProjects
in interfaceEditRepository
- Returns:
- boolean true if can modify all projects
-
isBambooSpecsPermittedToAllProjectsEditable
public boolean isBambooSpecsPermittedToAllProjectsEditable(boolean hasAdminPermission, @NotNull @NotNull BambooPermissionManager bambooPermissionManager) - Specified by:
isBambooSpecsPermittedToAllProjectsEditable
in interfaceEditRepository
- Returns:
- true if user is able to modify All projects access setting
-
isBambooSpecsPermittedToAllRepositories
public boolean isBambooSpecsPermittedToAllRepositories(@Nullable @Nullable PartialVcsRepositoryData vcsRepositoryData, @NotNull @NotNull RssPermissionManager rssPermissionManager) - Specified by:
isBambooSpecsPermittedToAllRepositories
in interfaceEditRepository
- Returns:
- true if Bamboo Specs stored in this repository is permitted to access all linked repositories in Bamboo.
-
isBambooSpecsPermittedToAllRepositoriesEditable
public boolean isBambooSpecsPermittedToAllRepositoriesEditable(boolean hasAdminPermission, @NotNull @NotNull BambooPermissionManager bambooPermissionManager) - Specified by:
isBambooSpecsPermittedToAllRepositoriesEditable
in interfaceEditRepository
- Returns:
- true if user is able to modify All repositories access setting
-
isBambooSpecsDetectionRequiresWebhooks
public boolean isBambooSpecsDetectionRequiresWebhooks(@Nullable @Nullable PartialVcsRepositoryData vcsRepositoryData) - Specified by:
isBambooSpecsDetectionRequiresWebhooks
in interfaceEditRepository
- Returns:
- true only when detection of Bamboo Specs needs webhooks, otherwise false.
-
webhookNeededByBambooSpecsDetection
@NotNull public @NotNull EditRepository.WebhookTypeNeeded webhookNeededByBambooSpecsDetection(@Nullable @Nullable PartialVcsRepositoryData vcsRepositoryData) - Specified by:
webhookNeededByBambooSpecsDetection
in interfaceEditRepository
- Returns:
- the type of the webhook needed by specs detection
-
isShowOnboardingDialog
public boolean isShowOnboardingDialog(@NotNull @NotNull BambooUserManager bambooUserManager, @Nullable @Nullable com.atlassian.user.User user) - Specified by:
isShowOnboardingDialog
in interfaceEditRepository
- Returns:
- true if specs onboarding dialog should be shown, false otherwise
-
getBambooSpecsPermittedProjects
@NotNull public @NotNull List<ProjectIdentifier> getBambooSpecsPermittedProjects(@NotNull @NotNull PartialVcsRepositoryData vcsRepositoryData, @NotNull @NotNull ProjectManager projectManager) - Specified by:
getBambooSpecsPermittedProjects
in interfaceEditRepository
- Returns:
- a list of projects which can be modified by Bamboo Specs stored in this repository.
-
getBambooSpecsPermittedDeploymentProjects
@NotNull public @NotNull List<DeploymentProject> getBambooSpecsPermittedDeploymentProjects(@NotNull @NotNull PartialVcsRepositoryData vcsRepositoryData, @NotNull @NotNull DeploymentProjectService deploymentProjectService) Description copied from interface:EditRepository
Returns a list of deployment projects which can be modified by Bamboo Specs stored in this repository.- Specified by:
getBambooSpecsPermittedDeploymentProjects
in interfaceEditRepository
-
getBambooSpecsPermittedRepositories
@NotNull public @NotNull List<RepositoryDataEntity> getBambooSpecsPermittedRepositories(@NotNull @NotNull PartialVcsRepositoryData vcsRepositoryData) Description copied from interface:EditRepository
Returns a list of repositories which can be used by Bamboo Specs stored in this repository.- Specified by:
getBambooSpecsPermittedRepositories
in interfaceEditRepository
-
areDivergentBranchesSupported
public boolean areDivergentBranchesSupported(@NotNull @NotNull PartialVcsRepositoryData vcsRepositoryData) - Specified by:
areDivergentBranchesSupported
in interfaceEditRepository
- Returns:
- true only if plugin key of the repository supports divergent branches, otherwise false.
-
getDefaultBranch
@Nullable public @Nullable String getDefaultBranch(@NotNull @NotNull PartialVcsRepositoryData vcsRepositoryData) - Specified by:
getDefaultBranch
in interfaceEditRepository
- Returns:
- a name of default branch of the given repository. If repository does not have any branches returns null.
-