Package org.jboss.resteasy.specimpl

## Class ResteasyUriInfo

- java.lang.Object
- - org.jboss.resteasy.specimpl.ResteasyUriInfo

- All Implemented Interfaces:
    `javax.ws.rs.core.UriInfo`

      public class ResteasyUriInfo
      extends Object
      implements javax.ws.rs.core.UriInfo

  UriInfo implementation with some added extra methods to help process requests.
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `ResteasyUriInfo.InitData` | Holds the data that is needed to initialize ResteasyUriInfo The reason to extract this data into a separate class is that it's expensive to produce and can be cached under certain circumstances

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ResteasyUriInfo​(String absoluteUri, String contextPath)` |
    `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.
    `ResteasyUriInfo​(URI requestURI)` |
    `ResteasyUriInfo​(URI base, URI relative)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addEncodedPathParameter​(String name, String value)` |
    `protected void` | `extractParameters()` |
    `URI` | `getAbsolutePath()` |
    `javax.ws.rs.core.UriBuilder` | `getAbsolutePathBuilder()` |
    `URI` | `getBaseUri()` |
    `javax.ws.rs.core.UriBuilder` | `getBaseUriBuilder()` |
    `String` | `getContextPath()` | i.e.
    `List<String>` | `getEncodedMatchedPaths()` |
    `javax.ws.rs.core.MultivaluedMap<String,​javax.ws.rs.core.PathSegment[]>` | `getEncodedPathParameterPathSegments()` |
    `protected javax.ws.rs.core.MultivaluedMap<String,​String>` | `getEncodedQueryParameters()` |
    `List<Object>` | `getMatchedResources()` |
    `List<String>` | `getMatchedURIs()` |
    `List<String>` | `getMatchedURIs​(boolean decode)` |
    `String` | `getMatchingPath()` | Encoded path without matrix parameters.
    `String` | `getPath()` |
    `String` | `getPath​(boolean decode)` |
    `javax.ws.rs.core.MultivaluedMap<String,​javax.ws.rs.core.PathSegment[]>` | `getPathParameterPathSegments()` |
    `javax.ws.rs.core.MultivaluedMap<String,​String>` | `getPathParameters()` |
    `javax.ws.rs.core.MultivaluedMap<String,​String>` | `getPathParameters​(boolean decode)` |
    `List<javax.ws.rs.core.PathSegment>` | `getPathSegments()` |
    `List<javax.ws.rs.core.PathSegment>` | `getPathSegments​(boolean decode)` |
    `javax.ws.rs.core.MultivaluedMap<String,​String>` | `getQueryParameters()` |
    `javax.ws.rs.core.MultivaluedMap<String,​String>` | `getQueryParameters​(boolean decode)` |
    `URI` | `getRequestUri()` |
    `javax.ws.rs.core.UriBuilder` | `getRequestUriBuilder()` |
    `protected void` | `initialize​(CharSequence absoluteUri, String queryString, String contextPath)` |
    `protected void` | `initialize​(String absoluteUri, String contextPath, ResteasyUriInfo.InitData initData)` |
    `void` | `initializeFromRequest​(URI requestURI)` |
    `void` | `popMatchedPath()` |
    `protected void` | `processPath()` |
    `void` | `pushCurrentResource​(Object resource)` |
    `void` | `pushMatchedPath​(String encoded)` |
    `void` | `pushMatchedURI​(String encoded)` |
    `URI` | `relativize​(URI uri)` |
    `URI` | `resolve​(URI uri)` |
    `void` | `setRequestUri​(URI relative)` | Create a UriInfo from the baseURI.
    `void` | `setUri​(URI base, URI relative)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### 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 Detail

    - #### 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 `javax.ws.rs.core.UriInfo`

    - #### getPath

          public String getPath​(boolean decode)

      Specified by:
        `getPath` in interface `javax.ws.rs.core.UriInfo`

    - #### getPathSegments

          public List<javax.ws.rs.core.PathSegment> getPathSegments()

      Specified by:
        `getPathSegments` in interface `javax.ws.rs.core.UriInfo`

    - #### getPathSegments

          public List<javax.ws.rs.core.PathSegment> getPathSegments​(boolean decode)

      Specified by:
        `getPathSegments` in interface `javax.ws.rs.core.UriInfo`

    - #### getRequestUri

          public URI getRequestUri()

      Specified by:
        `getRequestUri` in interface `javax.ws.rs.core.UriInfo`

    - #### getRequestUriBuilder

          public javax.ws.rs.core.UriBuilder getRequestUriBuilder()

      Specified by:
        `getRequestUriBuilder` in interface `javax.ws.rs.core.UriInfo`

    - #### getAbsolutePath

          public URI getAbsolutePath()

      Specified by:
        `getAbsolutePath` in interface `javax.ws.rs.core.UriInfo`

    - #### getAbsolutePathBuilder

          public javax.ws.rs.core.UriBuilder getAbsolutePathBuilder()

      Specified by:
        `getAbsolutePathBuilder` in interface `javax.ws.rs.core.UriInfo`

    - #### getBaseUri

          public URI getBaseUri()

      Specified by:
        `getBaseUri` in interface `javax.ws.rs.core.UriInfo`

    - #### getBaseUriBuilder

          public javax.ws.rs.core.UriBuilder getBaseUriBuilder()

      Specified by:
        `getBaseUriBuilder` in interface `javax.ws.rs.core.UriInfo`

    - #### getPathParameters

          public javax.ws.rs.core.MultivaluedMap<String,​String> getPathParameters()

      Specified by:
        `getPathParameters` in interface `javax.ws.rs.core.UriInfo`

    - #### addEncodedPathParameter

          public void addEncodedPathParameter​(String name,
                                              String value)

    - #### getEncodedPathParameterPathSegments

          public javax.ws.rs.core.MultivaluedMap<String,​javax.ws.rs.core.PathSegment[]> getEncodedPathParameterPathSegments()

    - #### getPathParameterPathSegments

          public javax.ws.rs.core.MultivaluedMap<String,​javax.ws.rs.core.PathSegment[]> getPathParameterPathSegments()

    - #### getPathParameters

          public javax.ws.rs.core.MultivaluedMap<String,​String> getPathParameters​(boolean decode)

      Specified by:
        `getPathParameters` in interface `javax.ws.rs.core.UriInfo`

    - #### getQueryParameters

          public javax.ws.rs.core.MultivaluedMap<String,​String> getQueryParameters()

      Specified by:
        `getQueryParameters` in interface `javax.ws.rs.core.UriInfo`

    - #### getEncodedQueryParameters

          protected javax.ws.rs.core.MultivaluedMap<String,​String> getEncodedQueryParameters()

    - #### getQueryParameters

          public javax.ws.rs.core.MultivaluedMap<String,​String> getQueryParameters​(boolean decode)

      Specified by:
        `getQueryParameters` in interface `javax.ws.rs.core.UriInfo`

    - #### extractParameters

          protected void extractParameters()

    - #### getMatchedURIs

          public List<String> getMatchedURIs​(boolean decode)

      Specified by:
        `getMatchedURIs` in interface `javax.ws.rs.core.UriInfo`

    - #### getMatchedURIs

          public List<String> getMatchedURIs()

      Specified by:
        `getMatchedURIs` in interface `javax.ws.rs.core.UriInfo`

    - #### getMatchedResources

          public List<Object> getMatchedResources()

      Specified by:
        `getMatchedResources` in interface `javax.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 `javax.ws.rs.core.UriInfo`

    - #### relativize

          public URI relativize​(URI uri)

      Specified by:
        `relativize` in interface `javax.ws.rs.core.UriInfo`