@Override public void change(final Host bookmark) { urlField.setAttributedStringValue(HyperlinkAttributedStringFactory.create(new HostUrlProvider().withUsername(false).withPath(true).get(bookmark))); } });
dict.setObjectForKey(BookmarkNameProvider.toString(host), "Nickname"); dict.setObjectForKey(host.getHostname(), "Hostname"); dict.setObjectForKey(new HostUrlProvider().withUsername(true).withPath(true).get(host), "URL"); final String comment = this.getSource().getComment(host); if(StringUtils.isNotBlank(comment)) {
public OAuth2RequestInterceptor(final HttpClient client, final Host host) { this(client, Scheme.isURL(host.getProtocol().getOAuthTokenUrl()) ? host.getProtocol().getOAuthTokenUrl() : new HostUrlProvider().withUsername(false).withPath(true).get( host.getProtocol().getScheme(), host.getPort(), null, host.getHostname(), host.getProtocol().getOAuthTokenUrl()), Scheme.isURL(host.getProtocol().getOAuthAuthorizationUrl()) ? host.getProtocol().getOAuthAuthorizationUrl() : new HostUrlProvider().withUsername(false).withPath(true).get( host.getProtocol().getScheme(), host.getPort(), null, host.getHostname(), host.getProtocol().getOAuthAuthorizationUrl()), host.getProtocol().getOAuthClientId(), host.getProtocol().getOAuthClientSecret(), host.getProtocol().getOAuthScopes()); }
host).withRedirectUri(Scheme.isURL(host.getProtocol().getOAuthRedirectUrl()) ? host.getProtocol().getOAuthRedirectUrl() : new HostUrlProvider().withUsername(false).withPath(true).get( host.getProtocol().getScheme(), host.getPort(), null, host.getHostname(), host.getProtocol().getOAuthRedirectUrl()) ); client.setBasePath(new HostUrlProvider().withUsername(false).withPath(true).get(host.getProtocol().getScheme(), host.getPort(), null, host.getHostname(), host.getProtocol().getContext())); client.setHttpClient(ClientBuilder.newClient(new ClientConfig()