Class RequestHelper


  • public class RequestHelper
    extends java.lang.Object
    RequestHelper...
    • Constructor Summary

      Constructors 
      Constructor Description
      RequestHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean handleIfModifiedSince​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, javax.jcr.Node node)
      Checks if the request contains a if-last-modified-since header and if the node has a jcr:lastModified property.
      static boolean handleIfModifiedSince​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, ValueMap properties)
      Checks if the request contains a if-last-modified-since header and if the properties have a jcr:lastModified property.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestHelper

        public RequestHelper()
    • Method Detail

      • handleIfModifiedSince

        public static boolean handleIfModifiedSince​(javax.servlet.http.HttpServletRequest req,
                                                    javax.servlet.http.HttpServletResponse resp,
                                                    ValueMap properties)
        Checks if the request contains a if-last-modified-since header and if the properties have a jcr:lastModified property. if the properties were modified before the header a 304 is sent otherwise the response last modified header is set.
        Parameters:
        req - the request
        resp - the response
        properties - the properties
        Returns:
        true if the response was sent
      • handleIfModifiedSince

        public static boolean handleIfModifiedSince​(javax.servlet.http.HttpServletRequest req,
                                                    javax.servlet.http.HttpServletResponse resp,
                                                    javax.jcr.Node node)
        Checks if the request contains a if-last-modified-since header and if the node has a jcr:lastModified property. if the properties were modified before the header a 304 is sent otherwise the response last modified header is set. If the give doesn't have the property, the parent node is searched.
        Parameters:
        req - the request
        resp - the response
        node - the current node
        Returns:
        true if the response was sent