public class RequestContextWrapper extends java.lang.Object implements RequestContext
RequestContext.Property, RequestContext.ScopeNOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE| Constructor and Description |
|---|
RequestContextWrapper(RequestContext request) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
absoluteUrlFor(java.lang.Object key,
java.lang.Object param)
Construct an absolute URL using the Provider's Target Builder.
|
Abdera |
getAbdera()
Get the Abdera instance associated with this request
|
java.lang.String |
getAccept()
Get the value of the Accept header
|
java.lang.String |
getAcceptCharset()
Get the value of the Accept-Charset header
|
java.lang.String |
getAcceptEncoding()
Get the value of the Accept-Encoding header
|
java.lang.String |
getAcceptLanguage()
Get the value of the Accept-Language header
|
java.lang.Object |
getAttribute(RequestContext.Scope scope,
java.lang.String name)
Get the named attribute from the specified scope
|
java.lang.String[] |
getAttributeNames(RequestContext.Scope scope)
Return the list of attribute names in the specified scope
|
java.lang.String |
getAuthorization()
Get the value of the Authorization header
|
IRI |
getBaseUri()
Get the absolute base URI ...
|
java.lang.String |
getCacheControl()
Return the value of the Cache-Control header
|
java.lang.String |
getContentLanguage()
Return the value of the Content-Language header
|
IRI |
getContentLocation()
Return the value of the Content-Location header
|
javax.activation.MimeType |
getContentType()
Return the value of the Content-Type header
|
java.lang.String |
getContextPath()
Return the web applications context path
|
java.util.Date |
getDateHeader(java.lang.String name)
Return the value of a Date header
|
java.lang.String |
getDecodedHeader(java.lang.String name)
Get the decoded value of a RFC 2047 header
|
java.lang.String[] |
getDecodedHeaders(java.lang.String name)
Return multiple decoded values for the specified header
|
<T extends Element> |
getDocument()
Use the Abdera Parser to parse the request entity as an XML document
|
<T extends Element> |
getDocument(org.apache.abdera.parser.Parser parser)
Use the Abdera Parser to parse the request entity as an XML document
|
<T extends Element> |
getDocument(org.apache.abdera.parser.ParserOptions options)
Use the Abdera Parser to parse the request entity as an XML document
|
<T extends Element> |
getDocument(org.apache.abdera.parser.Parser parser,
org.apache.abdera.parser.ParserOptions options)
Use the Abdera Parser to parse the request entity as an XML document
|
java.lang.String |
getHeader(java.lang.String name)
Get the value of the specified header
|
java.lang.String[] |
getHeaderNames()
Return a listing of header names
|
java.lang.Object[] |
getHeaders(java.lang.String name)
Return multiple values for the specified header
|
EntityTag[] |
getIfMatch()
Get a listing of Etags from the If-Match header
|
java.util.Date |
getIfModifiedSince()
Get the value of the If-Modified-Since header
|
EntityTag[] |
getIfNoneMatch()
Get a listing of ETags from the If-None-Match header
|
java.util.Date |
getIfUnmodifiedSince()
Get the value of the If-Unmodified-Since header
|
java.io.InputStream |
getInputStream()
Get the InputStream containing the request entity
|
long |
getMaxAge()
Return the maximum-age as specified by the Cache-Control header
|
long |
getMaxStale()
Get the max-stale value from the Cache-Control header
|
java.lang.String |
getMethod()
Get the HTTP method
|
long |
getMinFresh()
Get the min-fresh value from the Cache-Control header
|
java.lang.String |
getParameter(java.lang.String name)
Get the specified request parameter
|
java.lang.String[] |
getParameterNames()
Return the listing of parameter names
|
java.util.List<java.lang.String> |
getParameters(java.lang.String name)
Return all the values for the specified parameter
|
java.util.Locale |
getPreferredLocale()
Get the client's preferred locale as specified in the request
|
java.util.Locale[] |
getPreferredLocales()
Get a listing of the client's preferred locales as specified in the
request.
|
java.security.Principal |
getPrincipal()
Get this requests authenticated Principal object
|
java.lang.Object |
getProperty(RequestContext.Property property)
Get the specified system property
|
Provider |
getProvider()
Get the Provider associated with this request
|
java.io.Reader |
getReader()
Get a Reader containing the request entity
|
IRI |
getResolvedUri()
Get the absolute request URI (includes server name, port, etc)
|
java.lang.String |
getSlug()
Return the value of the Slug header
|
javax.security.auth.Subject |
getSubject()
Get this requests resolved Subject
|
Target |
getTarget()
Get this requests resolved Target
|
java.lang.String |
getTargetBasePath()
Returns the subset of the request URI that is the base of the target path
(e.g.
|
java.lang.String |
getTargetPath()
Returns the subset of the request URI that is to be used to resolve the Target
(everything after the context path)
|
IRI |
getUri()
Get the request URI
|
boolean |
isAtom() |
boolean |
isNoCache()
Return true if the Cache-Control header contains no-cache
|
boolean |
isNoStore()
Return true if the Cache-Control header contains no-store
|
boolean |
isNoTransform()
Return true if the Cache-Control header contains no-transform
|
boolean |
isOnlyIfCached()
True if the only-if-cached directive is set in the Cache-Control header
|
boolean |
isUserInRole(java.lang.String role)
Check to see if the authenticated user is in the specified role
|
RequestContext |
setAttribute(RequestContext.Scope scope,
java.lang.String name,
java.lang.Object value)
Set the named attribute in the specified scope.
|
RequestContext |
setAttribute(java.lang.String name,
java.lang.Object value)
Set the named attribute in the request scope
|
java.lang.String |
urlFor(java.lang.Object key,
java.lang.Object param)
Construct a URL using the Provider's Target Builder
|
public RequestContextWrapper(RequestContext request)
public Abdera getAbdera()
RequestContextgetAbdera in interface RequestContextpublic java.lang.Object getAttribute(RequestContext.Scope scope, java.lang.String name)
RequestContextgetAttribute in interface RequestContextpublic java.lang.String[] getAttributeNames(RequestContext.Scope scope)
RequestContextgetAttributeNames in interface RequestContextpublic IRI getBaseUri()
RequestContextgetBaseUri in interface RequestContextpublic java.lang.String getContextPath()
RequestContextgetContextPath in interface RequestContextpublic <T extends Element> Document<T> getDocument() throws org.apache.abdera.parser.ParseException, java.io.IOException
RequestContextgetDocument in interface RequestContextorg.apache.abdera.parser.ParseExceptionjava.io.IOExceptionpublic <T extends Element> Document<T> getDocument(org.apache.abdera.parser.Parser parser) throws org.apache.abdera.parser.ParseException, java.io.IOException
RequestContextgetDocument in interface RequestContextorg.apache.abdera.parser.ParseExceptionjava.io.IOExceptionpublic <T extends Element> Document<T> getDocument(org.apache.abdera.parser.Parser parser, org.apache.abdera.parser.ParserOptions options) throws org.apache.abdera.parser.ParseException, java.io.IOException
RequestContextgetDocument in interface RequestContextorg.apache.abdera.parser.ParseExceptionjava.io.IOExceptionpublic <T extends Element> Document<T> getDocument(org.apache.abdera.parser.ParserOptions options) throws org.apache.abdera.parser.ParseException, java.io.IOException
RequestContextgetDocument in interface RequestContextorg.apache.abdera.parser.ParseExceptionjava.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
RequestContextgetInputStream in interface RequestContextjava.io.IOExceptionpublic java.lang.String getMethod()
RequestContextgetMethod in interface RequestContextpublic java.lang.String getParameter(java.lang.String name)
RequestContextgetParameter in interface RequestContextpublic java.lang.String[] getParameterNames()
RequestContextgetParameterNames in interface RequestContextpublic java.util.List<java.lang.String> getParameters(java.lang.String name)
RequestContextgetParameters in interface RequestContextpublic java.util.Locale getPreferredLocale()
RequestContextgetPreferredLocale in interface RequestContextpublic java.util.Locale[] getPreferredLocales()
RequestContextgetPreferredLocales in interface RequestContextpublic java.security.Principal getPrincipal()
RequestContextgetPrincipal in interface RequestContextpublic java.lang.Object getProperty(RequestContext.Property property)
RequestContextgetProperty in interface RequestContextpublic Provider getProvider()
RequestContextgetProvider in interface RequestContextpublic java.io.Reader getReader()
throws java.io.IOException
RequestContextgetReader in interface RequestContextjava.io.IOExceptionpublic IRI getResolvedUri()
RequestContextgetResolvedUri in interface RequestContextpublic javax.security.auth.Subject getSubject()
RequestContextgetSubject in interface RequestContextpublic Target getTarget()
RequestContextgetTarget in interface RequestContextpublic java.lang.String getTargetPath()
RequestContextgetTargetPath in interface RequestContextpublic IRI getUri()
RequestContextgetUri in interface RequestContextpublic boolean isUserInRole(java.lang.String role)
RequestContextisUserInRole in interface RequestContextpublic RequestContext setAttribute(RequestContext.Scope scope, java.lang.String name, java.lang.Object value)
RequestContextsetAttribute in interface RequestContextpublic RequestContext setAttribute(java.lang.String name, java.lang.Object value)
RequestContextsetAttribute in interface RequestContextpublic java.lang.String getAccept()
Requestpublic java.lang.String getAcceptCharset()
RequestgetAcceptCharset in interface Requestpublic java.lang.String getAcceptEncoding()
RequestgetAcceptEncoding in interface Requestpublic java.lang.String getAcceptLanguage()
RequestgetAcceptLanguage in interface Requestpublic java.lang.String getAuthorization()
RequestgetAuthorization in interface Requestpublic EntityTag[] getIfMatch()
RequestgetIfMatch in interface Requestpublic java.util.Date getIfModifiedSince()
RequestgetIfModifiedSince in interface Requestpublic EntityTag[] getIfNoneMatch()
RequestgetIfNoneMatch in interface Requestpublic java.util.Date getIfUnmodifiedSince()
RequestgetIfUnmodifiedSince in interface Requestpublic long getMaxStale()
RequestgetMaxStale in interface Requestpublic long getMinFresh()
RequestgetMinFresh in interface Requestpublic boolean isOnlyIfCached()
RequestisOnlyIfCached in interface Requestpublic java.lang.String getCacheControl()
MessagegetCacheControl in interface Messagepublic java.lang.String getContentLanguage()
MessagegetContentLanguage in interface Messagepublic IRI getContentLocation()
MessagegetContentLocation in interface Messagepublic javax.activation.MimeType getContentType()
MessagegetContentType in interface Messagepublic java.util.Date getDateHeader(java.lang.String name)
MessagegetDateHeader in interface Messagepublic java.lang.String getDecodedHeader(java.lang.String name)
MessagegetDecodedHeader in interface Messagepublic java.lang.String[] getDecodedHeaders(java.lang.String name)
MessagegetDecodedHeaders in interface Messagepublic java.lang.String getHeader(java.lang.String name)
Messagepublic java.lang.String[] getHeaderNames()
MessagegetHeaderNames in interface Messagepublic java.lang.Object[] getHeaders(java.lang.String name)
MessagegetHeaders in interface Messagepublic long getMaxAge()
Messagepublic java.lang.String getSlug()
Messagepublic boolean isNoCache()
Messagepublic boolean isNoStore()
Messagepublic boolean isNoTransform()
MessageisNoTransform in interface Messagepublic java.lang.String urlFor(java.lang.Object key,
java.lang.Object param)
RequestContexturlFor in interface RequestContextpublic java.lang.String getTargetBasePath()
RequestContextgetTargetBasePath in interface RequestContextpublic java.lang.String absoluteUrlFor(java.lang.Object key,
java.lang.Object param)
RequestContextabsoluteUrlFor in interface RequestContextpublic boolean isAtom()
isAtom in interface RequestContextCopyright © 2010 - 2019 Adobe. All Rights Reserved