public class GitURIRequirementsBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
List<com.cloudbees.plugins.credentials.domains.DomainRequirement> |
build()
Builds the list of requirements.
|
static GitURIRequirementsBuilder |
create()
Creates an empty builder.
|
GitURIRequirementsBuilder |
duplicate()
Creates a new builder with the same requirements as this builder.
|
static GitURIRequirementsBuilder |
fromUri(String uri)
Creates a new builder using the supplied URI.
|
GitURIRequirementsBuilder |
withHostname(String hostname)
Replace any hostname requirements with the supplied hostname.
|
GitURIRequirementsBuilder |
withHostnamePort(String hostname,
int port)
Replace any hostname or hostname:port requirements with the supplied hostname and port.
|
GitURIRequirementsBuilder |
withoutHostname()
Removes any hostname or hostname:port requirements.
|
GitURIRequirementsBuilder |
withoutHostnamePort()
Removes any hostname:port requirements.
|
GitURIRequirementsBuilder |
withoutPath()
Removes any path requirements.
|
GitURIRequirementsBuilder |
withoutScheme()
Removes any scheme requirements.
|
GitURIRequirementsBuilder |
withPath(String path)
Replace any path requirements with the supplied path.
|
GitURIRequirementsBuilder |
withScheme(String scheme)
Replace any scheme requirements with the supplied scheme.
|
GitURIRequirementsBuilder |
withUri(String uri)
Replaces the requirements with those of the supplied URI.
|
@NonNull public static GitURIRequirementsBuilder create()
@NonNull public GitURIRequirementsBuilder duplicate()
@NonNull public static GitURIRequirementsBuilder fromUri(@CheckForNull String uri)
uri - the URI to create the requirements of.@NonNull public GitURIRequirementsBuilder withUri(@CheckForNull String uri)
uri - the URI.this.@NonNull public GitURIRequirementsBuilder withoutScheme()
this.@NonNull public GitURIRequirementsBuilder withoutPath()
this.@NonNull public GitURIRequirementsBuilder withoutHostname()
this.@NonNull public GitURIRequirementsBuilder withoutHostnamePort()
this.@NonNull public GitURIRequirementsBuilder withScheme(@CheckForNull String scheme)
scheme - the scheme to use as a requirementthis.@NonNull public GitURIRequirementsBuilder withPath(@CheckForNull String path)
path - to use as a requirementthis.@NonNull public GitURIRequirementsBuilder withHostname(@CheckForNull String hostname)
hostname - the hostname to use as a requirementthis.@NonNull public GitURIRequirementsBuilder withHostnamePort(@CheckForNull String hostname, int port)
hostname - the hostname to use as a requirement or (@code null} to not add any requirementport - the port or -1 to not add HostnamePortRequirementsthis.@NonNull public List<com.cloudbees.plugins.credentials.domains.DomainRequirement> build()
Copyright © 2013–2020. All rights reserved.