Class WrsServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
de.businesscode.bcdui.web.wrs.WrsServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class WrsServlet extends jakarta.servlet.http.HttpServlet
Servlet for calling Wrs services GET: It turns a WrsRequest into SQL and returns a Wrs document with wrs:R rows POST: It turns a Wrs into updates of the database based on wrs:M wrs:D rows
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
    WrsServlet
  • Method Summary

    Modifier and Type
    Method
    Description
    protected IDataWriter
    createDataWriter(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, IRequestOptions options)
    create data writer
    protected void
    doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
     
    protected void
    doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
     
    static Map<String,Long>
     
    void
    init(jakarta.servlet.ServletConfig config)
     
    protected void
    tagUpdate(String resourceUri)
    tags a resource (which is set by pathInfo) with current millis, which is considered as a lastModified tag on that resource
    static boolean
    wasResourceModified(String resourceUri, Long lastReadStamp)
    convenience method
    static boolean
    wasResourceModified(String resourceUri, Date lastReadDate)
    convenience method to check if given resource has been modified

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, isSensitiveHeader, service, service

    Methods inherited from class jakarta.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 Details

    • maxRowsDefault

      protected int maxRowsDefault
  • Constructor Details

    • WrsServlet

      public WrsServlet()
      WrsServlet
  • Method Details

    • getLastModifiedResourceMap

      public static Map<String,Long> getLastModifiedResourceMap()
      Returns:
      the IMMUTABLE map containing lastModified resources with their timestamps
    • wasResourceModified

      public static boolean wasResourceModified(String resourceUri, Date lastReadDate)
      convenience method to check if given resource has been modified
      Parameters:
      resourceUri - Resource to be checked
      lastReadDate - if this parameter is NULL the method returns TRUE as is assumes the resource has never been read
      Returns:
      true if the given resource has been modified
    • wasResourceModified

      public static boolean wasResourceModified(String resourceUri, Long lastReadStamp)
      convenience method
      Parameters:
      resourceUri - Resource to be checked
      lastReadStamp - if this parameter is NULL the method returns TRUE as is assumes the resource has never been read
      Returns:
      true if the given resource has been modified
    • init

      public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException
      Specified by:
      init in interface jakarta.servlet.Servlet
      Overrides:
      init in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      See Also:
      • GenericServlet.init(jakarta.servlet.ServletConfig)
    • doGet

      protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException
      See Also:
      • HttpServlet.doGet(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)
    • createDataWriter

      protected IDataWriter createDataWriter(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, IRequestOptions options)
      create data writer
      Parameters:
      request -
      response -
      options -
      Returns:
    • doPost

      protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      Overrides:
      doPost in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException
      See Also:
      • HttpServlet.doPost(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)
    • tagUpdate

      protected void tagUpdate(String resourceUri)
      tags a resource (which is set by pathInfo) with current millis, which is considered as a lastModified tag on that resource
      Parameters:
      resourceUri -