Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2015-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;
 
Request object containing all the options for setting a object's Access Control List (ACL).
 
 public class SetObjectAclRequest extends AmazonWebServiceRequest {

    
The name of the bucket containing the object whose ACL is being set.
 
     private final String bucketName;

    
The name of the object whose ACL is being set.
 
     private final String key;

    
The version ID of the object version whose ACL is being set.
 
     private final String versionId;

    
The custom ACL to apply to the specified object.
 
     private final AccessControlList acl;

    
The canned ACL to apply to the specified object.
 
     private final CannedAccessControlList cannedAcl;

    
Constructs a new SetObjectAclRequest object, ready to set the specified ACL on the specified object when this request is executed.

Parameters:
bucketName The name of the bucket containing the object whose ACL is being set.
key The name of the object whose ACL is being set.
acl The custom Access Control List containing the access rules to apply to the specified bucket when this request is executed.
 
     public SetObjectAclRequest(String bucketNameString key,
             AccessControlList acl) {
         this. = bucketName;
         this. = key;
         this. = null;
 
         this. = acl;
         this. = null;
     }

    
Constructs a new SetObjectAclRequest object, ready to set the specified ACL on the specified object when this request is executed.

Parameters:
bucketName The name of the bucket containing the object whose ACL is being set.
key The name of the object whose ACL is being set.
acl The Canned Access Control List to apply to the specified bucket when this request is executed.
 
     public SetObjectAclRequest(String bucketNameString key,
             CannedAccessControlList acl) {
         this. = bucketName;
         this. = key;
         this. = null;
 
         this. = null;
         this. = acl;
     }

    
Constructs a new SetObjectAclRequest object, ready to set the specified ACL on the specified object when this request is executed.

Parameters:
bucketName The name of the bucket containing the object whose ACL is being set.
key The name of the object whose ACL is being set.
versionId The version ID of the object version whose ACL is being set.
acl The custom Access Control List containing the access rules to apply to the specified bucket when this request is executed.
    public SetObjectAclRequest(String bucketNameString keyString versionId,
            AccessControlList acl) {
        this. = bucketName;
        this. = key;
        this. = versionId;
        this. = acl;
        this. = null;
    }

    
Constructs a new SetObjectAclRequest object, ready to set the specified ACL on the specified object when this request is executed.

Parameters:
bucketName The name of the bucket containing the object whose ACL is being set.
key The name of the object whose ACL is being set.
versionId The version ID of the object version whose ACL is being set.
acl The Canned Access Control List to apply to the specified bucket when this request is executed.
    public SetObjectAclRequest(String bucketNameString keyString versionId,
            CannedAccessControlList acl) {
        this. = bucketName;
        this. = key;
        this. = versionId;
        this. = null;
        this. = acl;
    }

    
Returns the name of the bucket containing the object whose ACL is being set.

Returns:
The name of the bucket containing the object whose ACL is being set.
    public String getBucketName() {
        return ;
    }

    
Returns the name of the object whose ACL is being set.

Returns:
The name of the object whose ACL is being set.
    public String getKey() {
        return ;
    }

    
Returns the version ID of the object version whose ACL is being set.

Returns:
The version ID of the object version whose ACL is being set.
    public String getVersionId() {
        return ;
    }

    
Returns the custom ACL to be applied to the specified object when this request is executed. A request can use either a custom ACL or a canned ACL, but not both.

Returns:
The custom ACL to be applied to the specified bucket when this request is executed, or null if the request is to be executed with a canned ACL.
    public AccessControlList getAcl() {
        return ;
    }

    
Returns the canned ACL to be applied to the specified object when this request is executed. A request can use either a custom ACL or a canned ACL, but not both.

Returns:
The canned ACL to be applied to the specified bucket when this request is executed, or null if the request is to be executed with a custom ACL.
        return ;
    }
New to GrepCode? Check out our FAQ X