Class ResteasyUriInfo

java.lang.Object
org.jboss.resteasy.specimpl.ResteasyUriInfo
All Implemented Interfaces:
jakarta.ws.rs.core.UriInfo

public class ResteasyUriInfo extends Object implements jakarta.ws.rs.core.UriInfo
UriInfo implementation with some added extra methods to help process requests.
Version:
$Revision: 1 $
Author:
Bill Burke
  • Constructor Details

    • ResteasyUriInfo

      public ResteasyUriInfo(String absoluteUri, String contextPath)
    • ResteasyUriInfo

      public ResteasyUriInfo(String absoluteUri, String contextPath, ResteasyUriInfo.InitData initData)
      Meant to be called by a layer that know that the absoluteUri will result in the successful invocation of a JAX-RS endpoint. The caller is also expected to ensure that InitData is cacheable
    • ResteasyUriInfo

      public ResteasyUriInfo(URI base, URI relative)
    • ResteasyUriInfo

      public ResteasyUriInfo(URI requestURI)
  • Method Details

    • initialize

      protected void initialize(String absoluteUri, String contextPath, ResteasyUriInfo.InitData initData)
    • initialize

      protected void initialize(CharSequence absoluteUri, String queryString, String contextPath)
    • setUri

      public void setUri(URI base, URI relative)
    • processPath

      protected void processPath()
    • initializeFromRequest

      public void initializeFromRequest(URI requestURI)
    • getContextPath

      public String getContextPath()
      i.e. servlet context path. May not be set.
      Returns:
    • getMatchingPath

      public String getMatchingPath()
      Encoded path without matrix parameters.
      Returns:
      matching path
    • setRequestUri

      public void setRequestUri(URI relative)
      Create a UriInfo from the baseURI.
      Parameters:
      relative - relative uri
    • getPath

      public String getPath()
      Specified by:
      getPath in interface jakarta.ws.rs.core.UriInfo
    • getPath

      public String getPath(boolean decode)
      Specified by:
      getPath in interface jakarta.ws.rs.core.UriInfo
    • getPathSegments

      public List<jakarta.ws.rs.core.PathSegment> getPathSegments()
      Specified by:
      getPathSegments in interface jakarta.ws.rs.core.UriInfo
    • getPathSegments

      public List<jakarta.ws.rs.core.PathSegment> getPathSegments(boolean decode)
      Specified by:
      getPathSegments in interface jakarta.ws.rs.core.UriInfo
    • getRequestUri

      public URI getRequestUri()
      Specified by:
      getRequestUri in interface jakarta.ws.rs.core.UriInfo
    • getRequestUriBuilder

      public jakarta.ws.rs.core.UriBuilder getRequestUriBuilder()
      Specified by:
      getRequestUriBuilder in interface jakarta.ws.rs.core.UriInfo
    • getAbsolutePath

      public URI getAbsolutePath()
      Specified by:
      getAbsolutePath in interface jakarta.ws.rs.core.UriInfo
    • getAbsolutePathBuilder

      public jakarta.ws.rs.core.UriBuilder getAbsolutePathBuilder()
      Specified by:
      getAbsolutePathBuilder in interface jakarta.ws.rs.core.UriInfo
    • getBaseUri

      public URI getBaseUri()
      Specified by:
      getBaseUri in interface jakarta.ws.rs.core.UriInfo
    • getBaseUriBuilder

      public jakarta.ws.rs.core.UriBuilder getBaseUriBuilder()
      Specified by:
      getBaseUriBuilder in interface jakarta.ws.rs.core.UriInfo
    • getPathParameters

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getPathParameters()
      Specified by:
      getPathParameters in interface jakarta.ws.rs.core.UriInfo
    • addEncodedPathParameter

      public void addEncodedPathParameter(String name, String value)
    • getEncodedPathParameterPathSegments

      public jakarta.ws.rs.core.MultivaluedMap<String,jakarta.ws.rs.core.PathSegment[]> getEncodedPathParameterPathSegments()
    • getPathParameterPathSegments

      public jakarta.ws.rs.core.MultivaluedMap<String,jakarta.ws.rs.core.PathSegment[]> getPathParameterPathSegments()
    • getPathParameters

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getPathParameters(boolean decode)
      Specified by:
      getPathParameters in interface jakarta.ws.rs.core.UriInfo
    • getQueryParameters

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getQueryParameters()
      Specified by:
      getQueryParameters in interface jakarta.ws.rs.core.UriInfo
    • getEncodedQueryParameters

      protected jakarta.ws.rs.core.MultivaluedMap<String,String> getEncodedQueryParameters()
    • getQueryParameters

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getQueryParameters(boolean decode)
      Specified by:
      getQueryParameters in interface jakarta.ws.rs.core.UriInfo
    • extractParameters

      protected void extractParameters()
    • getMatchedURIs

      public List<String> getMatchedURIs(boolean decode)
      Specified by:
      getMatchedURIs in interface jakarta.ws.rs.core.UriInfo
    • getMatchedURIs

      public List<String> getMatchedURIs()
      Specified by:
      getMatchedURIs in interface jakarta.ws.rs.core.UriInfo
    • getMatchedResources

      public List<Object> getMatchedResources()
      Specified by:
      getMatchedResources in interface jakarta.ws.rs.core.UriInfo
    • pushCurrentResource

      public void pushCurrentResource(Object resource)
    • pushMatchedPath

      public void pushMatchedPath(String encoded)
    • getEncodedMatchedPaths

      public List<String> getEncodedMatchedPaths()
    • popMatchedPath

      public void popMatchedPath()
    • pushMatchedURI

      public void pushMatchedURI(String encoded)
    • resolve

      public URI resolve(URI uri)
      Specified by:
      resolve in interface jakarta.ws.rs.core.UriInfo
    • relativize

      public URI relativize(URI uri)
      Specified by:
      relativize in interface jakarta.ws.rs.core.UriInfo
    • addMatchedResourceTemplate

      public void addMatchedResourceTemplate(String matchedResourceTemplate)
      Adds a matched resource template to the collection of matched resources. This is used to generate the result for getMatchedResourceTemplate().

      NOTE: When the getMatchedResourceTemplate() is invoked, adding new matched templates as no affect.

      Parameters:
      matchedResourceTemplate - the expression template to add for the resource
    • getMatchedResourceTemplate

      public String getMatchedResourceTemplate()
      Specified by:
      getMatchedResourceTemplate in interface jakarta.ws.rs.core.UriInfo