public abstract class BaseMapServlet
extends java.lang.Object
| Constructor and Description |
|---|
BaseMapServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String |
cleanUpName(java.lang.String original)
Remove commas and whitespace from a string.
|
protected static void |
error(javax.servlet.http.HttpServletResponse httpServletResponse,
java.lang.String message,
org.springframework.http.HttpStatus code)
Send an error to the client with a message.
|
protected void |
error(javax.servlet.http.HttpServletResponse httpServletResponse,
java.lang.Throwable e)
Send an error to the client with an exception.
|
static java.lang.String |
findReplacement(java.lang.String variableName,
java.util.Date date)
Update a variable name with a date if the variable is detected as being a date.
|
protected java.lang.StringBuilder |
getBaseUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
Returns the base URL of the print servlet.
|
protected void |
setCache(javax.servlet.http.HttpServletResponse response)
Enable caching of the response.
|
void |
setCacheDuration(int cacheDurationInSeconds)
Set the cache duration for the queries that can be cached.
|
protected static void |
setNoCache(javax.servlet.http.HttpServletResponse response)
Disable caching of the response.
|
protected static java.lang.String cleanUpName(java.lang.String original)
original - the starting string.public static java.lang.String findReplacement(java.lang.String variableName,
java.util.Date date)
variableName - the variable name.date - the date to replace the value with if the variable is a date variable.protected static final void error(javax.servlet.http.HttpServletResponse httpServletResponse,
java.lang.String message,
org.springframework.http.HttpStatus code)
httpServletResponse - the response to send the error to.message - the message to sendcode - the error codeprotected static void setNoCache(javax.servlet.http.HttpServletResponse response)
response - the responseprotected final void error(javax.servlet.http.HttpServletResponse httpServletResponse,
java.lang.Throwable e)
httpServletResponse - the http response to send the error toe - the error that occurredprotected final java.lang.StringBuilder getBaseUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - the requestpublic final void setCacheDuration(int cacheDurationInSeconds)
cacheDurationInSeconds - the durationprotected void setCache(javax.servlet.http.HttpServletResponse response)
response - the response