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 intprotected static final intprotected static final intprotected intprotected 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 WebDAVPropertycreateProperty(Node node) Creates a WebDAVProperty from the given XML nodeprotected voidExecute the main WebDAV request processingprotected voidgenerateAllPropertiesResponse(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, boolean isDir) Generates the XML response for a PROPFIND request that asks for all known propertiesprotected voidgenerateFindPropertiesResponse(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 voidgenerateLockDiscoveryResponse(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, boolean isDir) Generates the XML response snippet showing the lock information for the given pathprotected voidgenerateResponseForNode(org.dom4j.io.XMLWriter xml, FileInfo nodeInfo, String path) Generates the required response XML for the current nodefinal intgetMode()Return the find modeprotected org.dom4j.io.OutputFormatReturns the format required for an XML response.protected booleanOverride and return true if the method is a query method only.loadDeadProperties(NodeRef nodeRef) Loads all dead properties persisted on the nodeprotected voidParse the request bodyprotected voidParse the request headersprotected voidpersistDeadProperties(NodeRef nodeRef, Map<org.alfresco.service.namespace.QName, String> deadProperties) Persists dead properties for specified resourceprotected voidwriteLockTypes(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:
parseRequestHeadersin classWebDAVMethod- Throws:
WebDAVServerException
-
parseRequestBody
Parse the request body- Specified by:
parseRequestBodyin classWebDAVMethod- Throws:
WebDAVServerException
-
isReadOnly
protected boolean isReadOnly()Description copied from class:WebDAVMethodOverride and return true if the method is a query method only. The default implementation returns false.- Overrides:
isReadOnlyin classWebDAVMethod- Returns:
- Returns true always
-
executeImpl
Execute the main WebDAV request processing- Specified by:
executeImplin classWebDAVMethod- Throws:
WebDAVServerExceptionException- any unhandled exception
-
getXMLOutputFormat
protected org.dom4j.io.OutputFormat getXMLOutputFormat()Description copied from class:WebDAVMethodReturns the format required for an XML response. This may vary per method.- Overrides:
getXMLOutputFormatin 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
-