public final class HttpContentRequest extends HttpRequestWrapper implements ContentRequest
ServletRequest
instance and provide methods to access the parameters and attributes in
a consistent manner.Modifier | Constructor and Description |
---|---|
protected |
HttpContentRequest(org.pageseeder.berlioz.servlet.CoreHttpRequest core,
Map<String,String> parameters,
ContentGenerator generator,
Service service,
int order)
Creates a new wrapper around the specified HTTP servlet request.
|
Modifier and Type | Method and Description |
---|---|
ContentGenerator |
generator()
Returns the generator for which this request is used for.
|
protected long |
getProfileEtag() |
String |
getRedirectURL()
Returns the URL to redirect to.
|
Service |
getService()
Service the generator is part of.
|
ContentStatus |
getStatus()
Returns the status of this request.
|
protected int |
order() |
protected void |
setProfileEtag(long profile) |
void |
setRedirect(String url,
ContentStatus status)
Sets the status of this request.
|
void |
setStatus(ContentStatus status)
Sets the status of this request.
|
getAttribute, getBerliozPath, getBerliozPath, getCookies, getDateParameter, getEnvironment, getHttpRequest, getHttpResponse, getIntParameter, getLocation, getParameter, getParameter, getParameterNames, getParameterValues, getPathInfo, getSession, isMultipartContent, setAttribute, toParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getBerliozPath, getCookies, getDateParameter, getEnvironment, getIntParameter, getLocation, getParameter, getParameter, getParameterNames, getParameterValues, getPathInfo, getSession, setAttribute
protected HttpContentRequest(org.pageseeder.berlioz.servlet.CoreHttpRequest core, Map<String,String> parameters, ContentGenerator generator, Service service, int order)
core
- The common HTTP info.parameters
- The parameters to use.generator
- The generator for which this request is for.service
- The service this request is part of.order
- The order in which this request is called.IllegalArgumentException
- If the request is null
.public void setStatus(ContentStatus status)
setStatus
in interface ContentRequest
status
- the status of this request.NullPointerException
- if the status is null
.IllegalArgumentException
- if the status is a redirect status.public void setRedirect(String url, ContentStatus status)
setRedirect
in interface ContentRequest
url
- The URL to redirect to.status
- The status code to use (required).NullPointerException
- if the URL is null
.IllegalArgumentException
- if the status is not a redirect status.public ContentStatus getStatus()
public ContentGenerator generator()
public Service getService()
public String getRedirectURL()
null
).protected int order()
protected void setProfileEtag(long profile)
profile
- Nano time for the etagprotected long getProfileEtag()
Copyright © 2016 Allette Systems. All rights reserved.