Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   *
   *  http://aws.amazon.com/apache2.0
   *
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.s3.model;
 
 import java.util.Map;
 
This class is an extension of InitiateMultipartUploadRequest to allow additional crypto related attributes to be specified.

In particular, this includes the options to

  • specify encryption material description on a per-request basis;
  • specify whether a new set of encryption material is to be created for the upload or not;
In particular, EncryptedInitiateMultipartUploadRequest is only recognized by com.amazonaws.services.s3.AmazonS3EncryptionClient.

If EncryptedInitiateMultipartUploadRequest is used against the non-encrypting com.amazonaws.services.s3.AmazonS3Client, these additional attributes will be ignored.

 
         InitiateMultipartUploadRequest implements MaterialsDescriptionProvider {
    
description of encryption materials to be used with this request.
 
     private Map<StringStringmaterialsDescription;
    
True if a new set of encryption material is to be created; false otherwise. Default is true.
 
     private boolean createEncryptionMaterial = true;
     
     public EncryptedInitiateMultipartUploadRequest(String bucketNameString key) {
         super(bucketNamekey);
     }
     
     public EncryptedInitiateMultipartUploadRequest(String bucketNameString keyObjectMetadata objectMetadata) {
         super(bucketNamekeyobjectMetadata);
     }
     
     @Override
     public Map<StringStringgetMaterialsDescription() {
         return ;
     }
    
    
sets the materials description for the encryption materials to be used with the current Multi Part Upload Request.

Parameters:
materialsDescription the materialsDescription to set
 
     public void setMaterialsDescription(Map<StringStringmaterialsDescription) {
         this. = materialsDescription == null
                 ? null 
                 : Collections.unmodifiableMap(new HashMap<String,String>(materialsDescription))
                 ;
     }
    
    
sets the materials description for the encryption materials to be used with the current Multi Part Upload Request.

Parameters:
materialsDescription the materialsDescription to set
 
         setMaterialsDescription(materialsDescription);
         return this;
     }

    
Returns true if a new set of encryption material is to be created; false otherwise. Default is true.
 
     public boolean isCreateEncryptionMaterial() {
         return ;
     }

    

Parameters:
createEncryptionMaterial true if a new set of encryption material is to be created; false otherwise.
 
    public void setCreateEncryptionMaterial(boolean createEncryptionMaterial) {
        this. = createEncryptionMaterial;
    }

    

Parameters:
createEncryptionMaterial true if a new set of encryption material is to be created; false otherwise.
            boolean createEncryptionMaterial) {
        this. = createEncryptionMaterial;
        return this;
    }
New to GrepCode? Check out our FAQ X