Class ExportServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    Direct Known Subclasses:
    CsvServlet, ExcelExportServlet, SylkServlet

    public class ExportServlet
    extends javax.servlet.http.HttpServlet
    Servlet providing the base class for ExcelExportServlet, SylkServlet and CsvServlet. For now, the class handles the maxRowsDefault parameter that's common to all these servlets. It provides method getMaxRows that can be overwritten for a custom logic on the export rows limit.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int maxRowsDefault  
    • Constructor Summary

      Constructors 
      Constructor Description
      ExportServlet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getMaxRows​(javax.servlet.http.HttpServletRequest request, int defValue)
      Returns the maxRows value from subject setting bcdExport:maxRows
      protected java.lang.String getMaxRowsUserPermissionType()  
      void init​(javax.servlet.ServletConfig config)  
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • maxRowsDefault

        protected int maxRowsDefault
    • Constructor Detail

      • ExportServlet

        public ExportServlet()
    • Method Detail

      • init

        public void init​(javax.servlet.ServletConfig config)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
      • getMaxRows

        public int getMaxRows​(javax.servlet.http.HttpServletRequest request,
                              int defValue)
        Returns the maxRows value from subject setting bcdExport:maxRows
        Parameters:
        defValue - fallback default value
        Returns:
        either the given default value or the value coming from subjectSettings (if it's a valid integer)
      • getMaxRowsUserPermissionType

        protected java.lang.String getMaxRowsUserPermissionType()