Package org.alfresco.repo.webdav
Class PropPatchMethod
java.lang.Object
org.alfresco.repo.webdav.WebDAVMethod
org.alfresco.repo.webdav.PropFindMethod
org.alfresco.repo.webdav.PropPatchMethod
Implements the WebDAV PROPPATCH method
- Author:
- Ivan Rybnikov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Stores information about PROPPATCH action(set or remove) an according property.Nested classes/interfaces inherited from class org.alfresco.repo.webdav.WebDAVMethod
WebDAVMethod.Condition
-
Field Summary
FieldsFields inherited from class org.alfresco.repo.webdav.PropFindMethod
FIND_PROPS, GET_ALL_PROPS, GET_NAMED_PROPS, m_mode, m_namespaces, 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
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
generateError
(org.dom4j.io.XMLWriter xml) Generates the error tagprotected void
generatePropertyResponse
(org.dom4j.io.XMLWriter xml, WebDAVProperty property, int status, String description) Generates the XML response for a PROPFIND request that asks for a list of all known propertiesprotected void
Does nothing unless overridden - for reasons of backwards compatibility.protected boolean
Override and return true if the method is a query method only.protected void
Parse the request bodyprotected void
Parse the request headersprotected void
patchProperties
(FileInfo nodeInfo, String path) Methods inherited from class org.alfresco.repo.webdav.PropFindMethod
generateAllPropertiesResponse, generateFindPropertiesResponse, generateLockDiscoveryResponse, generateResponseForNode, getMode, getXMLOutputFormat, loadDeadProperties, persistDeadProperties, writeLockTypes
Methods inherited from class org.alfresco.repo.webdav.WebDAVMethod
checkNode, checkNode, createXMLWriter, execute, flushXML, generateLockDiscoveryXML, generateLockDiscoveryXML, generateNamespaceDeclarations, 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
-
m_propertyActions
-
-
Constructor Details
-
PropPatchMethod
public PropPatchMethod()
-
-
Method Details
-
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 classPropFindMethod
- Returns:
- Returns false always
-
executeImpl
Description copied from class:PropFindMethod
Execute the main WebDAV request processing- Overrides:
executeImpl
in classPropFindMethod
- Throws:
WebDAVServerException
- a general server exceptionException
- any unhandled exception
-
generateResponseImpl
Description copied from class:WebDAVMethod
Does nothing unless overridden - for reasons of backwards compatibility. Subclasses implementing this method should separate the WebDAV method execution logic from response generation logic. Execution logic should be contained in theWebDAVMethod.executeImpl()
method and should NOT contain any code that writes to the response. Conversely response generation logic should NOT contain any code relating to the desired effect of the WebDAV method (e.g. setting properties on a node) and should be contained purely within this method.Older methods, until refactored will not override this method, relying only on
WebDAVMethod.executeImpl()
.- Overrides:
generateResponseImpl
in classWebDAVMethod
- Throws:
Exception
-
parseRequestBody
Parse the request body- Overrides:
parseRequestBody
in classPropFindMethod
- Throws:
WebDAVServerException
-
parseRequestHeaders
Parse the request headers- Overrides:
parseRequestHeaders
in classPropFindMethod
- Throws:
WebDAVServerException
-
createProperty
Creates a WebDAVProperty from the given XML node- Overrides:
createProperty
in classPropFindMethod
-
patchProperties
- Throws:
WebDAVServerException
-
generatePropertyResponse
protected void generatePropertyResponse(org.dom4j.io.XMLWriter xml, WebDAVProperty property, int status, String description) Generates the XML response for a PROPFIND request that asks for a list of all known properties- Parameters:
xml
- XMLWriterproperty
- WebDAVPropertystatus
- intdescription
- String
-
generateError
protected void generateError(org.dom4j.io.XMLWriter xml) Generates the error tag- Parameters:
xml
- XMLWriter
-