下面列出了javax.ws.rs.core.UriBuilder#toString() 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private String buildLedgerUri(String path, Map<String, String> params) {
var ledgerUrl = configuration.getLedgerUrl();
UriBuilder builder = UriBuilder.fromPath(ledgerUrl).path(path);
params.entrySet().stream()
.filter(k -> k.getValue() != null)
.forEach(k -> builder.queryParam(k.getKey(), k.getValue()));
return builder.toString();
}
@Deprecated
private String buildConnectorUri(Account account, String path, Map<String, String> params) {
UriBuilder builder = UriBuilder.fromPath(connectorBaseUrlForAccount(account)).path(path);
params.entrySet().stream()
.filter(k -> k.getValue() != null)
.forEach(k -> builder.queryParam(k.getKey(), k.getValue()));
return builder.toString();
}
private String buildConnectorUri(String path, Map<String, String> params) {
UriBuilder builder = UriBuilder.fromPath(configuration.getConnectorUrl()).path(path);
params.entrySet().stream()
.filter(k -> k.getValue() != null)
.forEach(k -> builder.queryParam(k.getKey(), k.getValue()));
return builder.toString();
}
private String buildConnectorUri(String path, Map<String, String> params) {
UriBuilder builder = UriBuilder.fromPath(configuration.getConnectorDDUrl()).path(path);
params.entrySet().stream()
.filter(k -> k.getValue() != null)
.forEach(k -> builder.queryParam(k.getKey(), k.getValue()));
return builder.toString();
}
protected String buildUri(Class<?> clazz, String method, Object id) {
ThreadLocalUriInfo uriInfo = new ThreadLocalUriInfo();
UriBuilder ub = uriInfo.getAbsolutePathBuilder().path(clazz, method);
ub.build(id);
return ub.toString();
}
protected String buildUri(Class<?> clazz, String method, String id) {
ThreadLocalUriInfo uriInfo = new ThreadLocalUriInfo();
UriBuilder ub = uriInfo.getAbsolutePathBuilder().path(clazz, method);
ub.build(id);
return ub.toString();
}