Package org.alfresco.repo.webdav
Class PutMethod
java.lang.Object
org.alfresco.repo.webdav.WebDAVMethod
org.alfresco.repo.webdav.PutMethod
- All Implemented Interfaces:
ActivityPostProducer
- Direct Known Subclasses:
PostMethod
Implements the WebDAV PUT method
- Author:
- Gavin Cornwell
-
Nested Class Summary
Nested classes/interfaces inherited from class org.alfresco.repo.webdav.WebDAVMethod
WebDAVMethod.Condition
-
Field Summary
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 void
Execute the WebDAV requestThe FileInfo for the uploaded file, or null if not yet uploaded.Retrieve the mimetype of the content sent for the PUT request.long
Returns the size of the uploaded file, zero if not yet uploaded.protected boolean
Can be used after a successfulWebDAVMethod.execute()
invocation to check whether the resource was new (created) or over-writing existing content.protected void
Clears the aspect added by a LOCK request for a new file, so that the Timer started by the LOCK request will not remove the node now that the PUT request has been received.protected void
Parse the request headersprotected void
Create an activity post.void
setActivityPoster
(WebDAVActivityPoster activityPoster) Methods 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, getXMLOutputFormat, isReadOnly, parseDepthHeader, parseIfHeader, setDetails, shouldFlushXMLWriter, toString
-
Constructor Details
-
PutMethod
public PutMethod()Default constructor
-
-
Method Details
-
parseRequestHeaders
Parse the request headers- Specified by:
parseRequestHeaders
in classWebDAVMethod
- Throws:
WebDAVServerException
-
parseRequestBody
Clears the aspect added by a LOCK request for a new file, so that the Timer started by the LOCK request will not remove the node now that the PUT request has been received. This is needed for large content.- Specified by:
parseRequestBody
in classWebDAVMethod
- Throws:
WebDAVServerException
-
executeImpl
Execute the WebDAV request- Specified by:
executeImpl
in classWebDAVMethod
- Throws:
WebDAVServerException
Exception
- any unhandled exception
-
isCreated
protected boolean isCreated()Can be used after a successfulWebDAVMethod.execute()
invocation to check whether the resource was new (created) or over-writing existing content.- Returns:
- true if the content was newly created, false if existing.
-
getContentType
Retrieve the mimetype of the content sent for the PUT request. The initial value specified in the request may be updated after the file contents have been uploaded if the repository has determined a different mimetype for the content.- Returns:
- content-type
-
getContentNodeInfo
The FileInfo for the uploaded file, or null if not yet uploaded.- Returns:
- FileInfo
-
getFileSize
public long getFileSize()Returns the size of the uploaded file, zero if not yet uploaded.- Returns:
- the fileSize
-
postActivity
Create an activity post.- Throws:
WebDAVServerException
-
setActivityPoster
- Specified by:
setActivityPoster
in interfaceActivityPostProducer
-