public DefaultSVNSSLTrustManager(File authDir, SVNURL url, File[] serverCertFiles, boolean useKeyStore, DefaultSVNAuthenticationManager authManager) { myURL = url; myAuthDirectory = authDir; myRealm = "https://" + url.getHost() + ":" + url.getPort(); myAuthManager = authManager; myIsUseKeyStore = useKeyStore; myServerCertFiles = serverCertFiles; }
public DefaultSVNSSLTrustManager(File authDir, SVNURL url, File[] serverCertFiles, boolean useKeyStore, DefaultSVNAuthenticationManager authManager) { myURL = url; myAuthDirectory = authDir; myRealm = "https://" + url.getHost() + ":" + url.getPort(); myAuthManager = authManager; myIsUseKeyStore = useKeyStore; myServerCertFiles = serverCertFiles; }
private static String getFullRealmName(SVNURL location, String realm) { if (location == null || realm == null) { return realm; } return "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + "> " + realm; }
private static String getFullRealmName(SVNURL location, String realm) { if (location == null || realm == null) { return realm; } return "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + "> " + realm; }
/** {@inheritDoc} */ @Override public URI getURI() throws IOException { try { return new URI(getProtocol(), null, remoteRepository.getHost(), remoteRepository.getPort(), getFullPath(), null, null); } catch (final URISyntaxException e) { throw new IOException(e); } }
private static String getFullRealmName(SVNURL location, String realm) { if (location == null || realm == null) { return realm; } return "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + "> " + realm; }
@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, 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; }
@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; }
public void open(SVNRepositoryImpl repository) throws SVNException { if (mySocket != null) { return; } SVNURL location = repository.getLocation(); try { mySocket = SVNSocketFactory.createPlainSocket(location.getHost(), location.getPort()); } catch (IOException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_IO_ERROR, e.getLocalizedMessage()); SVNErrorManager.error(err, e); } }
/** * 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; }
private HTTPSSLKeyManager createKeyManager() { if (!myIsSecured) { return null; } SVNURL location = myRepository.getLocation(); ISVNAuthenticationManager authManager = myRepository.getAuthenticationManager(); String sslRealm = "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + ">"; return new HTTPSSLKeyManager(authManager, sslRealm, location); }
/** * Returns a string representing a decoded url. * * @return a decoded url string */ public String toDecodedString() { return composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), getPath()); }
private HTTPSSLKeyManager createKeyManager() { if (!myIsSecured) { return null; } SVNURL location = myRepository.getLocation(); ISVNAuthenticationManager authManager = myRepository.getAuthenticationManager(); String sslRealm = "<" + location.getProtocol() + "://" + location.getHost() + ":" + location.getPort() + ">"; return new HTTPSSLKeyManager(authManager, sslRealm, location); }
/** * 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 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; }
@Override public URI getUri() { SVNURL svnurl; svnurl = getSvnurl(); try { svnurl = SVNURL.create(svnurl.getProtocol(), null, svnurl.getHost(), svnurl.hasPort() ? svnurl.getPort() : -1, svnurl.getPath(), false); } catch (SVNException e) { throw new IllegalStateException(e.getMessage(), e); } return URI.create(root.getFilesystem().getScheme() + ":" + svnurl.toString()); }
/** * 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); } /**