Class PropFindMethod

java.lang.Object
org.alfresco.repo.webdav.WebDAVMethod
org.alfresco.repo.webdav.PropFindMethod
Direct Known Subclasses:
PropPatchMethod

public class PropFindMethod extends WebDAVMethod
Implements the WebDAV PROPFIND method
Author:
Gavin Cornwell
  • Field Details

  • Constructor Details

    • PropFindMethod

      public PropFindMethod()
      Default constructor
  • Method Details

    • getMode

      public final int getMode()
      Return the find mode
      Returns:
      int
    • parseRequestHeaders

      protected void parseRequestHeaders() throws WebDAVServerException
      Parse the request headers
      Specified by:
      parseRequestHeaders in class WebDAVMethod
      Throws:
      WebDAVServerException
    • parseRequestBody

      protected void parseRequestBody() throws WebDAVServerException
      Parse the request body
      Specified by:
      parseRequestBody in class WebDAVMethod
      Throws:
      WebDAVServerException
    • isReadOnly

      protected boolean isReadOnly()
      Description copied from class: WebDAVMethod
      Override and return true if the method is a query method only. The default implementation returns false.
      Overrides:
      isReadOnly in class WebDAVMethod
      Returns:
      Returns true always
    • executeImpl

      protected void executeImpl() throws WebDAVServerException, Exception
      Execute the main WebDAV request processing
      Specified by:
      executeImpl in class WebDAVMethod
      Throws:
      WebDAVServerException
      Exception - any unhandled exception
    • getXMLOutputFormat

      protected org.dom4j.io.OutputFormat getXMLOutputFormat()
      Description copied from class: WebDAVMethod
      Returns the format required for an XML response. This may vary per method.
      Overrides:
      getXMLOutputFormat in class WebDAVMethod
    • createProperty

      protected WebDAVProperty createProperty(Node node)
      Creates a WebDAVProperty from the given XML node
    • generateResponseForNode

      protected void generateResponseForNode(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, String path) throws Exception
      Generates the required response XML for the current node
      Parameters:
      xml - XMLWriter
      nodeInfo - FileInfo
      path - String
      Throws:
      Exception
    • generateAllPropertiesResponse

      protected void generateAllPropertiesResponse(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, boolean isDir) throws Exception
      Generates the XML response for a PROPFIND request that asks for all known properties
      Parameters:
      xml - XMLWriter
      nodeInfo - FileInfo
      isDir - boolean
      Throws:
      Exception
    • generateFindPropertiesResponse

      protected void generateFindPropertiesResponse(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, boolean isDir)
      Generates the XML response for a PROPFIND request that asks for a list of all known properties
      Parameters:
      xml - XMLWriter
      nodeInfo - FileInfo
      isDir - boolean
    • generateLockDiscoveryResponse

      protected void generateLockDiscoveryResponse(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, boolean isDir) throws Exception
      Generates the XML response snippet showing the lock information for the given path
      Parameters:
      xml - XMLWriter
      nodeInfo - FileInfo
      isDir - boolean
      Throws:
      Exception
    • writeLockTypes

      protected void writeLockTypes(org.dom4j.io.XMLWriter xml)
      Output the supported lock types XML element
      Parameters:
      xml - XMLWriter
    • loadDeadProperties

      protected Map<org.alfresco.service.namespace.QName,String> loadDeadProperties(NodeRef nodeRef)
      Loads all dead properties persisted on the node
      Parameters:
      nodeRef - NodeRef
      Returns:
      the map of all dead properties
    • persistDeadProperties

      protected void persistDeadProperties(NodeRef nodeRef, Map<org.alfresco.service.namespace.QName,String> deadProperties)
      Persists dead properties for specified resource
      Parameters:
      nodeRef - specified resource
      deadProperties - the properties to persist