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
-
public class PropPatchMethod extends PropFindMethod
Implements the WebDAV PROPPATCH method- Author:
- Ivan Rybnikov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classPropPatchMethod.PropertyActionStores 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
Fields Modifier and Type Field Description protected ArrayList<PropPatchMethod.PropertyAction>m_propertyActions-
Fields 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 Constructor Description PropPatchMethod()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WebDAVPropertycreateProperty(Node node)Creates a WebDAVProperty from the given XML nodeprotected voidexecuteImpl()Execute the main WebDAV request processingprotected voidgenerateError(org.dom4j.io.XMLWriter xml)Generates the error tagprotected voidgeneratePropertyResponse(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 voidgenerateResponseImpl()Does nothing unless overridden - for reasons of backwards compatibility.protected booleanisReadOnly()Override and return true if the method is a query method only.protected voidparseRequestBody()Parse the request bodyprotected voidparseRequestHeaders()Parse the request headersprotected voidpatchProperties(org.alfresco.service.cmr.model.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 Detail
-
m_propertyActions
protected ArrayList<PropPatchMethod.PropertyAction> m_propertyActions
-
-
Method Detail
-
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 classPropFindMethod- Returns:
- Returns false always
-
executeImpl
protected void executeImpl() throws WebDAVServerException, ExceptionDescription copied from class:PropFindMethodExecute the main WebDAV request processing- Overrides:
executeImplin classPropFindMethod- Throws:
WebDAVServerException- a general server exceptionException- any unhandled exception
-
generateResponseImpl
protected void generateResponseImpl() throws ExceptionDescription copied from class:WebDAVMethodDoes 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:
generateResponseImplin classWebDAVMethod- Throws:
Exception
-
parseRequestBody
protected void parseRequestBody() throws WebDAVServerExceptionParse the request body- Overrides:
parseRequestBodyin classPropFindMethod- Throws:
WebDAVServerException
-
parseRequestHeaders
protected void parseRequestHeaders() throws WebDAVServerExceptionParse the request headers- Overrides:
parseRequestHeadersin classPropFindMethod- Throws:
WebDAVServerException
-
createProperty
protected WebDAVProperty createProperty(Node node)
Creates a WebDAVProperty from the given XML node- Overrides:
createPropertyin classPropFindMethod
-
patchProperties
protected void patchProperties(org.alfresco.service.cmr.model.FileInfo nodeInfo, String path) throws WebDAVServerException- 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
-
-