Package com.atlassian.bamboo.plugins.git
Class UriUtils
- java.lang.Object
-
- com.atlassian.bamboo.plugins.git.UriUtils
-
public class UriUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILE_SCHEMEstatic StringFTP_SCHEMEstatic StringFTPS_SCHEMEstatic StringHTTP_SCHEMEstatic StringHTTPS_SCHEMEstatic StringSSH_PREFIX
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable StringextractUsername(String repositoryUrl)static URIgetUriViaProxy(GitRepositoryAccessData proxyAccessData, ScpAwareUri repositoryUri)static booleanhasScpSyntax(@NotNull String url)static org.eclipse.jgit.transport.URIishnormaliseRepositoryLocation(@Nullable String userName, @Nullable String password, @NotNull org.eclipse.jgit.transport.URIish normalised, boolean shouldAddFakeAuthData)This method adds/removes username and password from URL to avoid interactive password prompts from the git command line clientstatic booleanrequiresSshTransport(@NotNull ScpAwareUri repositoryUri)static booleanrequiresSshTransport(@NotNull String repositoryUrl)
-
-
-
Field Detail
-
HTTP_SCHEME
public static final String HTTP_SCHEME
- See Also:
- Constant Field Values
-
HTTPS_SCHEME
public static final String HTTPS_SCHEME
- See Also:
- Constant Field Values
-
FTP_SCHEME
public static final String FTP_SCHEME
- See Also:
- Constant Field Values
-
FTPS_SCHEME
public static final String FTPS_SCHEME
- See Also:
- Constant Field Values
-
FILE_SCHEME
public static final String FILE_SCHEME
- See Also:
- Constant Field Values
-
SSH_PREFIX
public static final String SSH_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
extractUsername
@Nullable public static @Nullable String extractUsername(String repositoryUrl) throws URISyntaxException
- Throws:
URISyntaxException
-
requiresSshTransport
public static boolean requiresSshTransport(@NotNull @NotNull ScpAwareUri repositoryUri)
-
requiresSshTransport
public static boolean requiresSshTransport(@NotNull @NotNull String repositoryUrl)
-
hasScpSyntax
public static boolean hasScpSyntax(@NotNull @NotNull String url)
-
getUriViaProxy
public static URI getUriViaProxy(GitRepositoryAccessData proxyAccessData, ScpAwareUri repositoryUri) throws URISyntaxException
- Throws:
URISyntaxException
-
normaliseRepositoryLocation
public static org.eclipse.jgit.transport.URIish normaliseRepositoryLocation(@Nullable @Nullable String userName, @Nullable @Nullable String password, @NotNull @NotNull org.eclipse.jgit.transport.URIish normalised, boolean shouldAddFakeAuthData)This method adds/removes username and password from URL to avoid interactive password prompts from the git command line client
-
-