Class ResponseHelper

java.lang.Object
org.apache.ofbiz.webapp.webdav.ResponseHelper
Direct Known Subclasses:
PropFindHelper

public class ResponseHelper extends Object
WebDAV response helper class. This class provides helper methods for working with WebDAV requests and responses.
  • Field Details

  • Constructor Details

    • ResponseHelper

      public ResponseHelper()
  • Method Details

    • prepareResponse

      public static void prepareResponse(HttpServletResponse response, int statusCode, String statusString)
    • createElementSetValue

      public Element createElementSetValue(String elementName, String value)
      Create element set value element.
      Parameters:
      elementName - the element name
      value - the value
      Returns:
      the element
    • createHrefElement

      public Element createHrefElement(String hrefUrl)
      Create href element element.
      Parameters:
      hrefUrl - the href url
      Returns:
      the element
    • createMultiStatusElement

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

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

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

      public Element createStatusElement(String statusText)
      Create status element element.
      Parameters:
      statusText - the status text
      Returns:
      the element
    • getResponseDocument

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

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