public class TrellisRequest extends Object
Constructor and Description |
---|
TrellisRequest(Request request,
UriInfo uriInfo,
HttpHeaders headers)
Bundle together some request contexts.
|
TrellisRequest(Request request,
UriInfo uriInfo,
HttpHeaders headers,
SecurityContext secCtx)
Bundle together some request contexts.
|
Modifier and Type | Method and Description |
---|---|
List<MediaType> |
getAcceptableMediaTypes()
Get the HTTP headers.
|
String |
getBaseUrl()
Get a base url value.
|
String |
getContentType()
Get the Content-Type header.
|
AcceptDatetime |
getDatetime()
Get the Accept-Datetime value.
|
String |
getExt()
Get the ext value.
|
MultivaluedMap<String,String> |
getHeaders()
Get all of the headers.
|
Link |
getLink()
Get the Link header.
|
String |
getMethod()
Get the HTTP method.
|
String |
getPath()
Get the path.
|
Prefer |
getPrefer()
Get the prefer header.
|
Range |
getRange()
Get the range header.
|
SecurityContext |
getSecurityContext()
Get the security context.
|
String |
getSlug()
Get the slug header.
|
Version |
getVersion()
Get the version value.
|
boolean |
hasTrailingSlash()
Test whether the path has a trailing slash.
|
public TrellisRequest(Request request, UriInfo uriInfo, HttpHeaders headers)
request
- the Request objecturiInfo
- the URI informationheaders
- the HTTP headerspublic TrellisRequest(Request request, UriInfo uriInfo, HttpHeaders headers, SecurityContext secCtx)
request
- the Request objecturiInfo
- the URI informationheaders
- the HTTP headerssecCtx
- the security contextpublic String getContentType()
public String getSlug()
public Link getLink()
public AcceptDatetime getDatetime()
public Prefer getPrefer()
public Range getRange()
public String getPath()
This method returns a normalized resource path for use with internal
identifiers. That means that any trailing slash will not be present. Please
see the hasTrailingSlash()
method to check for a trailing slash.
public boolean hasTrailingSlash()
public Version getVersion()
public String getExt()
public String getBaseUrl()
public SecurityContext getSecurityContext()
public String getMethod()
public MultivaluedMap<String,String> getHeaders()