Package org.alfresco.repo.webdav
Class PropFindMethod
java.lang.Object
org.alfresco.repo.webdav.WebDAVMethod
org.alfresco.repo.webdav.PropFindMethod
- Direct Known Subclasses:
PropPatchMethod
Implements the WebDAV PROPFIND method
- Author:
- Gavin Cornwell
-
Nested Class Summary
Nested classes/interfaces inherited from class org.alfresco.repo.webdav.WebDAVMethod
WebDAVMethod.Condition
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
protected static final int
protected static final int
protected int
protected ArrayList<WebDAVProperty>
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected WebDAVProperty
createProperty
(Node node) Creates a WebDAVProperty from the given XML nodeprotected void
Execute the main WebDAV request processingprotected void
generateAllPropertiesResponse
(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, boolean isDir) Generates the XML response for a PROPFIND request that asks for all known propertiesprotected 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 propertiesprotected void
generateLockDiscoveryResponse
(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, boolean isDir) Generates the XML response snippet showing the lock information for the given pathprotected void
generateResponseForNode
(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, String path) Generates the required response XML for the current nodefinal int
getMode()
Return the find modeprotected org.dom4j.io.OutputFormat
Returns the format required for an XML response.protected boolean
Override and return true if the method is a query method only.loadDeadProperties
(NodeRef nodeRef) Loads all dead properties persisted on the nodeprotected void
Parse the request bodyprotected void
Parse the request headersprotected void
persistDeadProperties
(NodeRef nodeRef, Map<org.alfresco.service.namespace.QName, String> deadProperties) Persists dead properties for specified resourceprotected void
writeLockTypes
(org.dom4j.io.XMLWriter xml) Output the supported lock types XML elementMethods inherited from class org.alfresco.repo.webdav.WebDAVMethod
checkNode, checkNode, createXMLWriter, execute, flushXML, generateLockDiscoveryXML, generateLockDiscoveryXML, generateNamespaceDeclarations, generateResponseImpl, getActionService, getAuthenticationService, getContentService, getContextPath, getDAVHelper, getDAVLockService, getDepth, getFileFolderService, getMimetypeService, getNamespaceService, getNodeForPath, getNodeLockInfo, getNodeService, getPath, getPermissionService, getRequestBodyAsDocument, getRootNodeRef, getSearchService, getServiceRegistry, getServletPath, getSiteId, getStatusForAccessDeniedException, getTenantDomain, getTransactionService, getURLForPath, getWorkingCopy, parseDepthHeader, parseIfHeader, setDetails, shouldFlushXMLWriter, toString
-
Field Details
-
GET_ALL_PROPS
protected static final int GET_ALL_PROPS- See Also:
-
GET_NAMED_PROPS
protected static final int GET_NAMED_PROPS- See Also:
-
FIND_PROPS
protected static final int FIND_PROPS- See Also:
-
m_mode
protected int m_mode -
m_properties
-
m_namespaces
-
-
Constructor Details
-
PropFindMethod
public PropFindMethod()Default constructor
-
-
Method Details
-
getMode
public final int getMode()Return the find mode- Returns:
- int
-
parseRequestHeaders
Parse the request headers- Specified by:
parseRequestHeaders
in classWebDAVMethod
- Throws:
WebDAVServerException
-
parseRequestBody
Parse the request body- Specified by:
parseRequestBody
in classWebDAVMethod
- 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 classWebDAVMethod
- Returns:
- Returns true always
-
executeImpl
Execute the main WebDAV request processing- Specified by:
executeImpl
in classWebDAVMethod
- 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 classWebDAVMethod
-
createProperty
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
- XMLWriternodeInfo
- FileInfopath
- 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
- XMLWriternodeInfo
- FileInfoisDir
- 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
- XMLWriternodeInfo
- FileInfoisDir
- 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
- XMLWriternodeInfo
- FileInfoisDir
- boolean- Throws:
Exception
-
writeLockTypes
protected void writeLockTypes(org.dom4j.io.XMLWriter xml) Output the supported lock types XML element- Parameters:
xml
- XMLWriter
-
loadDeadProperties
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 resourcedeadProperties
- the properties to persist
-