org.cruxframework.crux.core.server.rest.spi
Class UriInfo

java.lang.Object
  extended by org.cruxframework.crux.core.server.rest.spi.UriInfo

public class UriInfo
extends Object

UriInfo implementation with some added extra methods to help process requests

Version:
$Revision: 1 $
Author:
Bill Burke

Constructor Summary
UriInfo(URI base, URI relative)
           
 
Method Summary
 void addEncodedPathParameter(String name, String value)
           
protected  void extractMatchingPath(List<PathSegment> encodedPathSegments)
          matching path without matrix parameters
protected  void extractParameters(String queryString)
           
 URI getAbsolutePath()
           
 UriBuilder getAbsolutePathBuilder()
           
 URI getBaseUri()
           
 UriBuilder getBaseUriBuilder()
           
 MultivaluedMap<String,PathSegment[]> getEncodedPathParameterPathSegments()
           
protected  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)
           
 MultivaluedMap<String,PathSegment[]> getPathParameterPathSegments()
           
 MultivaluedMap<String,String> getPathParameters()
           
 MultivaluedMap<String,String> getPathParameters(boolean decode)
           
 List<PathSegment> getPathSegments()
           
 List<PathSegment> getPathSegments(boolean decode)
           
 MultivaluedMap<String,String> getQueryParameters()
           
 MultivaluedMap<String,String> getQueryParameters(boolean decode)
           
 URI getRequestUri()
           
 UriBuilder getRequestUriBuilder()
           
 void popMatchedURI()
           
 void pushMatchedURI(String encoded, String decoded)
           
 UriInfo relative(URI relative)
          Create a UriInfo from the baseURI
 URI relativize(URI uri)
           
 URI relativize(URI from, URI uri)
           
 URI resolve(URI uri)
           
 URI resolve(URI baseUri, URI uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UriInfo

public UriInfo(URI base,
               URI relative)
Method Detail

extractMatchingPath

protected void extractMatchingPath(List<PathSegment> encodedPathSegments)
matching path without matrix parameters

Parameters:
encodedPathSegments -

getMatchingPath

public String getMatchingPath()
Encoded path without matrix parameters

Returns:

relative

public UriInfo relative(URI relative)
Create a UriInfo from the baseURI

Parameters:
relative -
Returns:

getPath

public String getPath()

getPath

public String getPath(boolean decode)

getPathSegments

public List<PathSegment> getPathSegments()

getPathSegments

public List<PathSegment> getPathSegments(boolean decode)

getRequestUri

public URI getRequestUri()

getRequestUriBuilder

public UriBuilder getRequestUriBuilder()

getAbsolutePath

public URI getAbsolutePath()

getAbsolutePathBuilder

public UriBuilder getAbsolutePathBuilder()

getBaseUri

public URI getBaseUri()

getBaseUriBuilder

public UriBuilder getBaseUriBuilder()

getPathParameters

public MultivaluedMap<String,String> getPathParameters()

addEncodedPathParameter

public void addEncodedPathParameter(String name,
                                    String value)

getEncodedPathParameterPathSegments

public MultivaluedMap<String,PathSegment[]> getEncodedPathParameterPathSegments()

getPathParameterPathSegments

public MultivaluedMap<String,PathSegment[]> getPathParameterPathSegments()

getPathParameters

public MultivaluedMap<String,String> getPathParameters(boolean decode)

getQueryParameters

public MultivaluedMap<String,String> getQueryParameters()

getEncodedQueryParameters

protected MultivaluedMap<String,String> getEncodedQueryParameters()

getQueryParameters

public MultivaluedMap<String,String> getQueryParameters(boolean decode)

extractParameters

protected void extractParameters(String queryString)

getMatchedURIs

public List<String> getMatchedURIs(boolean decode)

getMatchedURIs

public List<String> getMatchedURIs()

getMatchedResources

public List<Object> getMatchedResources()

pushMatchedURI

public void pushMatchedURI(String encoded,
                           String decoded)

popMatchedURI

public void popMatchedURI()

resolve

public URI resolve(URI uri)

resolve

public URI resolve(URI baseUri,
                   URI uri)

relativize

public URI relativize(URI uri)

relativize

public URI relativize(URI from,
                      URI uri)


Copyright © 2014. All rights reserved.