private static String getUserName(String userName, SVNURL url) { if (userName == null || "".equals(userName.trim())) { userName = url != null ? url.getUserInfo() : null; } if (userName == null || "".equals(userName.trim())) { userName = System.getProperty("user.name"); } return userName; }
private static String getUserName(String userName, SVNURL url) { if (userName == null || "".equals(userName.trim())) { userName = url != null ? url.getUserInfo() : null; } if (userName == null || "".equals(userName.trim())) { userName = System.getProperty("user.name"); } return userName; } }
private static String getUserName(String userName, SVNURL url) { if (userName == null || "".equals(userName.trim())) { userName = url != null ? url.getUserInfo() : null; } if (userName == null || "".equals(userName.trim())) { userName = System.getProperty("user.name"); } return userName; } }
private static String getUserName(String userName, SVNURL url) { if (userName == null || "".equals(userName.trim())) { userName = url != null ? url.getUserInfo() : null; } if (userName == null || "".equals(userName.trim())) { userName = System.getProperty("user.name"); } return userName; } }
private static String getUserName(String userName, SVNURL url) { if (userName == null || "".equals(userName.trim())) { userName = url != null ? url.getUserInfo() : null; } if (userName == null || "".equals(userName.trim())) { userName = System.getProperty("user.name"); } return userName; }
public SVNAuthentication requestClientAuthentication(String kind, SVNURL url, String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored) { String actualRealm = realm; if (url != null && url.getUserInfo() != null) { actualRealm = url.getUserInfo() + "$" + actualRealm; } return (SVNAuthentication) getRuntimeAuthStorage().getData(kind, actualRealm); }
public void saveAuthentication(SVNAuthentication auth, String realm) { if (auth == null || realm == null) { return; } final String kind = auth.getKind(); String actualRealm = realm; if (auth.getURL() != null && auth.getURL().getUserInfo() != null) { actualRealm = auth.getURL().getUserInfo() + "$" + actualRealm; } getRuntimeAuthStorage().putData(kind, actualRealm, auth); }
@Nullable @Override public RepositoryInfo getRepository(@NotNull SVNURL url) throws SVNException { final Map.Entry<String, VcsRepository> entry = getMapped(mapping, url.getPath()); if (entry != null) { return new RepositoryInfo( SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort() == SVNURL.getDefaultPortNumber(url.getProtocol()) ? -1 : url.getPort(), entry.getKey(), true), entry.getValue() ); } return null; }
@Nullable @Override public RepositoryInfo getRepository(@NotNull SVNURL url) throws SVNException { final Map.Entry<String, GitLabProject> entry = RepositoryListMapping.getMapped(mapping, url.getPath()); if (entry != null && entry.getValue().isReady()) { return new RepositoryInfo( SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort() == SVNURL.getDefaultPortNumber(url.getProtocol()) ? -1 : url.getPort(), entry.getKey(), true), entry.getValue().getRepository() ); } return null; }
@Nullable @Override public RepositoryInfo getRepository(@NotNull SVNURL url) throws SVNException { final Map.Entry<String, GiteaProject> entry = RepositoryListMapping.getMapped(mapping, url.getPath()); if (entry != null && entry.getValue().isReady()) { return new RepositoryInfo( SVNURL.create(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort() == SVNURL.getDefaultPortNumber(url.getProtocol()) ? -1 : url.getPort(), entry.getKey(), true), entry.getValue().getRepository() ); } return null; }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }
/** * Returns a string representing a UTF-8 encoded url. * * @return an encoded url string */ public String toString() { if (myURL == null) { myURL = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getURIEncodedPath()); } return myURL; }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }
/** * Constructs a new <b>SVNURL</b> representation removing a tail path * segment from the path component of this representation. * * @return a new <b>SVNURL</b> representation */ public SVNURL removePathTail() throws SVNException { String newPath = SVNPathUtil.removeTail(myPath); String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), newPath); return parseURIDecoded(url); } /**
/** * Constructs a new <b>SVNURL</b> representation removing a tail path * segment from the path component of this representation. * * @return a new <b>SVNURL</b> representation * @throws SVNException */ public SVNURL removePathTail() throws SVNException { final String newPath = SVNPathUtil.removeTail(myEncodedPath); final String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), newPath); return parseURIEncoded(url); } /**