Package org.jenkinsci.plugins.gitclient
Class GitURIRequirementsBuilder
java.lang.Object
org.jenkinsci.plugins.gitclient.GitURIRequirementsBuilder
A builder to help creating requirements from GIT URIs.
- Since:
- 1.2.0
- 
Method SummaryModifier and TypeMethodDescriptionList<com.cloudbees.plugins.credentials.domains.DomainRequirement>build()Builds the list of requirements.static GitURIRequirementsBuildercreate()Creates an empty builder.Creates a new builder with the same requirements as this builder.static GitURIRequirementsBuilderCreates a new builder using the supplied URI.withHostname(String hostname) Replace any hostname requirements with the supplied hostname.withHostnamePort(String hostname, int port) Replace any hostname or hostname:port requirements with the supplied hostname and port.Removes any hostname or hostname:port requirements.Removes any hostname:port requirements.Removes any path requirements.Removes any scheme requirements.Replace any path requirements with the supplied path.withScheme(String scheme) Replace any scheme requirements with the supplied scheme.Replaces the requirements with those of the supplied URI.
- 
Method Details- 
createCreates an empty builder.- Returns:
- a new empty builder.
 
- 
duplicateCreates a new builder with the same requirements as this builder.- Returns:
- a new builder with the same requirements as this builder.
 
- 
fromUriCreates a new builder using the supplied URI.- Parameters:
- uri- the URI to create the requirements of.
- Returns:
- a new builder with the requirements of the supplied URI.
 
- 
withUriReplaces the requirements with those of the supplied URI.- Parameters:
- uri- the URI.
- Returns:
- this.
 
- 
withoutSchemeRemoves any scheme requirements.- Returns:
- this.
 
- 
withoutPathRemoves any path requirements.- Returns:
- this.
 
- 
withoutHostnameRemoves any hostname or hostname:port requirements.- Returns:
- this.
 
- 
withoutHostnamePortRemoves any hostname:port requirements.- Returns:
- this.
 
- 
withSchemeReplace any scheme requirements with the supplied scheme.- Parameters:
- scheme- the scheme to use as a requirement
- Returns:
- this.
 
- 
withPathReplace any path requirements with the supplied path.- Parameters:
- path- to use as a requirement
- Returns:
- this.
 
- 
withHostnameReplace any hostname requirements with the supplied hostname.- Parameters:
- hostname- the hostname to use as a requirement
- Returns:
- this.
 
- 
withHostnamePortReplace any hostname or hostname:port requirements with the supplied hostname and port.- Parameters:
- hostname- the hostname to use as a requirement or (@code null} to not add any requirement
- port- the port or- -1to not add- HostnamePortRequirements
- Returns:
- this.
 
- 
buildBuilds the list of requirements.- Returns:
- the list of requirements.
 
 
-