Package net.shibboleth.shared.testing

# Class RepositorySupport

java.lang.Object
net.shibboleth.shared.testing.RepositorySupport

public final class RepositorySupport extends Object
Support class for working with the project version control repository.

NOTE: If this changes, change the "additional" copy in shib-spring.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`private`
`RepositorySupport()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static String`
`buildHTTPResourceURL(String repoName, String resourcePath, boolean https)`
Build an HTTP/HTTPS resource URL for the selected repository name and path on the main branch.
`static String`
`buildHTTPResourceURL(String repoName, String resourcePath, boolean https, String branch)`
Build an HTTP/HTTPS resource URL for the selected repository name and path.
`static String`
`buildHTTPSResourceURL(String repoName, String resourcePath)`
Build an HTTPS resource URL for the selected repository name and path on the main branch.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### RepositorySupport

private RepositorySupport()
Constructor.

## Method Details

### buildHTTPSResourceURL

@Nonnull public static String buildHTTPSResourceURL(@Nonnull String repoName, @Nonnull String resourcePath)
Build an HTTPS resource URL for the selected repository name and path on the main branch.

Parameters:
  `repoName` - the repository name. If Git, do not include the ".git" suffix.
  `resourcePath` - The relative resource path within the repository, e.g. "foo/bar/baz/file.txt"
Returns:
  the HTTPS resource URL

### buildHTTPResourceURL

@Nonnull public static String buildHTTPResourceURL(@Nonnull String repoName, @Nonnull String resourcePath, boolean https)
Build an HTTP/HTTPS resource URL for the selected repository name and path on the main branch.

Parameters:
  `repoName` - the repository name. If Git, do not include a trailing ".git" suffix for bare repos.
  `resourcePath` - The relative resource path within the repository, e.g. "foo/bar/baz/file.txt"
  `https` - if true, use https if possible, otherwise use http
Returns:
  the HTTP(S) resource URL

### buildHTTPResourceURL

@Nonnull public static String buildHTTPResourceURL(@Nonnull String repoName, @Nonnull String resourcePath, boolean https, @Nonnull @NotEmpty String branch)
Build an HTTP/HTTPS resource URL for the selected repository name and path.

Parameters:
  `repoName` - the repository name. If Git, do not include a trailing ".git" suffix for bare repos.
  `resourcePath` - The relative resource path within the repository, e.g. "foo/bar/baz/file.txt"
  `https` - if true, use https if possible, otherwise use http
  `branch` - code branch
Returns:
  the HTTP(S) resource URL
Since:
  8.2.0