Java Code Examples for javax.ws.rs.core.UriBuilder#toString()

The following examples show how to use javax.ws.rs.core.UriBuilder#toString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LedgerUriGenerator.java    From pay-publicapi with MIT License 5 votes vote down vote up
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();
}
 
Example 2
Source File: ConnectorUriGenerator.java    From pay-publicapi with MIT License 5 votes vote down vote up
@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();
}
 
Example 3
Source File: ConnectorUriGenerator.java    From pay-publicapi with MIT License 5 votes vote down vote up
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();
}
 
Example 4
Source File: DirectDebitConnectorUriGenerator.java    From pay-publicapi with MIT License 5 votes vote down vote up
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();
}
 
Example 5
Source File: UrisSerializer.java    From cloudstack with Apache License 2.0 4 votes vote down vote up
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();
}
 
Example 6
Source File: UriSerializer.java    From cloudstack with Apache License 2.0 4 votes vote down vote up
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();
}