Class ResponseHelper

  • Direct Known Subclasses:
    PropFindHelper

    public class ResponseHelper
    extends java.lang.Object
    WebDAV response helper class. This class provides helper methods for working with WebDAV requests and responses.
    • Constructor Detail

      • ResponseHelper

        public ResponseHelper()
    • Method Detail

      • prepareResponse

        public static void prepareResponse​(HttpServletResponse response,
                                           int statusCode,
                                           java.lang.String statusString)
      • createElementSetValue

        public org.w3c.dom.Element createElementSetValue​(java.lang.String elementName,
                                                         java.lang.String value)
        Create element set value element.
        Parameters:
        elementName - the element name
        value - the value
        Returns:
        the element
      • createHrefElement

        public org.w3c.dom.Element createHrefElement​(java.lang.String hrefUrl)
        Create href element element.
        Parameters:
        hrefUrl - the href url
        Returns:
        the element
      • createMultiStatusElement

        public org.w3c.dom.Element createMultiStatusElement()
        Create multi status element element.
        Returns:
        the element
      • createResponseDescriptionElement

        public org.w3c.dom.Element createResponseDescriptionElement​(java.lang.String description,
                                                                    java.lang.String lang)
        Create response description element element.
        Parameters:
        description - the description
        lang - the lang
        Returns:
        the element
      • createResponseElement

        public org.w3c.dom.Element createResponseElement()
        Create response element element.
        Returns:
        the element
      • createStatusElement

        public org.w3c.dom.Element createStatusElement​(java.lang.String statusText)
        Create status element element.
        Parameters:
        statusText - the status text
        Returns:
        the element
      • getResponseDocument

        public org.w3c.dom.Document getResponseDocument()
        Gets response document.
        Returns:
        the response document
      • writeResponse

        public void writeResponse​(HttpServletResponse response,
                                  java.io.Writer writer)
                           throws java.io.IOException
        Write response.
        Parameters:
        response - the response
        writer - the writer
        Throws:
        java.io.IOException - the io exception