public static StringBuilder append(StringBuilder sb, UriInfo uriInfo, HttpHeaders httpHeaders) { sb.append("\n UriInfo:"); sb.append("\n Absolute path : ").append(uriInfo.getAbsolutePath()); sb.append("\n Base URI : ").append(uriInfo.getBaseUri()); sb.append("\n Mathced resources : ").append(uriInfo.getMatchedResources().toString()); sb.append("\n Matched URIs : ").append(uriInfo.getMatchedURIs().toString()); sb.append("\n Path : ").append(uriInfo.getPath()); sb.append("\n Path parameters:\n"); dumpMultivaluedMap(sb, uriInfo.getPathParameters()); sb.append(" Path segments : ").append(uriInfo.getPathSegments().toString()); sb.append("\n Query parameters:\n"); dumpMultivaluedMap(sb, uriInfo.getQueryParameters()); sb.append(" Request URI : ").append(uriInfo.getRequestUri()); sb.append("\n\n HttpHeaders:\n"); dumpMultivaluedMap(sb, httpHeaders.getRequestHeaders()); return sb; }
@Override public List<String> getMatchedURIs(boolean decode) { return delegate.getMatchedURIs(decode); }
@Override public List<String> getMatchedURIs() { return delegate.getMatchedURIs(); }
@Override @NotNull public List<String> getMatchedURIs() { return this.info.getMatchedURIs(); }
@Override @NotNull public List<String> getMatchedURIs(final boolean decode) { return this.info.getMatchedURIs(decode); }
/** * @param uriInfo * @return * @throws IllegalArgumentException * @throws UriBuilderException */ private static URI createEmployeesUri(final UriInfo uriInfo) { final UriBuilder employeesUri = uriInfo.getBaseUriBuilder(); employeesUri.path(uriInfo.getMatchedURIs().get(0)); final URI build = employeesUri.build(); return build; }
public List<String> getMatchedURIs() { return get().getMatchedURIs(); }
@Path("{name}") public Object getNamedResource(@Context UriInfo uriInfo) { boolean lastElement = uriInfo.getMatchedURIs() .iterator().next().equals(uriInfo.getPath()); if (lastElement && "data".equals(name)) { return getDataResource(uriInfo); } ... }
public List<String> getMatchedURIs(boolean decode) { return get().getMatchedURIs(decode); }
public List<String> getMatchedURIs() { return get().getMatchedURIs(); }
public static void addLinkHeader(Response.ResponseBuilder response, UriInfo info, String title, String name, String ... pathComponents) { String basePath = info.getMatchedURIs().get(0); UriBuilder builder = info.getBaseUriBuilder(); builder.path(basePath); for (String component : pathComponents) builder.path(component); String uri = builder.build().toString(); setLinkHeader(response, title, name, uri, null); }
public static void addLinkHeader(Response.ResponseBuilder response, UriInfo info, String title, String name, String ... pathComponents) { String basePath = info.getMatchedURIs().get(0); UriBuilder builder = info.getBaseUriBuilder(); builder.path(basePath); for (String component : pathComponents) builder.path(component); String uri = builder.build().toString(); setLinkHeader(response, title, name, uri, TxMediaType.PLAIN_MEDIA_TYPE); }
private Response internalHeadAutoAckSubscription(UriInfo uriInfo, String consumerId) { QueueConsumer consumer = findAutoAckSubscription(consumerId); Response.ResponseBuilder builder = Response.noContent(); String pathToPullSubscriptions = uriInfo.getMatchedURIs().get(1); headAutoAckSubscriptionResponse(uriInfo, consumer, builder, pathToPullSubscriptions); return builder.build(); }
private Response internalHeadAutoAckSubscription(UriInfo uriInfo, String consumerId) { QueueConsumer consumer = findAutoAckSubscription(consumerId); Response.ResponseBuilder builder = Response.noContent(); String pathToPullSubscriptions = uriInfo.getMatchedURIs().get(1); headAutoAckSubscriptionResponse(uriInfo, consumer, builder, pathToPullSubscriptions); return builder.build(); }
private Response internalHeadAutoAckSubscription(UriInfo uriInfo, String consumerId) { QueueConsumer consumer = findAutoAckSubscription(consumerId); Response.ResponseBuilder builder = Response.noContent(); String pathToPullSubscriptions = uriInfo.getMatchedURIs().get(1); headAutoAckSubscriptionResponse(uriInfo, consumer, builder, pathToPullSubscriptions); return builder.build(); }
@GET @Path("matched/uris") public Object getMatchedUris() { return concat(uriInfo.getMatchedURIs()); } @GET
@GET @Path("matched/uris/param/{param2}") public Object getMatchedUrisParam2() { return concat(uriInfo.getMatchedURIs()); } @GET
@GET @Path("matched/uris/param") public Object getMatchedUrisParam(@PathParam("param") String param) { return concat(uriInfo.getMatchedURIs()); } @GET
@GET @Path("/matched%21uris") @Produces("text/plain") public String getMatchedUris(@Context UriInfo ui, @QueryParam("decode") String decode) { return ui.getMatchedURIs(Boolean.parseBoolean(decode)).toString(); } }
@GET @Path("/matched%21uris") @Produces("text/plain") public String getMatchedUris(@Context UriInfo ui, @QueryParam("decode") String decode) { return ui.getMatchedURIs(Boolean.parseBoolean(decode)).toString(); } }