/** {@inheritDoc} */ @Override public int hashCode() { int hc = 0; if (getScheme() != null) hc = hc * 31 + getScheme().hashCode(); if (getUser() != null) hc = hc * 31 + getUser().hashCode(); if (getPass() != null) hc = hc * 31 + getPass().hashCode(); if (getHost() != null) hc = hc * 31 + getHost().hashCode(); if (getPort() > 0) hc = hc * 31 + getPort(); if (getPath() != null) hc = hc * 31 + getPath().hashCode(); return hc; }
private Properties loadProperties() throws NotSupportedException { if (local.getDirectory() != null) { File propsFile = new File(local.getDirectory(), uri.getUser()); if (propsFile.isFile()) return loadPropertiesFile(propsFile); } File propsFile = new File(local.getFS().userHome(), uri.getUser()); if (propsFile.isFile()) return loadPropertiesFile(propsFile); Properties props = new Properties(); String user = uri.getUser(); String pass = uri.getPass(); if (user != null && pass != null) { props.setProperty("accesskey", user); //$NON-NLS-1$ props.setProperty("secretkey", pass); //$NON-NLS-1$ } else throw new NotSupportedException(MessageFormat.format( JGitText.get().cannotReadFile, propsFile)); return props; }
@Override public boolean canHandle(URIish uri, Repository local, String remoteName) { if (uri.getPath() == null || uri.getPort() > 0 || uri.getUser() != null || uri.getPass() != null || uri.getHost() != null || (uri.getScheme() != null && !getSchemes().contains(uri.getScheme()))) return false; return true; }
@Override public boolean canHandle(URIish uri, Repository local, String remoteName) { if (uri.getPath() == null || uri.getPort() > 0 || uri.getUser() != null || uri.getPass() != null || uri.getHost() != null || (uri.getScheme() != null && !getSchemes().contains(uri.getScheme()))) return false; return true; }
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (!(obj instanceof URIish)) return false; final URIish b = (URIish) obj; if (!eq(getScheme(), b.getScheme())) return false; if (!eq(getUser(), b.getUser())) return false; if (!eq(getPass(), b.getPass())) return false; if (!eq(getHost(), b.getHost())) return false; if (getPort() != b.getPort()) return false; if (!eq(getPath(), b.getPath())) return false; return true; }
} else { username = uri.getUser(); password = uri.getPass();
final String pass = uri.getPass(); String host = uri.getHost(); int port = uri.getPort();
public int hashCode() { int hc = 0; if (getScheme() != null) hc = hc * 31 + getScheme().hashCode(); if (getUser() != null) hc = hc * 31 + getUser().hashCode(); if (getPass() != null) hc = hc * 31 + getPass().hashCode(); if (getHost() != null) hc = hc * 31 + getHost().hashCode(); if (getPort() > 0) hc = hc * 31 + getPort(); if (getPath() != null) hc = hc * 31 + getPath().hashCode(); return hc; }
/** {@inheritDoc} */ @Override public int hashCode() { int hc = 0; if (getScheme() != null) hc = hc * 31 + getScheme().hashCode(); if (getUser() != null) hc = hc * 31 + getUser().hashCode(); if (getPass() != null) hc = hc * 31 + getPass().hashCode(); if (getHost() != null) hc = hc * 31 + getHost().hashCode(); if (getPort() > 0) hc = hc * 31 + getPort(); if (getPath() != null) hc = hc * 31 + getPath().hashCode(); return hc; }
private Properties loadProperties() throws NotSupportedException { if (local.getDirectory() != null) { File propsFile = new File(local.getDirectory(), uri.getUser()); if (propsFile.isFile()) return loadPropertiesFile(propsFile); } File propsFile = new File(local.getFS().userHome(), uri.getUser()); if (propsFile.isFile()) return loadPropertiesFile(propsFile); Properties props = new Properties(); String user = uri.getUser(); String pass = uri.getPass(); if (user != null && pass != null) { props.setProperty("accesskey", user); //$NON-NLS-1$ props.setProperty("secretkey", pass); //$NON-NLS-1$ } else throw new NotSupportedException(MessageFormat.format( JGitText.get().cannotReadFile, propsFile)); return props; }
private Properties loadProperties() throws NotSupportedException { if (local.getDirectory() != null) { File propsFile = new File(local.getDirectory(), uri.getUser()); if (propsFile.isFile()) return loadPropertiesFile(propsFile); } File propsFile = new File(local.getFS().userHome(), uri.getUser()); if (propsFile.isFile()) return loadPropertiesFile(propsFile); Properties props = new Properties(); String user = uri.getUser(); String pass = uri.getPass(); if (user != null && pass != null) { props.setProperty("accesskey", user); //$NON-NLS-1$ props.setProperty("secretkey", pass); //$NON-NLS-1$ } else throw new NotSupportedException(MessageFormat.format( JGitText.get().cannotReadFile, propsFile)); return props; }
@Override public boolean handles(URIish uri) { if (getDefaultScheme().equals(uri.getScheme())) return true; if (uri.getHost() != null || uri.getPort() > 0 || uri.getUser() != null || uri.getPass() != null || uri.getPath() == null) return false; if (uri.getScheme() == null) return FS.DETECTED .resolve(new File("."), uri.getPath()).isDirectory(); //$NON-NLS-1$ return false; } };
@Override public boolean canHandle(URIish uri, Repository local, String remoteName) { if (uri.getPath() == null || uri.getPort() > 0 || uri.getUser() != null || uri.getPass() != null || uri.getHost() != null || (uri.getScheme() != null && !getSchemes().contains(uri.getScheme()))) return false; return true; }
@Override public boolean canHandle(URIish uri, Repository local, String remoteName) { if (uri.getPath() == null || uri.getPort() > 0 || uri.getUser() != null || uri.getPass() != null || uri.getHost() != null || (uri.getScheme() != null && !getSchemes().contains(uri.getScheme()))) return false; return true; }
@Override public boolean canHandle(URIish uri, Repository local, String remoteName) { if (uri.getPath() == null || uri.getPort() > 0 || uri.getUser() != null || uri.getPass() != null || uri.getHost() != null || (uri.getScheme() != null && !getSchemes().contains(uri.getScheme()))) return false; return true; }
@Override public boolean canHandle(URIish uri, Repository local, String remoteName) { if (uri.getPath() == null || uri.getPort() > 0 || uri.getUser() != null || uri.getPass() != null || uri.getHost() != null || (uri.getScheme() != null && !getSchemes().contains(uri.getScheme()))) return false; return true; }
/** * Method description * * * @param uri * @param local * @param remoteName * * @return */ @Override public boolean canHandle(URIish uri, Repository local, String remoteName) { if ((uri.getPath() == null) || (uri.getPort() > 0) || (uri.getUser() != null) || (uri.getPass() != null) || (uri.getHost() != null) || ((uri.getScheme() != null) &&!getSchemes().contains(uri.getScheme()))) { return false; } return true; }
public boolean equals(final Object obj) { if (!(obj instanceof URIish)) return false; final URIish b = (URIish) obj; if (!eq(getScheme(), b.getScheme())) return false; if (!eq(getUser(), b.getUser())) return false; if (!eq(getPass(), b.getPass())) return false; if (!eq(getHost(), b.getHost())) return false; if (getPort() != b.getPort()) return false; if (!eq(getPath(), b.getPath())) return false; return true; }