Package com.emc.documentum.rest.dfc
Interface MultipartUploadManager
public interface MultipartUploadManager
The manager to handle multipart file uploads on a repository object.
-
Method Summary
Modifier and TypeMethodDescriptionvoidabortMultiPartUpload(String objectId, String uploadId) Abort an in-progress multipart upload for the given object, identified byuploadId.completeMultiPartUpload(String objectId, String uploadId, Boolean retainLock, String versionLabels, String fileChecksum) resolveMultipartUploadLinks(String objectId, int partNumber, String uploadId, MediaUrlPolicy policy, String netLocId, String uploadNonce, String partChecksum, MultipartUploadLink localLink) Resolve the multipart upload location entries for the given object based on the requestedMediaUrlPolicy, mirroring the resolution logic used for content-media links.voidwritePart(String objectId, String uploadId, InputStream contentStream, int partNumber, String partChecksum) Write a single part of a multipart upload for the given object.
-
Method Details
-
writePart
void writePart(String objectId, String uploadId, InputStream contentStream, int partNumber, String partChecksum) throws com.documentum.fc.common.DfException Write a single part of a multipart upload for the given object. Each part is identified by itspartNumberand streamed to the repository object under the givenuploadIdso that the parts can later be assembled into the complete content when the upload is completed.- Parameters:
objectId- the target object id the content belongs touploadId- the unique upload id identifying the multipart upload this part belongs tocontentStream- the input stream of the part contentpartNumber- the sequential number of the part being uploaded, identifying its position in the contentpartChecksum- the checksum of the part content used to verify its integrity, may benull- Throws:
com.documentum.fc.common.DfException- if the part content cannot be written to the repository
-
completeMultiPartUpload
SysObject completeMultiPartUpload(String objectId, String uploadId, Boolean retainLock, String versionLabels, String fileChecksum) throws com.documentum.fc.common.DfException - Throws:
com.documentum.fc.common.DfException
-
abortMultiPartUpload
void abortMultiPartUpload(String objectId, String uploadId) throws com.documentum.fc.common.DfException Abort an in-progress multipart upload for the given object, identified byuploadId. Any parts already written for this upload are discarded and the upload id becomes invalid for further part uploads or completion.- Parameters:
objectId- the target object id the multipart upload belongs touploadId- the unique upload id identifying the multipart upload to abort- Throws:
com.documentum.fc.common.DfException- if the abort operation cannot be performed, e.g. the object or upload id does not exist, or the object is locked by another user
-
resolveMultipartUploadLinks
List<MultipartUploadLink> resolveMultipartUploadLinks(String objectId, int partNumber, String uploadId, MediaUrlPolicy policy, String netLocId, String uploadNonce, String partChecksum, MultipartUploadLink localLink) throws com.documentum.fc.common.DfException Resolve the multipart upload location entries for the given object based on the requestedMediaUrlPolicy, mirroring the resolution logic used for content-media links. Depending on the policy, the returned entries may include the local (REST server) upload location, one or more ACS/BOCS upload locations, or all of them.- Parameters:
objectId- the target object idpartNumber- the part numberpartChecksum- the checksum of the content part to be uploadeduploadId- the multipart upload id previously generated for this objectpolicy- the media URL policy that determines which upload locations are returnednetLocId- the network location identifier for BOCS, may be nulluploadNonce- the hash value for a random client token to authorize the client upload.localLink- the local (REST server) upload location entry- Returns:
- the resolved list of multipart upload location entries
- Throws:
com.documentum.fc.common.DfException- if there is an error resolving the upload locations
-