protected boolean hasAuthStorageEnabledOption() { return getAuthStorageEnabledOption() != null; }
public String getUserName() { // if (url != null && url.getUserInfo() != null) { // return url.getUserInfo(); // } Map properties = getHostProperties(); String userName = (String) properties.get("username"); return userName; }
public String getProxyPassword() { return getProxyOption("http-proxy-password", null); }
private String getProxyOption(String optionName, String systemProperty) { String host = getHost(); Map properties = getHostProperties(); String value = (String) properties.get(optionName); if ((value == null || "".equals(value.trim())) && systemProperty != null) { value = System.getProperty(systemProperty); } if (value == null || "".equals(value.trim())) { return null; } if (hostExceptedFromProxy(host, properties)) { return null; } return value; }
public int getReadTimeout() { String protocol = getProtocol(); if ("http".equals(protocol) || "https".equals(protocol)) { Map properties = getHostProperties(); String timeout = (String) properties.get("http-timeout"); if (timeout != null) { try { return Integer.parseInt(timeout) * 1000; } catch (NumberFormatException nfe) { } } return 3600 * 1000; } return 0; }
private Map getHostProperties() { Map properties = getServersFile().getProperties("global"); String groupName = getGroupName(getServersFile().getProperties("groups")); if (groupName != null) { Map hostProps = getServersFile().getProperties(groupName); properties.putAll(hostProps); } return properties; }
public boolean hasStorePlainTextPasswordsOption() { return getStorePlainTextPasswordOption() != null; }
protected boolean hasStorePlainTextPassphrasesOption() { String storePlainTextPassphrases = getStorePlainTextPassphraseOption(); return storePlainTextPassphrases != null; }
public int getConnectTimeout() { String protocol = getProtocol(); if ("http".equals(protocol) || "https".equals(protocol)) { return 60 * 1000; } return 0; }
public ISVNHostOptions getHostOptions(SVNURL url) { return new DefaultSVNHostOptions(getServersFile(), url); } }
private String getGroupName(Map groups) { for (Iterator names = groups.keySet().iterator(); names.hasNext();) { String name = (String) names.next(); String pattern = (String) groups.get(name); for (StringTokenizer tokens = new StringTokenizer(pattern, ","); tokens.hasMoreTokens();) { String token = tokens.nextToken(); token = token.trim(); if (DefaultSVNOptions.matches(token, getHost())) { return name; } } } return null; } }
public boolean isStorePlainTextPasswords(String realm, SVNAuthentication auth) throws SVNException { String storePlainTextPasswords = getStorePlainTextPasswordOption(); if (storePlainTextPasswords == null) { return false; } return "yes".equalsIgnoreCase(storePlainTextPasswords) || "on".equalsIgnoreCase(storePlainTextPasswords) || "true".equalsIgnoreCase(storePlainTextPasswords); }
public boolean isStorePlainTextPassphrases(String realm, SVNAuthentication auth) throws SVNException { String storePlainTextPassphrases = getStorePlainTextPassphraseOption(); if (storePlainTextPassphrases == null) { return false; } return "yes".equalsIgnoreCase(storePlainTextPassphrases) || "on".equalsIgnoreCase(storePlainTextPassphrases) || "true".equalsIgnoreCase(storePlainTextPassphrases); }
private String getStorePlainTextPasswordOption() { Map properties = getHostProperties(); return (String) properties.get("store-plaintext-passwords"); }
public String getProxyUserName() { return getProxyOption("http-proxy-username", null); }
public boolean isAuthStorageEnabled() { String storeAuthCreds = getAuthStorageEnabledOption(); if (storeAuthCreds == null) { return false; } return "yes".equalsIgnoreCase(storeAuthCreds) || "on".equalsIgnoreCase(storeAuthCreds) || "true".equalsIgnoreCase(storeAuthCreds); }
private String getAuthStorageEnabledOption() { Map properties = getHostProperties(); return (String) properties.get("store-auth-creds"); }
public String getProxyHost() { return getProxyOption("http-proxy-host", "http.proxyHost"); }
private String getStorePlainTextPassphraseOption() { Map properties = getHostProperties(); return (String) properties.get("store-ssl-client-cert-pp-plaintext"); }
public String getProxyPort() { return getProxyOption("http-proxy-port", "http.proxyPort"); }