Class PutMethod

java.lang.Object
org.alfresco.repo.webdav.WebDAVMethod
org.alfresco.repo.webdav.PutMethod
All Implemented Interfaces:
ActivityPostProducer
Direct Known Subclasses:
PostMethod

public class PutMethod extends WebDAVMethod implements ActivityPostProducer
Implements the WebDAV PUT method
Author:
Gavin Cornwell
  • Constructor Details

    • PutMethod

      public PutMethod()
      Default constructor
  • Method Details

    • parseRequestHeaders

      protected void parseRequestHeaders() throws WebDAVServerException
      Parse the request headers
      Specified by:
      parseRequestHeaders in class WebDAVMethod
      Throws:
      WebDAVServerException
    • parseRequestBody

      protected void parseRequestBody() throws WebDAVServerException
      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 class WebDAVMethod
      Throws:
      WebDAVServerException
    • executeImpl

      protected void executeImpl() throws WebDAVServerException, Exception
      Execute the WebDAV request
      Specified by:
      executeImpl in class WebDAVMethod
      Throws:
      WebDAVServerException
      Exception - any unhandled exception
    • isCreated

      protected boolean isCreated()
      Can be used after a successful WebDAVMethod.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

      public String 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

      public FileInfo 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

      protected void postActivity() throws WebDAVServerException
      Create an activity post.
      Throws:
      WebDAVServerException
    • setActivityPoster

      public void setActivityPoster(WebDAVActivityPoster activityPoster)
      Specified by:
      setActivityPoster in interface ActivityPostProducer