![JAR search and dependency download from the Maven repository](/logo.png)
com.ksyun.ks3.service.encryption.model.EncryptedInitiateMultipartUploadRequest Maven / Gradle / Ivy
package com.ksyun.ks3.service.encryption.model;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import com.ksyun.ks3.dto.ObjectMetadata;
import com.ksyun.ks3.service.request.InitiateMultipartUploadRequest;
/**
*
* This class is an extension of {@link InitiateMultipartUploadRequest} to allow additional
* encryption material description to be specified on a per-request basis.
* In particular, {@link EncryptedInitiateMultipartUploadRequest} is only recognized by {@link KS3EncryptionJavaClient}.
*
*
* If {@link EncryptedInitiateMultipartUploadRequest} is used against the non-encrypting {@link KS3JavaClient},
* these additional attributes will be ignored.
*
*/
public class EncryptedInitiateMultipartUploadRequest extends InitiateMultipartUploadRequest implements MaterialsDescriptionProvider {
/**
* description of encryption materials to be used with this request.
*/
private Map materialsDescription;
public EncryptedInitiateMultipartUploadRequest(String bucketName, String key) {
super(bucketName, key);
}
public EncryptedInitiateMultipartUploadRequest(String bucketName, String key, ObjectMetadata objectMetadata) {
super(bucketName, key, objectMetadata);
}
public Map getMaterialsDescription() {
return materialsDescription;
}
/**
* sets the materials description for the encryption materials to be used with the current Multi Part Upload Request.
* @param materialsDescription the materialsDescription to set
*/
public void setMaterialsDescription(Map materialsDescription) {
this.materialsDescription = materialsDescription == null
? null
: Collections.unmodifiableMap(new HashMap(materialsDescription))
;
}
/**
* sets the materials description for the encryption materials to be used with the current Multi Part Upload Request.
* @param materialsDescription the materialsDescription to set
*/
public EncryptedInitiateMultipartUploadRequest withMaterialsDescription(Map materialsDescription) {
setMaterialsDescription(materialsDescription);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy