Class CallContext
- java.lang.Object
-
- org.restlet.ext.jaxrs.internal.core.CallContext
-
- All Implemented Interfaces:
javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.Request,javax.ws.rs.core.SecurityContext
@Deprecated public class CallContext extends java.lang.Object implements javax.ws.rs.core.Request, javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.SecurityContextDeprecated.Will be removed in next minor release.Contains all request specific data of the interfaces injectable for @Context. Implementation of the JAX-RS interfacesHttpHeaders,UriInfo,RequestandSecurityContext.
This class is not required to be thread safe, because it is only used for one client request in one thread at the same time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classCallContext.MatrixParamEncIterDeprecated.Iterator to return the values for a matrix parameter.
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.util.Locale>acceptedLanguagesDeprecated.the unmodifiable List of accepted languages.private java.util.List<javax.ws.rs.core.MediaType>acceptedMediaTypesDeprecated.The unmodifiable List of acceptedMediaTypes.private SortedMetadata<MediaType>accMediaTypesDeprecated.private java.lang.StringbaseUriDeprecated.private java.util.Map<java.lang.String,javax.ws.rs.core.Cookie>cookiesDeprecated.private java.util.LocalelanguageDeprecated.private java.util.LinkedList<java.lang.Object>matchedResourcesDeprecated.contains the current value of the ancestor resourcesprivate java.util.LinkedList<java.lang.String>matchedURIsDeprecated.contains the current value of the ancestor resource URIsprivate javax.ws.rs.core.MediaTypemediaTypeDeprecated.private javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>pathParametersDecodedDeprecated.private javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>pathParametersEncodedDeprecated.is null, if no templateParameters given on creationprivate java.util.List<javax.ws.rs.core.PathSegment>pathSegmentsDecodedDeprecated.private java.util.List<javax.ws.rs.core.PathSegment>pathSegmentsEncodedDeprecated.private javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>queryParametersDecodedDeprecated.private javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>queryParametersEncodedDeprecated.private booleanreadOnlyDeprecated.private ReferencereferenceCutDeprecated.private ReferencereferenceOriginalDeprecated.private RequestrequestDeprecated.private UnmodifiableMultivaluedMap<java.lang.String,java.lang.String>requestHeadersDeprecated.private ResponseresponseDeprecated.private static intSTATUS_PREC_FAILEDDeprecated.private static java.util.logging.LoggerunexpectedLoggerDeprecated.-
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
-
-
Constructor Summary
Constructors Constructor Description CallContext(Request request, Response response)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddForMatched(java.lang.Object resourceObject, java.lang.String newUriPart)Deprecated.also useable aftersetReadOnly()voidaddPathParamsEnc(java.lang.String varName, java.lang.String varValue)Deprecated.protected voidcheckChangeable()Deprecated.Checks, if this object is changeable.private ExtendedUriBuildercreateExtendedUriBuilder(Reference ref)Deprecated.private java.util.List<javax.ws.rs.core.PathSegment>createPathSegments(boolean decode)Deprecated.Creates an unmodifiable List ofPathSegments.private javax.ws.rs.core.UriBuildercreateUriBuilder(Reference ref)Deprecated.booleanequals(java.lang.Object anotherObject)Deprecated.javax.ws.rs.core.Response.ResponseBuilderevaluatePreconditions()Deprecated.javax.ws.rs.core.Response.ResponseBuilderevaluatePreconditions(java.util.Date lastModified)Deprecated.Evaluate request preconditions based on the passed in value.javax.ws.rs.core.Response.ResponseBuilderevaluatePreconditions(java.util.Date lastModified, javax.ws.rs.core.EntityTag entityTag)Deprecated.Evaluate request preconditions based on the passed in value.javax.ws.rs.core.Response.ResponseBuilderevaluatePreconditions(javax.ws.rs.core.EntityTag entityTag)Deprecated.Evaluate request preconditions based on the passed in value.private javax.ws.rs.core.Response.ResponseBuilderevaluatePreconditionsInternal(java.util.Date lastModified, javax.ws.rs.core.EntityTag entityTag)Deprecated.Evaluates the preconditions of the current request against the given last modified date and / or the given entity tag.private javax.ws.rs.core.UriBuilderfillUriBuilder(Reference ref, javax.ws.rs.core.UriBuilder b)Deprecated.java.net.URIgetAbsolutePath()Deprecated.Get the absolute path of the request.javax.ws.rs.core.UriBuildergetAbsolutePathBuilder()Deprecated.Get the absolute path of the request in the form of a UriBuilder.(package private) ExtendedUriBuildergetAbsolutePathBuilderExtended()Deprecated.java.util.List<java.util.Locale>getAcceptableLanguages()Deprecated.java.util.List<javax.ws.rs.core.MediaType>getAcceptableMediaTypes()Deprecated.For use from JAX-RS interface.SortedMetadata<MediaType>getAccMediaTypes()Deprecated.Returns the accepted media types as RestletMediaTypes.java.lang.StringgetAuthenticationScheme()Deprecated.Returns the string value of the authentication scheme used to protect the resource.java.net.URIgetBaseUri()Deprecated.Get the base URI of the application.javax.ws.rs.core.UriBuildergetBaseUriBuilder()Deprecated.Get the absolute path of the request in the form of a UriBuilder.(package private) ExtendedUriBuildergetBaseUriBuilderExtended()Deprecated.private java.lang.StringgetBaseUriStr()Deprecated.java.lang.StringgetConnegExtension()Deprecated.Get the request URI extension.java.util.Map<java.lang.String,javax.ws.rs.core.Cookie>getCookies()Deprecated.Get any cookies that accompanied the request.java.util.LocalegetLanguage()Deprecated.java.lang.StringgetLastMatrixParamEnc(javax.ws.rs.MatrixParam matrixParamAnnot)Deprecated.Returns the last matrix parameter with the given name; leaves it encoded.java.lang.StringgetLastPathParamEnc(javax.ws.rs.PathParam annotation)Deprecated.java.lang.StringgetLastPathSegmentEnc(javax.ws.rs.PathParam pathParam)Deprecated.(package private) java.util.List<java.lang.Object>getMatchedResources()Deprecated.current state of the matchedResources(package private) java.util.List<java.lang.String>getMatchedURIs()Deprecated.current state of the matchedURIsjavax.ws.rs.core.MediaTypegetMediaType()Deprecated.Get the media type of the request entityjava.lang.StringgetMethod()Deprecated.java.lang.StringgetPath()Deprecated.Get the path of the current request relative to the base URI as a string.java.lang.StringgetPath(boolean decode)Deprecated.Get the path of the current request relative to the base URI as a string.javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>getPathParameters()Deprecated.Get the values of any embedded URI template parameters.javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>getPathParameters(boolean decode)Deprecated.Get the values of any embedded URI template parameters.java.util.List<javax.ws.rs.core.PathSegment>getPathSegments()Deprecated.Get the path of the current request relative to the base URI as a list ofPathSegment.java.util.List<javax.ws.rs.core.PathSegment>getPathSegments(boolean decode)Deprecated.Get the path of the current request relative to the base URI as a list ofPathSegment.javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>getQueryParameters()Deprecated.Get the URI query parameters of the current request.javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>getQueryParameters(boolean decode, boolean caseSensitive)Deprecated.Get the URI query parameters of the current request.RequestgetRequest()Deprecated.Returns the RestletRequestjava.util.List<java.lang.String>getRequestHeader(java.lang.String headerName)Deprecated.javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>getRequestHeaders()Deprecated.java.net.URIgetRequestUri()Deprecated.javax.ws.rs.core.UriBuildergetRequestUriBuilder()Deprecated.Get the absolute request URI in the form of a UriBuilder.(package private) ExtendedUriBuildergetRequestUriBuilderExtended()Deprecated.ResponsegetResponse()Deprecated.Returns the RestletResponsejava.security.PrincipalgetUserPrincipal()Deprecated.Returns ajava.security.Principalobject containing the name of the current authenticated user.inthashCode()Deprecated.protected javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>interalGetPathParamsEncoded()Deprecated.protected booleanisChangeable()Deprecated.booleanisSecure()Deprecated.Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.booleanisUserInRole(java.lang.String roleName)Deprecated.Returns a boolean indicating whether the authenticated user is included in the specified logical "role".java.util.Iterator<java.lang.String>matrixParamEncIter(javax.ws.rs.MatrixParam matrixParamAnnot)Deprecated.java.util.Iterator<java.lang.String>pathParamEncIter(javax.ws.rs.PathParam pathParamAnnot)Deprecated.java.util.Iterator<java.lang.String>pathSegementEncIter(javax.ws.rs.PathParam pathParam)Deprecated.javax.ws.rs.core.VariantselectVariant(java.util.List<javax.ws.rs.core.Variant> variants)Deprecated.Select the representation variant that best matches the request.voidsetReadOnly()Deprecated.Sets the Context to be read only.java.lang.StringtoString()Deprecated.private javax.ws.rs.WebApplicationExceptionwrapUriSyntaxExc(java.net.URISyntaxException exc, java.util.logging.Logger logger, java.lang.String logMessage)Deprecated.This method throws anWebApplicationExceptionfor Exceptions where is no planned handling.
-
-
-
Field Detail
-
STATUS_PREC_FAILED
private static final int STATUS_PREC_FAILED
Deprecated.
-
unexpectedLogger
private static final java.util.logging.Logger unexpectedLogger
Deprecated.
-
acceptedLanguages
private java.util.List<java.util.Locale> acceptedLanguages
Deprecated.the unmodifiable List of accepted languages. Lazy initialization by getter.- See Also:
getAcceptableLanguages()
-
acceptedMediaTypes
private java.util.List<javax.ws.rs.core.MediaType> acceptedMediaTypes
Deprecated.The unmodifiable List of acceptedMediaTypes. Lazy initialization by getter.- See Also:
getAcceptableMediaTypes()
-
accMediaTypes
private final SortedMetadata<MediaType> accMediaTypes
Deprecated.
-
baseUri
private java.lang.String baseUri
Deprecated.
-
cookies
private java.util.Map<java.lang.String,javax.ws.rs.core.Cookie> cookies
Deprecated.
-
language
private java.util.Locale language
Deprecated.
-
matchedResources
private final java.util.LinkedList<java.lang.Object> matchedResources
Deprecated.contains the current value of the ancestor resources
-
matchedURIs
private final java.util.LinkedList<java.lang.String> matchedURIs
Deprecated.contains the current value of the ancestor resource URIs
-
mediaType
private javax.ws.rs.core.MediaType mediaType
Deprecated.
-
pathParametersDecoded
private javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> pathParametersDecoded
Deprecated.
-
pathParametersEncoded
private javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> pathParametersEncoded
Deprecated.is null, if no templateParameters given on creation
-
pathSegmentsDecoded
private java.util.List<javax.ws.rs.core.PathSegment> pathSegmentsDecoded
Deprecated.
-
pathSegmentsEncoded
private java.util.List<javax.ws.rs.core.PathSegment> pathSegmentsEncoded
Deprecated.
-
queryParametersDecoded
private javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParametersDecoded
Deprecated.
-
queryParametersEncoded
private javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParametersEncoded
Deprecated.
-
readOnly
private boolean readOnly
Deprecated.
-
referenceCut
private final Reference referenceCut
Deprecated.
-
referenceOriginal
private final Reference referenceOriginal
Deprecated.
-
request
private final Request request
Deprecated.
-
requestHeaders
private UnmodifiableMultivaluedMap<java.lang.String,java.lang.String> requestHeaders
Deprecated.
-
response
private final Response response
Deprecated.
-
-
Method Detail
-
addForMatched
public void addForMatched(java.lang.Object resourceObject, java.lang.String newUriPart)Deprecated.also useable aftersetReadOnly()- Parameters:
resourceObject-newUriPart-- Throws:
java.net.URISyntaxException- See Also:
UriInfo.getMatchedResources(),UriInfo.getMatchedURIs()
-
addPathParamsEnc
public void addPathParamsEnc(java.lang.String varName, java.lang.String varValue)Deprecated.- Parameters:
varName-varValue-
-
checkChangeable
protected void checkChangeable() throws java.lang.IllegalStateExceptionDeprecated.Checks, if this object is changeable. If not, aIllegalStateExceptionis thrown.- Throws:
java.lang.IllegalStateException
-
createExtendedUriBuilder
private ExtendedUriBuilder createExtendedUriBuilder(Reference ref)
Deprecated.
-
createPathSegments
private java.util.List<javax.ws.rs.core.PathSegment> createPathSegments(boolean decode)
Deprecated.Creates an unmodifiable List ofPathSegments.- Parameters:
decode- indicates, if the values should be decoded or not- Returns:
-
createUriBuilder
private javax.ws.rs.core.UriBuilder createUriBuilder(Reference ref)
Deprecated.- Parameters:
ref-- Returns:
- Throws:
java.lang.IllegalArgumentException
-
equals
public boolean equals(java.lang.Object anotherObject)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
evaluatePreconditions
public javax.ws.rs.core.Response.ResponseBuilder evaluatePreconditions()
Deprecated.- Specified by:
evaluatePreconditionsin interfacejavax.ws.rs.core.Request
-
evaluatePreconditions
public javax.ws.rs.core.Response.ResponseBuilder evaluatePreconditions(java.util.Date lastModified)
Deprecated.Evaluate request preconditions based on the passed in value.- Specified by:
evaluatePreconditionsin interfacejavax.ws.rs.core.Request- 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.
- Throws:
java.lang.IllegalArgumentException- if lastModified is nulljava.lang.IllegalStateException- if called outside the scope of a request- See Also:
evaluatePreconditions(Date, EntityTag),Request.evaluatePreconditions(java.util.Date)
-
evaluatePreconditions
public javax.ws.rs.core.Response.ResponseBuilder evaluatePreconditions(java.util.Date lastModified, javax.ws.rs.core.EntityTag entityTag)Deprecated.Evaluate request preconditions based on the passed in value.- Specified by:
evaluatePreconditionsin interfacejavax.ws.rs.core.Request- Parameters:
lastModified- a date that specifies the modification date of the resourceeTag- 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.
- Throws:
java.lang.IllegalArgumentException- if lastModified or eTag is nulljava.lang.IllegalStateException- if called outside the scope of a request- See Also:
Request.evaluatePreconditions(java.util.Date, javax.ws.rs.core.EntityTag), RFC 2616, section 10.3.5: Status 304: Not Modified, RFC 2616, section 10.4.13: Status 412: Precondition Failed, RFC 2616, section 13.3: (Caching) Validation Model, RFC 2616, section 14.24: Header "If-Match", RFC 2616, section 14.25: Header "If-Modified-Since", RFC 2616, section 14.26: Header "If-None-Match", RFC 2616, section 14.28: Header "If-Unmodified-Since"
-
evaluatePreconditions
public javax.ws.rs.core.Response.ResponseBuilder evaluatePreconditions(javax.ws.rs.core.EntityTag entityTag)
Deprecated.Evaluate request preconditions based on the passed in value.- Specified by:
evaluatePreconditionsin interfacejavax.ws.rs.core.Request- 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.
- Throws:
java.lang.IllegalArgumentException- if eTag is nulljava.lang.IllegalStateException- if called outside the scope of a request- See Also:
evaluatePreconditions(Date, EntityTag),Request.evaluatePreconditions(javax.ws.rs.core.EntityTag)
-
evaluatePreconditionsInternal
private javax.ws.rs.core.Response.ResponseBuilder evaluatePreconditionsInternal(java.util.Date lastModified, javax.ws.rs.core.EntityTag entityTag)Deprecated.Evaluates the preconditions of the current request against the given last modified date and / or the given entity tag. This method does not check, if the arguments are not null.- Parameters:
lastModified-entityTag-- Returns:
- See Also:
Request#evaluateConditions(Tag, Date)
-
fillUriBuilder
private javax.ws.rs.core.UriBuilder fillUriBuilder(Reference ref, javax.ws.rs.core.UriBuilder b) throws java.lang.IllegalArgumentException
Deprecated.- Parameters:
ref-b-- Returns:
- Throws:
java.lang.IllegalArgumentException
-
getAbsolutePath
public java.net.URI getAbsolutePath()
Deprecated.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 foruriInfo.getBase().resolve(uriInfo.getPath()).- Returns:
- the absolute path of the request
- See Also:
UriInfo.getAbsolutePath()
-
getAbsolutePathBuilder
public javax.ws.rs.core.UriBuilder getAbsolutePathBuilder()
Deprecated.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.- Returns:
- a UriBuilder initialized with the absolute path of the request.
- See Also:
UriInfo.getAbsolutePathBuilder()
-
getAbsolutePathBuilderExtended
ExtendedUriBuilder getAbsolutePathBuilderExtended()
Deprecated.
-
getAcceptableLanguages
public java.util.List<java.util.Locale> getAcceptableLanguages()
Deprecated.- Specified by:
getAcceptableLanguagesin interfacejavax.ws.rs.core.HttpHeaders- See Also:
HttpHeaders.getAcceptableLanguages()
-
getAcceptableMediaTypes
public java.util.List<javax.ws.rs.core.MediaType> getAcceptableMediaTypes()
Deprecated.For use from JAX-RS interface.- Specified by:
getAcceptableMediaTypesin interfacejavax.ws.rs.core.HttpHeaders- See Also:
HttpHeaders.getAcceptableMediaTypes()
-
getAccMediaTypes
public SortedMetadata<MediaType> getAccMediaTypes()
Deprecated.Returns the accepted media types as RestletMediaTypes.- Returns:
- the accepted
MediaTypes.
-
getAuthenticationScheme
public java.lang.String getAuthenticationScheme()
Deprecated.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:
getAuthenticationSchemein interfacejavax.ws.rs.core.SecurityContext- 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.
- See Also:
SecurityContext.getAuthenticationScheme()
-
getBaseUri
public java.net.URI getBaseUri()
Deprecated.Get the base URI of the application. URIs of resource beans are all relative to this base URI.- Returns:
- the base URI of the application
- See Also:
UriInfo.getBaseUri()
-
getBaseUriBuilder
public javax.ws.rs.core.UriBuilder getBaseUriBuilder()
Deprecated.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.- Returns:
- a UriBuilder initialized with the absolute path of the request.
- See Also:
UriInfo.getAbsolutePathBuilder(),UriInfo.getBaseUriBuilder()
-
getBaseUriBuilderExtended
ExtendedUriBuilder getBaseUriBuilderExtended()
Deprecated.
-
getBaseUriStr
private java.lang.String getBaseUriStr()
Deprecated.
-
getConnegExtension
public java.lang.String getConnegExtension()
Deprecated.Get the request URI extension. The returned string includes any extensions remove during request pre-processing for the purposes of URI-based content negotiation. E.g. if the request URI was:http://example.com/resource.xml.en
this method would return "xml.en" even if an applications implementation ofApplicationConfig#getMediaTypeMappings()returned a map that included "xml" as a key- Returns:
- the request URI extension
- See Also:
javax.ws.rs.core.UriInfo#getConnegExtension()
-
getCookies
public java.util.Map<java.lang.String,javax.ws.rs.core.Cookie> getCookies()
Deprecated.Get any cookies that accompanied the request.- Specified by:
getCookiesin interfacejavax.ws.rs.core.HttpHeaders- Returns:
- a map of cookie name (String) to Cookie.
- See Also:
HttpHeaders.getCookies()
-
getLanguage
public java.util.Locale getLanguage()
Deprecated.- Specified by:
getLanguagein interfacejavax.ws.rs.core.HttpHeaders- See Also:
HttpHeaders.getLanguage()
-
getLastMatrixParamEnc
public java.lang.String getLastMatrixParamEnc(javax.ws.rs.MatrixParam matrixParamAnnot)
Deprecated.Returns the last matrix parameter with the given name; leaves it encoded.- Parameters:
matrixParamAnnot-- Returns:
- the last matrix parameter with the given name; leaves it encoded.
- See Also:
matrixParamEncIter(MatrixParam)
-
getLastPathParamEnc
public java.lang.String getLastPathParamEnc(javax.ws.rs.PathParam annotation)
Deprecated.- Parameters:
annotation-- Returns:
- the last encoded path param with the given name
- See Also:
pathParamEncIter(PathParam)
-
getLastPathSegmentEnc
public java.lang.String getLastPathSegmentEnc(javax.ws.rs.PathParam pathParam)
Deprecated.- Parameters:
pathParam-- Returns:
- .
-
getMatchedResources
java.util.List<java.lang.Object> getMatchedResources()
Deprecated.current state of the matchedResources- See Also:
UriInfo.getMatchedResources()
-
getMatchedURIs
java.util.List<java.lang.String> getMatchedURIs()
Deprecated.current state of the matchedURIs- See Also:
UriInfo.getMatchedURIs()
-
getMediaType
public javax.ws.rs.core.MediaType getMediaType()
Deprecated.Get the media type of the request entity- Specified by:
getMediaTypein interfacejavax.ws.rs.core.HttpHeaders- Returns:
- the media type or null if there is no request entity.
- Throws:
java.lang.IllegalStateException- if called outside the scope of a request- See Also:
HttpHeaders.getMediaType()
-
getMethod
public java.lang.String getMethod()
Deprecated.- Specified by:
getMethodin interfacejavax.ws.rs.core.Request- See Also:
Request.getMethod()
-
getPath
public java.lang.String getPath()
Deprecated.Get the path of the current request relative to the base URI as a string. All sequences of escaped octets are decoded, equivalent togetPath(true).- Returns:
- the relative URI path.
- See Also:
UriInfo.getPath()
-
getPath
public java.lang.String getPath(boolean decode)
Deprecated.Get the path of the current request relative to the base URI as a string.- Parameters:
decode- controls whether sequences of escaped octets are decoded (true) or not (false).- Returns:
- the relative URI path.
- See Also:
UriInfo.getPath(boolean)
-
getPathParameters
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getPathParameters()
Deprecated.Get the values of any embedded URI template parameters. All sequences of escaped octets are decoded, equivalent togetTemplateParameters(true).- Returns:
- an unmodifiable map of parameter names and values
- Throws:
java.lang.IllegalStateException- if called outside the scope of a request- See Also:
Path,UriInfo.getPathParameters()
-
getPathParameters
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getPathParameters(boolean decode)
Deprecated.Get the values of any embedded URI template parameters.- Parameters:
decode- controls whether sequences of escaped octets are decoded (true) or not (false).- Returns:
- an unmodifiable map of parameter names and values
- Throws:
java.lang.IllegalStateException- if called outside the scope of a request- See Also:
Path,UriInfo.getPathParameters(boolean)
-
getPathSegments
public java.util.List<javax.ws.rs.core.PathSegment> getPathSegments()
Deprecated.Get the path of the current request relative to the base URI as a list ofPathSegment. 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 are decoded, equivalent togetPathSegments(true).- Returns:
- an unmodifiable list of
PathSegment. The matrix parameter map of each path segment is also unmodifiable. - Throws:
java.lang.IllegalStateException- if called outside the scope of a request- See Also:
PathSegment,UriInfo.getPathSegments()
-
getPathSegments
public java.util.List<javax.ws.rs.core.PathSegment> getPathSegments(boolean decode)
Deprecated.Get the path of the current request relative to the base URI as a list ofPathSegment. This method is useful when the path needs to be parsed, particularly when matrix parameters may be present in the path.- Parameters:
decode- controls whether sequences of escaped octets are decoded (true) or not (false).- Returns:
- an unmodifiable list of
PathSegment. The matrix parameter map of each path segment is also unmodifiable. - Throws:
java.lang.IllegalStateException- if called outside the scope of a request- See Also:
PathSegment,UriInfo.getPathSegments(boolean)
-
getQueryParameters
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getQueryParameters()
Deprecated.Get the URI query parameters of the current request. All sequences of escaped octets are decoded, equivalent togetQueryParameters(true).- Returns:
- an unmodifiable map of query parameter names and values
- Throws:
java.lang.IllegalStateException- if called outside the scope of a request- See Also:
UriInfo.getQueryParameters()
-
getQueryParameters
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getQueryParameters(boolean decode, boolean caseSensitive)Deprecated.Get the URI query parameters of the current request.- Parameters:
decode- controls whether sequences of escaped octets in parameter names and values are decoded (true) or not (false).caseSensitive- should the parameter name should keep their case, set to true- Returns:
- an unmodifiable map of query parameter names and values
- Throws:
java.lang.IllegalStateException- if called outside the scope of a request- See Also:
UriInfo.getQueryParameters(boolean)
-
getRequest
public Request getRequest()
Deprecated.Returns the RestletRequest- Returns:
- the Restlet
Request
-
getRequestHeader
public java.util.List<java.lang.String> getRequestHeader(java.lang.String headerName)
Deprecated.- Specified by:
getRequestHeaderin interfacejavax.ws.rs.core.HttpHeaders- See Also:
HttpHeaders.getRequestHeader(java.lang.String)
-
getRequestHeaders
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getRequestHeaders()
Deprecated.- Specified by:
getRequestHeadersin interfacejavax.ws.rs.core.HttpHeaders- See Also:
HttpHeaders.getRequestHeaders()
-
getRequestUri
public java.net.URI getRequestUri()
Deprecated.- Returns:
- the absolute request URI
- See Also:
UriInfo.getRequestUri()
-
getRequestUriBuilder
public javax.ws.rs.core.UriBuilder getRequestUriBuilder()
Deprecated.Get the absolute request URI in the form of a UriBuilder.- Returns:
- a UriBuilder initialized with the absolute request URI.
- See Also:
UriInfo.getRequestUriBuilder()
-
getRequestUriBuilderExtended
ExtendedUriBuilder getRequestUriBuilderExtended()
Deprecated.
-
getResponse
public Response getResponse()
Deprecated.Returns the RestletResponse- Returns:
- the Restlet
Response
-
getUserPrincipal
public java.security.Principal getUserPrincipal()
Deprecated.Returns ajava.security.Principalobject containing the name of the current authenticated user. If the user has not been authenticated, the method returns null.- Specified by:
getUserPrincipalin interfacejavax.ws.rs.core.SecurityContext- Returns:
- a
java.security.Principalcontaining the name of the user making this request; null if the user has not been authenticated - See Also:
SecurityContext.getUserPrincipal()
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
interalGetPathParamsEncoded
protected javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> interalGetPathParamsEncoded()
Deprecated.- Returns:
- the pathParametersEncoded
-
isChangeable
protected boolean isChangeable()
Deprecated.
-
isSecure
public boolean isSecure()
Deprecated.Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.- Specified by:
isSecurein interfacejavax.ws.rs.core.SecurityContext- Returns:
trueif the request was made using a secure channel,falseotherwise- See Also:
SecurityContext.isSecure()
-
isUserInRole
public boolean isUserInRole(java.lang.String roleName)
Deprecated.Returns a boolean indicating whether the authenticated user is included in the specified logical "role". If the user has not been authenticated, the method returnsfalse.- Specified by:
isUserInRolein interfacejavax.ws.rs.core.SecurityContext- Parameters:
roleName- aStringspecifying the name of the role- Returns:
- a
booleanindicating whether the user making the request belongs to a given role;falseif the user has not been authenticated - See Also:
SecurityContext.isUserInRole(String)
-
matrixParamEncIter
public java.util.Iterator<java.lang.String> matrixParamEncIter(javax.ws.rs.MatrixParam matrixParamAnnot)
Deprecated.- Parameters:
matrixParamAnnot-- Returns:
- .
- See Also:
getLastMatrixParamEnc(MatrixParam)
-
pathParamEncIter
public java.util.Iterator<java.lang.String> pathParamEncIter(javax.ws.rs.PathParam pathParamAnnot)
Deprecated.- Parameters:
pathParamAnnot-- Returns:
- .
- See Also:
getLastPathParamEnc(PathParam)
-
pathSegementEncIter
public java.util.Iterator<java.lang.String> pathSegementEncIter(javax.ws.rs.PathParam pathParam)
Deprecated.- Parameters:
pathParam-- Returns:
- .
-
selectVariant
public javax.ws.rs.core.Variant selectVariant(java.util.List<javax.ws.rs.core.Variant> variants) throws java.lang.IllegalArgumentExceptionDeprecated.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:
selectVariantin interfacejavax.ws.rs.core.Request- 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 null or empty.- See Also:
Variant.VariantListBuilder,Request.selectVariant(List)
-
setReadOnly
public void setReadOnly()
Deprecated.Sets the Context to be read only. As from now changes are not allowed. This method is intended to be used bysetReadOnly(). Ignored byaddForMatched(Object, String).
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
wrapUriSyntaxExc
private javax.ws.rs.WebApplicationException wrapUriSyntaxExc(java.net.URISyntaxException exc, java.util.logging.Logger logger, java.lang.String logMessage) throws javax.ws.rs.WebApplicationExceptionDeprecated.This method throws anWebApplicationExceptionfor Exceptions where is no planned handling. Logs the exception (warnLevel).- Parameters:
exc- the catched URISyntaxExceptionunexpectedLogger- the unexpectedLogger to log the messadelogMessage- the message to log.- Returns:
- Will never return anything, because the generated WebApplicationException will be thrown. You an formally throw the returned exception (e.g. in a catch block). So the compiler is sure, that the method will be left here.
- Throws:
javax.ws.rs.WebApplicationException- contains the givenException
-
-