Package javax.ws.rs.core

Examples of javax.ws.rs.core.UriBuilder.buildFromEncoded()


    return responseOkFudge(encodeBundle(getUnderlying().getConventionBundle(id)));
  }

  public static URI uriGetByIdentifier(final URI baseUri, final ExternalId id) {
    final UriBuilder bld = UriBuilder.fromUri(baseUri).path("identifier/{id}");
    return bld.buildFromEncoded(id.toString().replace("/", "%2F"));
  }

  @GET
  @Path("bundle")
  public Response getByBundle(@QueryParam("id") final List<String> idStrs) {
View Full Code Here


    return responseOkFudge(encodeBundle(getUnderlying().getConventionBundle(id)));
  }

  public static URI uriGetByUniqueId(final URI baseUri, final UniqueId id) {
    final UriBuilder bld = UriBuilder.fromUri(baseUri).path("unique/{id}");
    return bld.buildFromEncoded(id.toString().replace("/", "%2F"));
  }

}
View Full Code Here

        addNonEmptyPath(builder, ori.getURITemplate().getValue());
       
        handleMatrixes(m, params, types, beanParamsList, builder);
        handleQueries(m, params, types, beanParamsList, builder);
       
        URI uri = builder.buildFromEncoded(pathParams.toArray()).normalize();
       
        MultivaluedMap<String, String> headers = getHeaders();
        MultivaluedMap<String, String> paramHeaders = new MetadataMap<String, String>();
        handleHeaders(m, params, paramHeaders, beanParamsList, types);
        handleCookies(m, params, paramHeaders, beanParamsList, types);
View Full Code Here

        addNonEmptyPath(builder, ori.getURITemplate().getValue());
       
        handleMatrixes(types, params, builder);
        handleQueries(types, params, builder);
       
        URI uri = builder.buildFromEncoded(pathParams.toArray()).normalize();
       
        MultivaluedMap<String, String> headers = getHeaders();
        MultivaluedMap<String, String> paramHeaders = new MetadataMap<String, String>();
        handleHeaders(paramHeaders, types, params);
        handleCookies(paramHeaders, types, params);
View Full Code Here

        addNonEmptyPath(builder, ori.getURITemplate().getValue());
       
        handleMatrixes(types, params, builder);
        handleQueries(types, params, builder);
       
        URI uri = builder.buildFromEncoded(pathParams.toArray()).normalize();
       
        MultivaluedMap<String, String> headers = getHeaders();
        MultivaluedMap<String, String> paramHeaders = new MetadataMap<String, String>();
        handleHeaders(paramHeaders, types, params);
        handleCookies(paramHeaders, types, params);
View Full Code Here

        URI uri = builder.build("path", "Ex", "a#b", "c%2Bd", "frag");
        String uriString = uri.toString();
        assertEquals("//localhost:8080/some/path/pathEx/a%23b/a+bc%252Bd#frag", uriString);

        // buildFromEncoded
        uri = builder.buildFromEncoded("path", "Ex", "a%2Bb", "c%2Bd", "frag");
        uriString = uri.toString();
        assertEquals("//localhost:8080/some/path/pathEx/a%2Bb/a+bc%2Bd#frag", uriString);

        Map<String, String> map = new HashMap<String, String>();
        map.put("v1", "path");
View Full Code Here

        addNonEmptyPath(builder, ori.getURITemplate().getValue());
       
        handleMatrixes(types, params, builder);
        handleQueries(types, params, builder);
       
        URI uri = builder.buildFromEncoded(pathParams.toArray()).normalize();
       
        MultivaluedMap<String, String> headers = getHeaders();
        MultivaluedMap<String, String> paramHeaders = new MetadataMap<String, String>();
        handleHeaders(paramHeaders, types, params);
        handleCookies(paramHeaders, types, params);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.