com.atlassian.bamboo.plugins.git
Class UriUtils

java.lang.Object
  extended by com.atlassian.bamboo.plugins.git.UriUtils

public class UriUtils
extends Object


Field Summary
static String FILE_SCHEME
           
static String FTP_SCHEME
           
static String FTPS_SCHEME
           
static String HTTP_SCHEME
           
static String HTTPS_SCHEME
           
static String SSH_PREFIX
           
 
Method Summary
static String extractUsername(String repositoryUrl)
           
static URI getUriViaProxy(GitRepositoryAccessData proxyAccessData, ScpAwareUri repositoryUri)
           
static boolean hasScpSyntax(String url)
           
static org.eclipse.jgit.transport.URIish normaliseRepositoryLocation(String userName, String password, 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
static boolean requiresSshTransport(ScpAwareUri repositoryUri)
           
static boolean requiresSshTransport(String repositoryUrl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 String extractUsername(String repositoryUrl)
                              throws URISyntaxException
Throws:
URISyntaxException

requiresSshTransport

public static boolean requiresSshTransport(@NotNull
                                           ScpAwareUri repositoryUri)

requiresSshTransport

public static boolean requiresSshTransport(@NotNull
                                           String repositoryUrl)

hasScpSyntax

public static boolean hasScpSyntax(@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
                                                                            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 client



Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.