@Service public class BitbucketSeverMirrorHelper extends Object
Constructor and Description |
---|
BitbucketSeverMirrorHelper() |
Modifier and Type | Method and Description |
---|---|
Optional<StashMirrorServerEntity> |
findSpecifiedMirror(com.atlassian.stash.rest.client.api.StashClient stashClient,
String projectKey,
String repositorySlug,
com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerMirrorProperties mirrorProperties)
Finds mirror specified by mirrorProperties on the list
|
List<StashMirrorServerEntity> |
getRepositoryMirrors(com.atlassian.stash.rest.client.api.StashClient stashClient,
String projectKey,
String repositorySlug)
Reads all mirrors for a given repository
|
List<StashMirrorServerEntity> |
getRepositoryMirrors(com.atlassian.stash.rest.client.api.StashClient stashClient,
String projectKey,
String repositorySlug,
Predicate<com.atlassian.stash.rest.client.api.entity.MirrorServer> filter)
Reads all mirrors for a given repository
|
boolean |
isBitbucketServerVersionMirrorsSupported(com.atlassian.stash.rest.client.api.StashClient stashClient)
Checks if given Bitbucket Server is supported.
|
public boolean isBitbucketServerVersionMirrorsSupported(com.atlassian.stash.rest.client.api.StashClient stashClient)
Checks if given Bitbucket Server is supported.
Smart mirroring is supported only for Bibtucket Server versions >= 5.0.0 with DC license.
public List<StashMirrorServerEntity> getRepositoryMirrors(com.atlassian.stash.rest.client.api.StashClient stashClient, String projectKey, String repositorySlug) throws IllegalArgumentException
stashClient
- stash client corresponding to the BBS instance serving the repositoryprojectKey
- key of the project containing the repositoryrepositorySlug
- slug of the repositoryIllegalArgumentException
- when can't find repository by projectKey and repositorySlug.public List<StashMirrorServerEntity> getRepositoryMirrors(com.atlassian.stash.rest.client.api.StashClient stashClient, String projectKey, String repositorySlug, Predicate<com.atlassian.stash.rest.client.api.entity.MirrorServer> filter) throws IllegalArgumentException
stashClient
- stash client corresponding to the BBS instance serving the repositoryprojectKey
- key of the project containing the repositoryrepositorySlug
- slug of the repositoryfilter
- for mirror. Applied before ssh details fetching from BBS.IllegalArgumentException
- when can't find repository by projectKey and repositorySlug.@NotNull public Optional<StashMirrorServerEntity> findSpecifiedMirror(com.atlassian.stash.rest.client.api.StashClient stashClient, String projectKey, String repositorySlug, @NotNull com.atlassian.bamboo.specs.model.repository.bitbucket.server.BitbucketServerMirrorProperties mirrorProperties)
stashClient
- stash client corresponding to the BBS instance serving the repositoryprojectKey
- key of the project containing the repositoryrepositorySlug
- slug of the repositorymirrorProperties
- mirror specificationCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.