org.restlet.ext.jaxrs
Interface ExtendedUriInfo

All Superinterfaces:
javax.ws.rs.core.UriInfo

public interface ExtendedUriInfo
extends javax.ws.rs.core.UriInfo

This UriInfo extension returns UriBuilders which contains the "file" extension given by the request. This extension will also be available, if the path will be changed (e.g. replaced, removed or matrix parameters added). For further information see ExtendedUriBuilder.extension(String), ExtendedUriBuilder.extensionLanguage(String) and ExtendedUriBuilder.extensionMedia(String). You could get it in the same way as the default UriInfo, that measn annotate a field of this type with @Context.

Author:
Stephan Koops
See Also:
UriInfo

Method Summary
 ExtendedUriBuilder getAbsolutePathBuilder()
          Get the absolute path of the request in the form of an ExtendedUriBuilder.
 ExtendedUriBuilder getBaseUriBuilder()
          Get the base URI of the application in the form of an ExtendedUriBuilder.
 ExtendedUriBuilder getRequestUriBuilder()
          Get the absolute request URI in the form of an ExtendedUriBuilder .
 
Methods inherited from interface javax.ws.rs.core.UriInfo
getAbsolutePath, getBaseUri, getMatchedResources, getMatchedURIs, getMatchedURIs, getPath, getPath, getPathParameters, getPathParameters, getPathSegments, getPathSegments, getQueryParameters, getQueryParameters, getRequestUri
 

Method Detail

getAbsolutePathBuilder

ExtendedUriBuilder getAbsolutePathBuilder()
Get the absolute path of the request in the form of an ExtendedUriBuilder. This includes everything preceding the path (host, port etc) but excludes query parameters. It also includes the extension of the current request.

Specified by:
getAbsolutePathBuilder in interface javax.ws.rs.core.UriInfo
Returns:
an ExtendedUriBuilder initialized with the absolute path of the request and an extension according to the current chosen media type.
Throws:
IllegalStateException - if called outside the scope of a request
See Also:
UriInfo.getAbsolutePathBuilder()

getBaseUriBuilder

ExtendedUriBuilder getBaseUriBuilder()
Get the base URI of the application in the form of an ExtendedUriBuilder. It also includes the extension of the current request.

Specified by:
getBaseUriBuilder in interface javax.ws.rs.core.UriInfo
Returns:
a UriBuilder initialized with the base URI of the application and an extension according to the current chosen media type.
See Also:
UriInfo.getBaseUriBuilder()

getRequestUriBuilder

ExtendedUriBuilder getRequestUriBuilder()
Get the absolute request URI in the form of an ExtendedUriBuilder . It also includes the extension of the current request.

Specified by:
getRequestUriBuilder in interface javax.ws.rs.core.UriInfo
Returns:
a UriBuilder initialized with the absolute request URI and an extension according to the current chosen media type
Throws:
IllegalStateException - if called outside the scope of a request


Copyright © 2005-2013 Restlet.