public class DecoraManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,char[]> |
contentMap |
protected boolean |
decorateErrorPages |
static java.lang.String |
DEFAULT_DECORATOR |
protected java.util.Map<java.lang.String,java.io.File> |
filesMap |
Constructor and Description |
---|
DecoraManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
decorateContentType(java.lang.String contentType,
java.lang.String mimeType,
java.lang.String encoding)
Determines if some content type should be decorated.
|
boolean |
decorateRequest(javax.servlet.http.HttpServletRequest request)
Determines if a request should be decorated.
|
boolean |
decorateStatusCode(int statusCode)
Determines if buffering should be used for some HTTP status code.
|
static DecoraManager |
get()
Returns Decora manager.
|
boolean |
isDecorateErrorPages() |
char[] |
lookupDecoratorContent(java.lang.String path)
Lookups the decorator for given decorator path.
|
DecoraManager |
registerDecorator(java.lang.String path,
char[] content) |
DecoraManager |
registerDecorator(java.lang.String path,
java.io.File decorator) |
java.lang.String |
resolveDecorator(javax.servlet.http.HttpServletRequest request,
java.lang.String actionPath)
Resolves decorator path based on request and action path.
|
void |
setDecorateErrorPages(boolean decorateErrorPages) |
public static final java.lang.String DEFAULT_DECORATOR
protected boolean decorateErrorPages
protected java.util.Map<java.lang.String,char[]> contentMap
protected java.util.Map<java.lang.String,java.io.File> filesMap
public static DecoraManager get()
public boolean isDecorateErrorPages()
public void setDecorateErrorPages(boolean decorateErrorPages)
public DecoraManager registerDecorator(java.lang.String path, char[] content)
public DecoraManager registerDecorator(java.lang.String path, java.io.File decorator)
public char[] lookupDecoratorContent(java.lang.String path)
null
if decorator is not registered, indicating that content should be
read using the dispatcher.public boolean decorateRequest(javax.servlet.http.HttpServletRequest request)
true
.public boolean decorateContentType(java.lang.String contentType, java.lang.String mimeType, java.lang.String encoding)
true
.public boolean decorateStatusCode(int statusCode)
true
for status code 200 and, optionally,
for error pages (status code >= 400).public java.lang.String resolveDecorator(javax.servlet.http.HttpServletRequest request, java.lang.String actionPath)
null
.
By default applies decorator on all *.html pages.Copyright © 2003-present Jodd Team