protected String getIssuerId(Message m) { if (issuerId == null) { return new UriInfoImpl(m).getBaseUri().toString(); } return issuerId; }
private String getAbsoluteTargetAddress(Message m) { if (accessTokenServiceAddress == null) { return new UriInfoImpl(m).getAbsolutePath().toString(); } if (!accessTokenServiceAddress.startsWith("http")) { String httpBasePath = (String)m.get("http.base.path"); return UriBuilder.fromUri(httpBasePath) .path(accessTokenServiceAddress) .build() .toString(); } return accessTokenServiceAddress; }
@Override public URI relativize(URI uri) { URI resolved = HttpUtils.resolve(getBaseUriBuilder(), uri); return HttpUtils.relativize(getRequestUri(), resolved); }
private String getAbsolutePathAsString() { String address = getBaseUri().toString(); if (MessageUtils.isRequestor(message)) { return address; } String path = doGetPath(false, false); if (path.startsWith("/") && address.endsWith("/")) { address = address.substring(0, address.length() - 1); } if (!path.isEmpty() && !path.startsWith("/") && !address.endsWith("/")) { address = address + "/"; } return address + path; }
@Override public UriInfo getUriInfo() { return new UriInfoImpl(m); }
public String preprocess(Message m, UriInfo u) { handleExtensionMappings(m, u); handleLanguageMappings(m, u); MultivaluedMap<String, String> queries = u.getQueryParameters(); handleTypeQuery(m, queries); handleCType(m, queries); handleMethod(m, queries, new HttpHeadersImpl(m)); return new UriInfoImpl(m, null).getPath(); }
private static Object readQueryString(String queryName, Class<?> paramType, Type genericType, Annotation[] paramAnns, Message m, String defaultValue, boolean decode) { MultivaluedMap<String, String> queryMap = new UriInfoImpl(m, null).getQueryParameters(decode); if ("".equals(queryName)) { return InjectionUtils.handleBean(paramType, paramAnns, queryMap, ParameterType.QUERY, m, false); } return InjectionUtils.createParameterObject(queryMap.get(queryName), paramType, genericType, paramAnns, defaultValue, false, ParameterType.QUERY, m); }
String originalRequestURI = new UriInfoImpl(m).getRequestUri().toString();
public UriBuilder getBaseUriBuilder() { return new UriBuilderImpl(getBaseUri()); }
public UriBuilder getAbsolutePathBuilder() { return new UriBuilderImpl(getAbsolutePath()); }
public UriBuilder getRequestUriBuilder() { return new UriBuilderImpl(getRequestUri()); }
public URI getAbsolutePath() { String path = getAbsolutePathAsString(); return URI.create(path); }
public String getPath(boolean decode) { String value = doGetPath(decode, true); if (value.length() > 1 && value.startsWith("/")) { return value.substring(1); } return value; }
@Override public UriInfo getUriInfo() { return new UriInfoImpl(m); }
public String preprocess(Message m, UriInfo u) { handleExtensionMappings(m, u); handleLanguageMappings(m, u); MultivaluedMap<String, String> queries = u.getQueryParameters(); handleTypeQuery(m, queries); handleCType(m, queries); handleMethod(m, queries, new HttpHeadersImpl(m)); Response r = checkMetadataRequest(m, u); if (r != null) { m.getExchange().put(Response.class, r); } return new UriInfoImpl(m, null).getPath(); }
private static Object readQueryString(String queryName, Class<?> paramType, Type genericType, Annotation[] paramAnns, Message m, String defaultValue, boolean decode) { MultivaluedMap<String, String> queryMap = new UriInfoImpl(m, null).getQueryParameters(decode); if ("".equals(queryName)) { return InjectionUtils.handleBean(paramType, paramAnns, queryMap, ParameterType.QUERY, m, false); } else { return InjectionUtils.createParameterObject(queryMap.get(queryName), paramType, genericType, paramAnns, defaultValue, false, ParameterType.QUERY, m); } }
private String getAbsolutePathAsString() { String address = getBaseUri().toString(); if (MessageUtils.isRequestor(message)) { return address; } String path = doGetPath(false, false); if (path.startsWith("/") && address.endsWith("/")) { address = address.substring(0, address.length() - 1); } if (!path.isEmpty() && !path.startsWith("/") && !address.endsWith("/")) { address = address + "/"; } return address + path; } }
public UriBuilder getBaseUriBuilder() { return new UriBuilderImpl(getBaseUri()); }
public UriBuilder getAbsolutePathBuilder() { return new UriBuilderImpl(getAbsolutePath()); }
public UriBuilder getRequestUriBuilder() { return new UriBuilderImpl(getRequestUri()); }