org.alfresco.repo.webdav
Class PropFindMethod

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

public class PropFindMethod
extends WebDAVMethod

Implements the WebDAV PROPFIND method


Nested Class Summary
 
Nested classes/interfaces inherited from class org.alfresco.repo.webdav.WebDAVMethod
WebDAVMethod.Condition
 
Field Summary
protected static int FIND_PROPS
           
protected static int GET_ALL_PROPS
           
protected static int GET_NAMED_PROPS
           
protected  int m_mode
           
protected  java.util.HashMap m_namespaces
           
protected  java.util.ArrayList m_properties
           
 
Fields inherited from class org.alfresco.repo.webdav.WebDAVMethod
logger, m_childToParent, m_conditions, m_davHelper, m_depth, m_parentLockInfo, m_request, m_resourceTag, m_response, m_rootNodeRef, m_strPath, m_userAgent
 
Constructor Summary
PropFindMethod()
          Default constructor
 
Method Summary
protected  WebDAVProperty createProperty(org.w3c.dom.Node node)
          Creates a WebDAVProperty from the given XML node
protected  org.dom4j.io.XMLWriter createXMLWriter()
          Create an XML writer for the response
protected  void executeImpl()
          Execute the main WebDAV request processing
protected  void generateAllPropertiesResponse(org.dom4j.io.XMLWriter xml, org.alfresco.service.cmr.model.FileInfo nodeInfo, boolean isDir)
          Generates the XML response for a PROPFIND request that asks for all known properties
protected  void generateFindPropertiesResponse(org.dom4j.io.XMLWriter xml, org.alfresco.service.cmr.model.FileInfo nodeInfo, boolean isDir)
          Generates the XML response for a PROPFIND request that asks for a list of all known properties
protected  void generateLockDiscoveryResponse(org.dom4j.io.XMLWriter xml, org.alfresco.service.cmr.model.FileInfo nodeInfo, boolean isDir)
          Generates the XML response snippet showing the lock information for the given path
protected  void generateResponseForNode(org.dom4j.io.XMLWriter xml, org.alfresco.service.cmr.model.FileInfo nodeInfo, java.lang.String path)
          Generates the required response XML for the current node
 int getMode()
          Return the find mode
protected  boolean isReadOnly()
          Override and return true if the method is a query method only.
protected  void parseRequestBody()
          Parse the request body
protected  void parseRequestHeaders()
          Parse the request headers
protected  void writeLockTypes(org.dom4j.io.XMLWriter xml)
          Output the supported lock types XML element
 
Methods inherited from class org.alfresco.repo.webdav.WebDAVMethod
checkNode, checkNode, execute, flushXML, generateLockDiscoveryXML, generateLockDiscoveryXML, generateNamespaceDeclarations, getActionService, getAuthenticationService, getContentService, getDAVHelper, getDepth, getFileFolderService, getLockService, getMimetypeService, getNamespaceService, getNodeForPath, getNodeLockInfo, getNodeService, getPath, getPermissionService, getRequestBodyAsDocument, getRootNodeRef, getSearchService, getServiceRegistry, getServletPath, getStatusForAccessDeniedException, getTransactionService, getURLForPath, getWorkingCopy, parseDepthHeader, parseIfHeader, setDetails, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GET_ALL_PROPS

protected static final int GET_ALL_PROPS
See Also:
Constant Field Values

GET_NAMED_PROPS

protected static final int GET_NAMED_PROPS
See Also:
Constant Field Values

FIND_PROPS

protected static final int FIND_PROPS
See Also:
Constant Field Values

m_mode

protected int m_mode

m_properties

protected java.util.ArrayList m_properties

m_namespaces

protected java.util.HashMap m_namespaces
Constructor Detail

PropFindMethod

public PropFindMethod()
Default constructor

Method Detail

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,
                           java.lang.Exception
Execute the main WebDAV request processing

Specified by:
executeImpl in class WebDAVMethod
Throws:
WebDAVServerException
java.lang.Exception - any unhandled exception

createXMLWriter

protected org.dom4j.io.XMLWriter createXMLWriter()
                                          throws java.io.IOException
Description copied from class: WebDAVMethod
Create an XML writer for the response

Overrides:
createXMLWriter in class WebDAVMethod
Returns:
XMLWriter
Throws:
java.io.IOException

createProperty

protected WebDAVProperty createProperty(org.w3c.dom.Node node)
Creates a WebDAVProperty from the given XML node


generateResponseForNode

protected void generateResponseForNode(org.dom4j.io.XMLWriter xml,
                                       org.alfresco.service.cmr.model.FileInfo nodeInfo,
                                       java.lang.String path)
                                throws java.lang.Exception
Generates the required response XML for the current node

Parameters:
xml - XMLWriter
node - NodeRef
path - String
Throws:
java.lang.Exception

generateAllPropertiesResponse

protected void generateAllPropertiesResponse(org.dom4j.io.XMLWriter xml,
                                             org.alfresco.service.cmr.model.FileInfo nodeInfo,
                                             boolean isDir)
                                      throws java.lang.Exception
Generates the XML response for a PROPFIND request that asks for all known properties

Parameters:
xml - XMLWriter
node - NodeRef
isDir - boolean
Throws:
java.lang.Exception

generateFindPropertiesResponse

protected void generateFindPropertiesResponse(org.dom4j.io.XMLWriter xml,
                                              org.alfresco.service.cmr.model.FileInfo nodeInfo,
                                              boolean isDir)
Generates the XML response for a PROPFIND request that asks for a list of all known properties

Parameters:
xml - XMLWriter
node - NodeRef
isDir - boolean

generateLockDiscoveryResponse

protected void generateLockDiscoveryResponse(org.dom4j.io.XMLWriter xml,
                                             org.alfresco.service.cmr.model.FileInfo nodeInfo,
                                             boolean isDir)
                                      throws java.lang.Exception
Generates the XML response snippet showing the lock information for the given path

Parameters:
xml - XMLWriter
node - NodeRef
isDir - boolean
Throws:
java.lang.Exception

writeLockTypes

protected void writeLockTypes(org.dom4j.io.XMLWriter xml)
Output the supported lock types XML element

Parameters:
xml - XMLWriter


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.