public interface TilesRequestContext
Modifier and Type | Method and Description |
---|---|
void |
dispatch(java.lang.String path)
Dispatches the request to a specified path.
|
TilesApplicationContext |
getApplicationContext()
Returns the associated application context.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeader()
Return an immutable Map that maps header names to the first (or only)
header value (as a String).
|
java.util.Map<java.lang.String,java.lang.String[]> |
getHeaderValues()
Return an immutable Map that maps header names to the set of all values
specified in the request (as a String array).
|
java.io.OutputStream |
getOutputStream()
Returns an output stream to be used to write directly in the response.
|
java.util.Map<java.lang.String,java.lang.String> |
getParam()
Return an immutable Map that maps request parameter names to the first
(or only) value (as a String).
|
java.util.Map<java.lang.String,java.lang.String[]> |
getParamValues()
Return an immutable Map that maps request parameter names to the set of
all values (as a String array).
|
java.io.PrintWriter |
getPrintWriter()
Returns a print writer to be used to write directly in the response.
|
java.lang.Object |
getRequest()
Deprecated.
Use
getRequestObjects() . |
java.util.Locale |
getRequestLocale()
Return the preferred Locale in which the client will accept content.
|
java.lang.Object[] |
getRequestObjects()
Returns the original request objects used to create this request.
|
java.util.Map<java.lang.String,java.lang.Object> |
getRequestScope()
Return a mutable Map that maps request scope attribute names to their
values.
|
java.lang.Object |
getResponse()
Deprecated.
Use
getRequestObjects() . |
java.util.Map<java.lang.String,java.lang.Object> |
getSessionScope()
Return a mutable Map that maps session scope attribute names to their
values.
|
java.io.Writer |
getWriter()
Returns a writer to be used to write directly in the response.
|
void |
include(java.lang.String path)
Includes the response from the specified URL in the current response output.
|
boolean |
isResponseCommitted()
Checks if the response has been committed.
|
boolean |
isUserInRole(java.lang.String role)
Determine whether or not the specified user is in the given role.
|
void |
setContentType(java.lang.String contentType)
Sets the content type when rendering the result.
|
java.util.Map<java.lang.String,java.lang.String> getHeader()
java.util.Map<java.lang.String,java.lang.String[]> getHeaderValues()
java.util.Map<java.lang.String,java.lang.Object> getRequestScope()
java.util.Map<java.lang.String,java.lang.Object> getSessionScope()
TilesApplicationContext getApplicationContext()
void dispatch(java.lang.String path) throws java.io.IOException
path
- The path to dispatch to.java.io.IOException
- If something goes wrong during dispatching.void include(java.lang.String path) throws java.io.IOException
path
- The path to include.java.io.IOException
- If something goes wrong during inclusion.java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
- If something goes wrong when getting the output stream.java.io.Writer getWriter() throws java.io.IOException
java.io.IOException
- If something goes wrong when getting the writer.java.io.PrintWriter getPrintWriter() throws java.io.IOException
java.io.IOException
- If something goes wrong when getting the print
writer.void setContentType(java.lang.String contentType)
contentType
- The content type. It should follow the specifications
from W3C about content types.boolean isResponseCommitted()
true
only if the response has been committed.java.util.Map<java.lang.String,java.lang.String> getParam()
java.util.Map<java.lang.String,java.lang.String[]> getParamValues()
java.util.Locale getRequestLocale()
LocaleResolver
to implement strategies to
resolve locales.boolean isUserInRole(java.lang.String role)
role
- the role to check against.true
if the user is in the given role.java.lang.Object[] getRequestObjects()
@Deprecated java.lang.Object getRequest()
getRequestObjects()
.@Deprecated java.lang.Object getResponse()
getRequestObjects()
.