Class CatWebdavContext


  • public class CatWebdavContext
    extends WebdavContext
    A JCMS Representation of a Webdav Context using Category for folders and FileDocument for files
    Authentification use BASIC authentification and store result in a cookie.
    Since:
    jcms-5.5.0
    Author:
    Jean-Philippe Encausse
    • Field Detail

      • loggedMember

        protected Member loggedMember
      • webdavIpNoPattern

        protected static boolean webdavIpNoPattern
      • webdavIpPattern

        protected static org.apache.oro.text.regex.Pattern webdavIpPattern
      • cachedDestinationHeader

        protected java.lang.String cachedDestinationHeader
      • cachedPathHeader

        protected java.lang.String cachedPathHeader
    • Constructor Detail

      • CatWebdavContext

        public CatWebdavContext()
    • Method Detail

      • init

        public void init​(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse res,
                         javax.servlet.ServletConfig conf)
        Description copied from class: WebdavContext
        This method will initialize the WebdavContext with given HttpServletRequest, HttpServletResponse, and ServletConfig.
        Overrides:
        init in class WebdavContext
        Parameters:
        req - the HttpServletRequest
        res - the HttpServletResponse
        conf - the ServletConfig
        See Also:
        WebdavContext.init(HttpServletRequest, HttpServletResponse, ServletConfig)
      • isValideIP

        public boolean isValideIP()
      • requestAuthentication

        public static boolean requestAuthentication​(javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
        Check if a member has already been logged and otherwise request the WebDAV HTTP authentcation Basic/Digest
        Parameters:
        request - the HttpServletRequest for which the authentication should be checked
        response - the HttpServletResponse in which authentication should be requested if needed
        Returns:
        true if the HTTP authentication was requested, false if nothing was performed
      • updateProperties

        public static void updateProperties()
      • getDestinationHeader

        public java.lang.String getDestinationHeader()
        Overrides WebdavContext methods to decode jcmsIds in the path. The computation is cached for the request duration.
        Overrides:
        getDestinationHeader in class WebdavContext
        Returns:
        String the decoded path
      • getPathHeader

        public java.lang.String getPathHeader()
        Overrides WebdavContext methods to decode jcmsIds in the path. The computation is cached for the request duration.
        Overrides:
        getPathHeader in class WebdavContext
        Returns:
        String the decoded path
      • getLoggedMember

        public Member getLoggedMember()
        Returns:
        Member the authentifiend LoggedMember
      • getJcmsContext

        public JcmsContext getJcmsContext()
        Returns:
        JcmsContext the JcmsContext