Class BaseMapServlet

java.lang.Object
org.mapfish.print.servlet.BaseMapServlet
Direct Known Subclasses:
MapPrinterServlet

public abstract class BaseMapServlet extends Object
Base class for MapPrinter servlets (deals with the configuration loading).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static void
    error(javax.servlet.http.HttpServletResponse httpServletResponse, String message, org.springframework.http.HttpStatus code)
    Send an error to the client with a message.
    protected final 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.
    final 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseMapServlet

      public BaseMapServlet()
  • Method Details

    • error

      protected static void error(javax.servlet.http.HttpServletResponse httpServletResponse, String message, org.springframework.http.HttpStatus code)
      Send an error to the client with a message.
      Parameters:
      httpServletResponse - the response to send the error to.
      message - the message to send
      code - the error code
    • setNoCache

      protected static void setNoCache(javax.servlet.http.HttpServletResponse response)
      Disable caching of the response.
      Parameters:
      response - the response
    • getBaseUrl

      protected final StringBuilder getBaseUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
      Returns the base URL of the print servlet.
      Parameters:
      httpServletRequest - the request
    • setCacheDuration

      public final void setCacheDuration(int cacheDurationInSeconds)
      Set the cache duration for the queries that can be cached.
      Parameters:
      cacheDurationInSeconds - the duration
    • setCache

      protected void setCache(javax.servlet.http.HttpServletResponse response)
      Enable caching of the response.
      Parameters:
      response - the response