/**
  * Constructs a new SetObjectAclRequest object, ready to set the specified
  * ACL on the specified object when this request is executed.
  */
 public SetObjectAclRequest(String bucketName, String key, CannedAccessControlList cannedAcl)
 {
     this.bukcetName = bucketName;
     this.key = key;
     this.acl = null;
     this.cannedAcl = cannedAcl;
 }
示例#2
0
        public static String convertToXmlString(AccessControlList acl)
        {
            StringBuilder builder = new StringBuilder();
            builder.Append("<AccessControlPolicy>");
            builder.Append(convertOwner(acl.getOwner()));
            builder.Append(convertGrants(acl.getGrants()));
            builder.Append("</AccessControlPolicy>");

            return builder.ToString();
        }
示例#3
0
 /**
  * Sets the optional access control list for the new object. If specified,
  * cannedAcl will be ignored.
  */
 public void setAcl(AccessControlList acl)
 {
     this.acl = acl;
 }
 /**
  * Constructs a new SetBucketAclRequest object, ready to set the specified
  * canned ACL on the specified bucket when this request is executed.
  */
 public SetBucketAclRequest(String bucketName, CannedAccessControlList cannedAcl)
 {
     this.bukcetName = bucketName;
     this.acl = null;
     this.cannedAcl = cannedAcl;
 }
 /**
  * Sets the optional access control list for the new object. If specified,
  * cannedAcl will be ignored.
  */
 public void setAcl(AccessControlList acl)
 {
     this.acl = acl;
 }
示例#6
0
 /**
  * Constructs a new SetBucketAclRequest object, ready to set the specified
  * canned ACL on the specified bucket when this request is executed.
  */
 public SetBucketAclRequest(String bucketName, CannedAccessControlList cannedAcl)
 {
     this.bukcetName = bucketName;
     this.acl        = null;
     this.cannedAcl  = cannedAcl;
 }