Class MirrorSyncCommandParameters.Builder
java.lang.Object
com.atlassian.bitbucket.scm.mirror.MirrorSyncCommandParameters.Builder
- Enclosing class:
- MirrorSyncCommandParameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanonymous(boolean value) If no credentials are to be provided, set this totrue.atomic(boolean value) build()includePrivateRefs(boolean value) If an explicit refspec is set then this setting is ignored.privateKey(File value) privateKey(Path value) prune(boolean value) Specifies whether to supply--pruneto prune local branches and tags where the upstream branch or tag has been deleted.withEnvironment(String name, String value) Puts the providedvaluein theenvironmentmap with the specifiedname, after ensuring both thenameandvalueare not blank.withTags(boolean value) If using a refspec that includes tags this must be set to false or the fetch command will fail.
-
Constructor Details
-
Builder
- Parameters:
remoteUrl- the URL to fetch from
-
Builder
- Parameters:
mirrorSyncCommandParameters- to copy- Since:
- 6.7
-
-
Method Details
-
anonymous
If no credentials are to be provided, set this totrue. If no credentials are provided, and anonymous is not set totrue, then anIllegalArgumentExceptionwill be thrown. Similarly, if credentials are provided, but anonymous is set totruethen anIllegalArgumentExceptionwill be thrown.- Parameters:
value- whether or not the sync command should provide credentials- Returns:
this- Since:
- 6.10
-
atomic
- Parameters:
value-trueif the refs should be updated atomically (all refs updated successfully, or none); if not set, this defaults tofalse- Returns:
this- Since:
- 8.0
-
build
-
includePrivateRefs
If an explicit refspec is set then this setting is ignored.- Parameters:
value- whether to include private refs (outside refs/heads and refs/tags) in the fetch. The default value is true so all refs will be fetched.- Returns:
this- Since:
- 5.1
-
password
- Parameters:
value- the password to use- Returns:
this- Since:
- 4.6
-
privateKey
- Parameters:
value- the SSH private key to use for authentication- Returns:
this
-
privateKey
- Parameters:
value- the SSH private key to use for authentication- Returns:
this- Since:
- 5.12
-
prune
Specifies whether to supply--pruneto prune local branches and tags where the upstream branch or tag has been deleted.- Parameters:
value- true if pruning should be enabled- Returns:
- the builder
- Since:
- 6.7
-
refspecs
- Parameters:
values- refspecs to be passed to the fetch command- Returns:
- the builder
- Since:
- 6.7
-
username
- Parameters:
value- the username to use- Returns:
this- Since:
- 4.6
-
withEnvironment
@Nonnull public MirrorSyncCommandParameters.Builder withEnvironment(@Nonnull String name, @Nonnull String value) Puts the providedvaluein theenvironmentmap with the specifiedname, after ensuring both thenameandvalueare not blank.- Parameters:
name- the name of the environment variable to setvalue- the value to set for the environment variable- Returns:
- the builder
- Since:
- 6.7
-
withTags
If using a refspec that includes tags this must be set to false or the fetch command will fail.- Parameters:
value- whether to include tags from the fetch unless included explicitly in a refspec.- Returns:
- the builder
- Since:
- 6.7
-