## com.sun.jersey.spi.container
Class AdaptingContainerRequest

    java.lang.Object
      com.sun.jersey.spi.container.ContainerRequest
          com.sun.jersey.spi.container.AdaptingContainerRequest

All Implemented Interfaces:
  HttpRequestContext, Traceable, HttpHeaders, Request, SecurityContext

Direct Known Subclasses:
  CachedEntityContainerRequest

    public class AdaptingContainerRequest

extends ContainerRequest

An adapting in-bound HTTP request that may override the behaviour of `ContainerRequest`.

Author:
  Paul.Sandoz@Sun.Com

Field Summary
`protected ContainerRequest` | `acr` The adapted container request.

Fields inherited from class com.sun.jersey.spi.container.ContainerRequest
`VARY_HEADER`

Fields inherited from interface javax.ws.rs.core.HttpHeaders
`ACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, AUTHORIZATION, CACHE_CONTROL, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_TYPE, COOKIE, DATE, ETAG, EXPIRES, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LOCATION, SET_COOKIE, USER_AGENT, VARY, WWW_AUTHENTICATE`

Fields inherited from interface javax.ws.rs.core.SecurityContext
`BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH`

Constructor Summary
`protected` | `AdaptingContainerRequest(ContainerRequest acr)` Create the adapting container request.

Method Summary
`Response.ResponseBuilder` | `evaluatePreconditions()` Evaluate request preconditions for a resource that does not currently exist.
`Response.ResponseBuilder` | `evaluatePreconditions(java.util.Date lastModified)` Evaluate request preconditions based on the passed in value.
`Response.ResponseBuilder` | `evaluatePreconditions(java.util.Date lastModified, EntityTag eTag)` Evaluate request preconditions based on the passed in value.
`Response.ResponseBuilder` | `evaluatePreconditions(EntityTag eTag)` Evaluate request preconditions based on the passed in value.
`java.net.URI` | `getAbsolutePath()` Get the absolute path of the request.
`UriBuilder` | `getAbsolutePathBuilder()` Get the absolute path of the request in the form of a UriBuilder.
`java.util.List<java.util.Locale>` | `getAcceptableLanguages()` Get a list of languages that are acceptable for the response.
`MediaType` | `getAcceptableMediaType(java.util.List<MediaType> mediaTypes)` Select the first media type, from a list of media types, that is most acceptable according to the requested acceptable media types.
`java.util.List<MediaType>` | `getAcceptableMediaTypes()` Get a list of media types that are acceptable for the response.
`java.util.List<MediaType>` | `getAcceptableMediaTypes(java.util.List<QualitySourceMediaType> priorityMediaTypes)` Get a list of media types that are acceptable for the response.
`java.lang.String` | `getAuthenticationScheme()` Returns the string value of the authentication scheme used to protect the resource.
`java.net.URI` | `getBaseUri()` Get the base URI of the application.
`UriBuilder` | `getBaseUriBuilder()` Get the base URI of the application in the form of a UriBuilder.
`MultivaluedMap<java.lang.String,java.lang.String>` | `getCookieNameValueMap()` Get the cookie name value map.
`java.util.Map<java.lang.String,Cookie>` | `getCookies()` Get any cookies that accompanied the request.

`

`<T> T`

`

`getEntity(java.lang.Class<T> type)`
Get the request entity, returns null if the request does not contain an entity body.

`

`<T> T`

`

`getEntity(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] as)`
Get the request entity, returns null if the request does not contain an entity body.

`java.io.InputStream` | `getEntityInputStream()` Get the input stream of the entity.
`Form` | `getFormParameters()` Get the form parameters of the request entity.
`java.lang.String` | `getHeaderValue(java.lang.String name)` Get a HTTP header value.
`java.util.Locale` | `getLanguage()` Get the language of the request entity
`MediaType` | `getMediaType()` Get the media type of the request entity
`MessageBodyWorkers` | `getMessageBodyWorkers()` Get the message body workers.
`java.lang.String` | `getMethod()` Get the request method, e.g.
`java.lang.String` | `getPath()` Get the path of the current request relative to the base URI as a string.
`java.lang.String` | `getPath(boolean decode)` Get the path of the current request relative to the base URI as a string.
`java.util.List<PathSegment>` | `getPathSegments()` Get the path of the current request relative to the base URI as a list of `PathSegment`.
`java.util.List<PathSegment>` | `getPathSegments(boolean decode)` Get the path of the current request relative to the base URI as a list of `PathSegment`.
`java.util.Map<java.lang.String,java.lang.Object>` | `getProperties()` Get the mutable properties.
`MultivaluedMap<java.lang.String,java.lang.String>` | `getQueryParameters()` Get the URI query parameters of the current request.
`MultivaluedMap<java.lang.String,java.lang.String>` | `getQueryParameters(boolean decode)` Get the URI query parameters of the current request.
`java.util.List<java.lang.String>` | `getRequestHeader(java.lang.String name)` Get the values of a HTTP request header.
`MultivaluedMap<java.lang.String,java.lang.String>` | `getRequestHeaders()` Get the values of HTTP request headers.
`java.net.URI` | `getRequestUri()` Get the absolute request URI.
`UriBuilder` | `getRequestUriBuilder()` Get the absolute request URI in the form of a UriBuilder.
`SecurityContext` | `getSecurityContext()` Get the security context.
`java.security.Principal` | `getUserPrincipal()` Returns a `java.security.Principal` object containing the name of the current authenticated user.
`boolean` | `isSecure()` Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
`boolean` | `isTracingEnabled()` Check if tracing is enabled.
`boolean` | `isUserInRole(java.lang.String role)` Returns a boolean indicating whether the authenticated user is included in the specified logical "role".
`Variant` | `selectVariant(java.util.List<Variant> variants)` Select the representation variant that best matches the request.
`void` | `setEntityInputStream(java.io.InputStream entity)` Set the input stream of the entity.
`void` | `setHeaders(InBoundHeaders headers)` Set the request headers.
`void` | `setMethod(java.lang.String method)` Set the HTTP method.
`void` | `setSecurityContext(SecurityContext securityContext)` Set the security context.
`void` | `setUris(java.net.URI baseUri, java.net.URI requestUri)` Set the base and request URI.
`void` | `trace(java.lang.String message)` Add a trace message.

Methods inherited from class com.sun.jersey.spi.container.ContainerRequest
`setEntity`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### acr

    protected final ContainerRequest acr

  The adapted container request.

Constructor Detail

### AdaptingContainerRequest

    protected AdaptingContainerRequest(ContainerRequest acr)

  Create the adapting container request.

  Parameters:
    `acr` - the container request to adapt.

Method Detail

### getProperties

    public java.util.Map<java.lang.String,java.lang.Object> getProperties()

  Description copied from class: `ContainerRequest`
  Get the mutable properties.

  Care should be taken not to clear the properties or remove properties that are unknown otherwise unspecified behaviour may result.

  Overrides:
    `getProperties` in class `ContainerRequest`
  Returns:
    the properties.

### setMethod

    public void setMethod(java.lang.String method)

  Description copied from class: `ContainerRequest`
  Set the HTTP method.

  Overrides:
    `setMethod` in class `ContainerRequest`
  Parameters:
    `method` - the method.

### setUris

    public void setUris(java.net.URI baseUri,
                        java.net.URI requestUri)

  Description copied from class: `ContainerRequest`
  Set the base and request URI.

  Overrides:
    `setUris` in class `ContainerRequest`
  Parameters:
    `baseUri` - the base URI.
    `requestUri` - the (complete) request URI.

### getEntityInputStream

    public java.io.InputStream getEntityInputStream()

  Description copied from class: `ContainerRequest`
  Get the input stream of the entity.

  Overrides:
    `getEntityInputStream` in class `ContainerRequest`
  Returns:
    the input stream of the entity.

### setEntityInputStream

    public void setEntityInputStream(java.io.InputStream entity)

  Description copied from class: `ContainerRequest`
  Set the input stream of the entity.

  Overrides:
    `setEntityInputStream` in class `ContainerRequest`
  Parameters:
    `entity` - the input stream of the entity.

### setHeaders

    public void setHeaders(InBoundHeaders headers)

  Description copied from class: `ContainerRequest`
  Set the request headers.

  Overrides:
    `setHeaders` in class `ContainerRequest`
  Parameters:
    `headers` - the request headers.

### setSecurityContext

    public void setSecurityContext(SecurityContext securityContext)

  Description copied from class: `ContainerRequest`
  Set the security context.

  Overrides:
    `setSecurityContext` in class `ContainerRequest`
  Parameters:
    `securityContext` - the security context.

### getSecurityContext

    public SecurityContext getSecurityContext()

  Description copied from class: `ContainerRequest`
  Get the security context.

  Overrides:
    `getSecurityContext` in class `ContainerRequest`
  Returns:
    the security context.

### getMessageBodyWorkers

    public MessageBodyWorkers getMessageBodyWorkers()

  Description copied from class: `ContainerRequest`
  Get the message body workers.

  Overrides:
    `getMessageBodyWorkers` in class `ContainerRequest`
  Returns:
    the message body workers.

### isTracingEnabled

    public boolean isTracingEnabled()

  Description copied from interface: `Traceable`
  Check if tracing is enabled.

  Specified by:
    `isTracingEnabled` in interface `Traceable`
  Overrides:
    `isTracingEnabled` in class `ContainerRequest`
  Returns:
    true if tracing is enabled, otherwise false.

### trace

    public void trace(java.lang.String message)

  Description copied from interface: `Traceable`
  Add a trace message.

  A trace message will be added if `Traceable.isTracingEnabled()` returns true and tracing contraints are satisfied.

  Specified by:
    `trace` in interface `Traceable`
  Overrides:
    `trace` in class `ContainerRequest`
  Parameters:
    `message` - the trace message to add.

### getBaseUri

    public java.net.URI getBaseUri()

  Description copied from interface: `HttpRequestContext`
  Get the base URI of the application. URIs of root resource classes are all relative to this base URI.

  Specified by:
    `getBaseUri` in interface `HttpRequestContext`
  Overrides:
    `getBaseUri` in class `ContainerRequest`
  Returns:
    the base URI of the application

### getBaseUriBuilder

    public UriBuilder getBaseUriBuilder()

  Description copied from interface: `HttpRequestContext`
  Get the base URI of the application in the form of a UriBuilder.

  Specified by:
    `getBaseUriBuilder` in interface `HttpRequestContext`
  Overrides:
    `getBaseUriBuilder` in class `ContainerRequest`
  Returns:
    a UriBuilder initialized with the base URI of the application.

### getRequestUri

    public java.net.URI getRequestUri()

  Description copied from interface: `HttpRequestContext`
  Get the absolute request URI. This includes query parameters and any supplied fragment.

  Specified by:
    `getRequestUri` in interface `HttpRequestContext`
  Overrides:
    `getRequestUri` in class `ContainerRequest`
  Returns:
    the absolute request URI

### getRequestUriBuilder

    public UriBuilder getRequestUriBuilder()

  Description copied from interface: `HttpRequestContext`
  Get the absolute request URI in the form of a UriBuilder.

  Specified by:
    `getRequestUriBuilder` in interface `HttpRequestContext`
  Overrides:
    `getRequestUriBuilder` in class `ContainerRequest`
  Returns:
    a UriBuilder initialized with the absolute request URI

### getAbsolutePath

    public java.net.URI getAbsolutePath()

  Description copied from interface: `HttpRequestContext`
  Get the absolute path of the request. This includes everything preceding the path (host, port etc) but excludes query parameters and fragment. This is a shortcut for `uriInfo.getBase().resolve(uriInfo.getPath()).`

  Specified by:
    `getAbsolutePath` in interface `HttpRequestContext`
  Overrides:
    `getAbsolutePath` in class `ContainerRequest`
  Returns:
    the absolute path of the request

### getAbsolutePathBuilder

    public UriBuilder getAbsolutePathBuilder()

  Description copied from interface: `HttpRequestContext`
  Get the absolute path of the request in the form of a UriBuilder. This includes everything preceding the path (host, port etc) but excludes query parameters and fragment.

  Specified by:
    `getAbsolutePathBuilder` in interface `HttpRequestContext`
  Overrides:
    `getAbsolutePathBuilder` in class `ContainerRequest`
  Returns:
    a UriBuilder initialized with the absolute path of the request

### getPath

    public java.lang.String getPath()

  Description copied from interface: `HttpRequestContext`
  Get the path of the current request relative to the base URI as a string. All sequences of escaped octets are decoded, equivalent to `getPath(true)`.

  Specified by:
    `getPath` in interface `HttpRequestContext`
  Overrides:
    `getPath` in class `ContainerRequest`
  Returns:
    the relative URI path

### getPath

    public java.lang.String getPath(boolean decode)

  Description copied from interface: `HttpRequestContext`
  Get the path of the current request relative to the base URI as a string.

  Specified by:
    `getPath` in interface `HttpRequestContext`
  Overrides:
    `getPath` in class `ContainerRequest`
  Parameters:
    `decode` - controls whether sequences of escaped octets are decoded (true) or not (false).
  Returns:
    the relative URI path

### getPathSegments

    public java.util.List<PathSegment> getPathSegments()

  Description copied from interface: `HttpRequestContext`
  Get the path of the current request relative to the base URI as a list of `PathSegment`. This method is useful when the path needs to be parsed, particularly when matrix parameters may be present in the path. All sequences of escaped octets in path segments and matrix parameter names and values are decoded, equivalent to `getPathSegments(true)`.

  Specified by:
    `getPathSegments` in interface `HttpRequestContext`
  Overrides:
    `getPathSegments` in class `ContainerRequest`
  Returns:
    an unmodifiable list of `PathSegment`. The matrix parameter map of each path segment is also unmodifiable.
  See Also:
    `PathSegment`, Matrix URIs

### getPathSegments

    public java.util.List<PathSegment> getPathSegments(boolean decode)

  Description copied from interface: `HttpRequestContext`
  Get the path of the current request relative to the base URI as a list of `PathSegment`. This method is useful when the path needs to be parsed, particularly when matrix parameters may be present in the path.

  Specified by:
    `getPathSegments` in interface `HttpRequestContext`
  Overrides:
    `getPathSegments` in class `ContainerRequest`
  Parameters:
    `decode` - controls whether sequences of escaped octets in path segments and matrix parameter names and values are decoded (true) or not (false).
  Returns:
    an unmodifiable list of `PathSegment`. The matrix parameter map of each path segment is also unmodifiable.
  See Also:
    `PathSegment`, Matrix URIs

### getQueryParameters

    public MultivaluedMap<java.lang.String,java.lang.String> getQueryParameters()

  Description copied from interface: `HttpRequestContext`
  Get the URI query parameters of the current request. All sequences of escaped octets in parameter names and values are decoded, equivalent to `getQueryParameters(true)`.

  Specified by:
    `getQueryParameters` in interface `HttpRequestContext`
  Overrides:
    `getQueryParameters` in class `ContainerRequest`
  Returns:
    an unmodifiable map of query parameter names and values

### getQueryParameters

    public MultivaluedMap<java.lang.String,java.lang.String> getQueryParameters(boolean decode)

  Description copied from interface: `HttpRequestContext`
  Get the URI query parameters of the current request.

  Specified by:
    `getQueryParameters` in interface `HttpRequestContext`
  Overrides:
    `getQueryParameters` in class `ContainerRequest`
  Parameters:
    `decode` - controls whether sequences of escaped octets in parameter names and values are decoded (true) or not (false).
  Returns:
    an unmodifiable map of query parameter names and values

### getHeaderValue

    public java.lang.String getHeaderValue(java.lang.String name)

  Description copied from interface: `HttpRequestContext`
  Get a HTTP header value.

  Specified by:
    `getHeaderValue` in interface `HttpRequestContext`
  Overrides:
    `getHeaderValue` in class `ContainerRequest`
  Parameters:
    `name` - the HTTP header
  Returns:
    the HTTP header value. If the HTTP header is not present then null is returned. If the HTTP header is present but has no value then the empty string is returned. If the HTTP header is present more than once then the values of joined together and separated by a ',' character.

### getAcceptableMediaType

    public MediaType getAcceptableMediaType(java.util.List<MediaType> mediaTypes)

  Description copied from interface: `HttpRequestContext`
  Select the first media type, from a list of media types, that is most acceptable according to the requested acceptable media types.

  Specified by:
    `getAcceptableMediaType` in interface `HttpRequestContext`
  Overrides:
    `getAcceptableMediaType` in class `ContainerRequest`
  Parameters:
    `mediaTypes` - the list of media types
  Returns:
    the most acceptable media type, or null if no media type was found to be acceptable.

### getAcceptableMediaTypes

    public java.util.List<MediaType> getAcceptableMediaTypes(java.util.List<QualitySourceMediaType> priorityMediaTypes)

  Description copied from interface: `HttpRequestContext`
  Get a list of media types that are acceptable for the response.

  Specified by:
    `getAcceptableMediaTypes` in interface `HttpRequestContext`
  Overrides:
    `getAcceptableMediaTypes` in class `ContainerRequest`
  Parameters:
    `priorityMediaTypes` - the list of media types that take priority, ordered according to the quality source parameter, "qs" as the primary key.
  Returns:
    a list of requested response media types sorted according to highest relative quality value, which is product of the quality parameter, q, of an acceptable media type, and the quality source parameter, qs, of matching media type.

### getCookieNameValueMap

    public MultivaluedMap<java.lang.String,java.lang.String> getCookieNameValueMap()

  Description copied from interface: `HttpRequestContext`
  Get the cookie name value map.

  Specified by:
    `getCookieNameValueMap` in interface `HttpRequestContext`
  Overrides:
    `getCookieNameValueMap` in class `ContainerRequest`
  Returns:
    the cookie name value map.

### getEntity

    public <T> T getEntity(java.lang.Class<T> type)
                throws WebApplicationException

  Description copied from interface: `HttpRequestContext`
  Get the request entity, returns null if the request does not contain an entity body.

  Specified by:
    `getEntity` in interface `HttpRequestContext`
  Overrides:
    `getEntity` in class `ContainerRequest`
  Parameters:
    `type` - the type of entity
  Returns:
    the request entity or null
  Throws:
    `WebApplicationException` - if the content of the request cannot be mapped to an entity of the requested type

### getEntity

    public <T> T getEntity(java.lang.Class<T> type,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] as)
                throws WebApplicationException

  Description copied from interface: `HttpRequestContext`
  Get the request entity, returns null if the request does not contain an entity body.

  Specified by:
    `getEntity` in interface `HttpRequestContext`
  Overrides:
    `getEntity` in class `ContainerRequest`
  Parameters:
    `type` - the type of entity
    `genericType` - type the generic type of entity, it is the responsibility of the callee to ensure that the type and generic type are consistent otherwise the behaviour of this method is undefined.
    `as` - the annotations associated with the type
  Returns:
    the request entity or null
  Throws:
    `WebApplicationException` - if the content of the request cannot be mapped to an entity of the requested type

### getFormParameters

    public Form getFormParameters()

  Description copied from interface: `HttpRequestContext`
  Get the form parameters of the request entity.

  This method will ensure that the request entity is buffered such that it may be consumed by the application.

  Specified by:
    `getFormParameters` in interface `HttpRequestContext`
  Overrides:
    `getFormParameters` in class `ContainerRequest`
  Returns:
    the form parameters, if there is a request entity and the content type is "application/x-www-form-urlencoded", otherwise an instance containing no parameters will be returned.

### getRequestHeader

    public java.util.List<java.lang.String> getRequestHeader(java.lang.String name)

  Description copied from interface: `HttpHeaders`
  Get the values of a HTTP request header. The returned List is read-only. This is a shortcut for `getRequestHeaders().get(name)`.

  Specified by:
    `getRequestHeader` in interface `HttpHeaders`
  Overrides:
    `getRequestHeader` in class `ContainerRequest`
  Parameters:
    `name` - the header name, case insensitive
  Returns:
    a read-only list of header values.

### getRequestHeaders

    public MultivaluedMap<java.lang.String,java.lang.String> getRequestHeaders()

  Description copied from interface: `HttpHeaders`
  Get the values of HTTP request headers. The returned Map is case-insensitive wrt keys and is read-only.

  Specified by:
    `getRequestHeaders` in interface `HttpHeaders`
  Overrides:
    `getRequestHeaders` in class `ContainerRequest`
  Returns:
    a read-only map of header names and values.

### getAcceptableMediaTypes

    public java.util.List<MediaType> getAcceptableMediaTypes()

  Description copied from interface: `HttpHeaders`
  Get a list of media types that are acceptable for the response.

  Specified by:
    `getAcceptableMediaTypes` in interface `HttpHeaders`
  Overrides:
    `getAcceptableMediaTypes` in class `ContainerRequest`
  Returns:
    a read-only list of requested response media types sorted according to their q-value, with highest preference first.

### getAcceptableLanguages

    public java.util.List<java.util.Locale> getAcceptableLanguages()

  Description copied from interface: `HttpHeaders`
  Get a list of languages that are acceptable for the response.

  Specified by:
    `getAcceptableLanguages` in interface `HttpHeaders`
  Overrides:
    `getAcceptableLanguages` in class `ContainerRequest`
  Returns:
    a read-only list of acceptable languages sorted according to their q-value, with highest preference first.

### getMediaType

    public MediaType getMediaType()

  Description copied from interface: `HttpHeaders`
  Get the media type of the request entity

  Specified by:
    `getMediaType` in interface `HttpHeaders`
  Overrides:
    `getMediaType` in class `ContainerRequest`
  Returns:
    the media type or null if there is no request entity.

### getLanguage

    public java.util.Locale getLanguage()

  Description copied from interface: `HttpHeaders`
  Get the language of the request entity

  Specified by:
    `getLanguage` in interface `HttpHeaders`
  Overrides:
    `getLanguage` in class `ContainerRequest`
  Returns:
    the language of the entity or null if not specified

### getCookies

    public java.util.Map<java.lang.String,Cookie> getCookies()

  Description copied from interface: `HttpHeaders`
  Get any cookies that accompanied the request.

  Specified by:
    `getCookies` in interface `HttpHeaders`
  Overrides:
    `getCookies` in class `ContainerRequest`
  Returns:
    a read-only map of cookie name (String) to Cookie.

### getMethod

    public java.lang.String getMethod()

  Description copied from interface: `Request`
  Get the request method, e.g. GET, POST, etc.

  Specified by:
    `getMethod` in interface `Request`
  Overrides:
    `getMethod` in class `ContainerRequest`
  Returns:
    the request method
  See Also:
    `HttpMethod`

### selectVariant

    public Variant selectVariant(java.util.List<Variant> variants)
                          throws java.lang.IllegalArgumentException

  Description copied from interface: `Request`
  Select the representation variant that best matches the request. More explicit variants are chosen ahead of less explicit ones. A vary header is computed from the supplied list and automatically added to the response.

  Specified by:
    `selectVariant` in interface `Request`
  Overrides:
    `selectVariant` in class `ContainerRequest`
  Parameters:
    `variants` - a list of Variant that describe all of the available representation variants.
  Returns:
    the variant that best matches the request.
  Throws:
    `java.lang.IllegalArgumentException` - if variants is empty or null
  See Also:
    `Variant.VariantListBuilder`

### evaluatePreconditions

    public Response.ResponseBuilder evaluatePreconditions(EntityTag eTag)

  Description copied from interface: `Request`
  Evaluate request preconditions based on the passed in value.

  Specified by:
    `evaluatePreconditions` in interface `Request`
  Overrides:
    `evaluatePreconditions` in class `ContainerRequest`
  Parameters:
    `eTag` - an ETag for the current state of the resource
  Returns:
    null if the preconditions are met or a ResponseBuilder set with the appropriate status if the preconditions are not met. A returned ResponseBuilder will include an ETag header set with the value of eTag.

### evaluatePreconditions

    public Response.ResponseBuilder evaluatePreconditions(java.util.Date lastModified)

  Description copied from interface: `Request`
  Evaluate request preconditions based on the passed in value.

  Specified by:
    `evaluatePreconditions` in interface `Request`
  Overrides:
    `evaluatePreconditions` in class `ContainerRequest`
  Parameters:
    `lastModified` - a date that specifies the modification date of the resource
  Returns:
    null if the preconditions are met or a ResponseBuilder set with the appropriate status if the preconditions are not met.

### evaluatePreconditions

    public Response.ResponseBuilder evaluatePreconditions(java.util.Date lastModified,
                                                          EntityTag eTag)

  Description copied from interface: `Request`
  Evaluate request preconditions based on the passed in value.

  Specified by:
    `evaluatePreconditions` in interface `Request`
  Overrides:
    `evaluatePreconditions` in class `ContainerRequest`
  Parameters:
    `lastModified` - a date that specifies the modification date of the resource
    `eTag` - an ETag for the current state of the resource
  Returns:
    null if the preconditions are met or a ResponseBuilder set with the appropriate status if the preconditions are not met. A returned ResponseBuilder will include an ETag header set with the value of eTag.

### evaluatePreconditions

    public Response.ResponseBuilder evaluatePreconditions()

  Description copied from interface: `Request`
  Evaluate request preconditions for a resource that does not currently exist. The primary use of this method is to support the If-Match: * and If-None-Match: * preconditions.

  Note that both preconditions `If-None-Match: *` and `If-None-Match: something` will always be considered to have been met and it is the applications responsibility to enforce any additional method-specific semantics. E.g. a `PUT` on a resource that does not exist might succeed whereas a `GET` on a resource that does not exist would likely result in a 404 response. It would be the responsibility of the application to generate the 404 response.

  Specified by:
    `evaluatePreconditions` in interface `Request`
  Overrides:
    `evaluatePreconditions` in class `ContainerRequest`
  Returns:
    null if the preconditions are met or a ResponseBuilder set with the appropriate status if the preconditions are not met.

### getUserPrincipal

    public java.security.Principal getUserPrincipal()

  Description copied from interface: `SecurityContext`
  Returns a `java.security.Principal` object containing the name of the current authenticated user. If the user has not been authenticated, the method returns null.

  Specified by:
    `getUserPrincipal` in interface `SecurityContext`
  Overrides:
    `getUserPrincipal` in class `ContainerRequest`
  Returns:
    a `java.security.Principal` containing the name of the user making this request; null if the user has not been authenticated

### isUserInRole

    public boolean isUserInRole(java.lang.String role)

  Description copied from interface: `SecurityContext`
  Returns a boolean indicating whether the authenticated user is included in the specified logical "role". If the user has not been authenticated, the method returns `false`.

  Specified by:
    `isUserInRole` in interface `SecurityContext`
  Overrides:
    `isUserInRole` in class `ContainerRequest`
  Parameters:
    `role` - a `String` specifying the name of the role
  Returns:
    a `boolean` indicating whether the user making the request belongs to a given role; `false` if the user has not been authenticated

### isSecure

    public boolean isSecure()

  Description copied from interface: `SecurityContext`
  Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.

  Specified by:
    `isSecure` in interface `SecurityContext`
  Overrides:
    `isSecure` in class `ContainerRequest`
  Returns:
    `true` if the request was made using a secure channel, `false` otherwise

### getAuthenticationScheme

    public java.lang.String getAuthenticationScheme()

  Description copied from interface: `SecurityContext`
  Returns the string value of the authentication scheme used to protect the resource. If the resource is not authenticated, null is returned. Values are the same as the CGI variable AUTH_TYPE

  Specified by:
    `getAuthenticationScheme` in interface `SecurityContext`
  Overrides:
    `getAuthenticationScheme` in class `ContainerRequest`
  Returns:
    one of the static members BASIC_AUTH, FORM_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH (suitable for == comparison) or the container-specific string indicating the authentication scheme, or null if the request was not authenticated.

Copyright © 2017 Oracle Corporation. All Rights Reserved.