Package com.amazon.s3

Examples of com.amazon.s3.GetObjectAccessControlPolicyResponse


    CanonicalUser owner = new CanonicalUser();
    owner.setID(enginePolicy.getOwner().getID());
    owner.setDisplayName(enginePolicy.getOwner().getDisplayName());
    policy.setOwner(owner);
   
    AccessControlList acl = new AccessControlList();
    acl.setGrant(toGrants(enginePolicy.getGrants()));
    policy.setAccessControlList(acl);
    return policy;
  }
View Full Code Here


    response.setGetObjectAccessControlPolicyResponse(toAccessControlPolicy(policy));
    return response;
  }
 
  private static AccessControlPolicy toAccessControlPolicy(S3AccessControlPolicy enginePolicy) {
    AccessControlPolicy policy = new AccessControlPolicy();
    CanonicalUser owner = new CanonicalUser();
    owner.setID(enginePolicy.getOwner().getID());
    owner.setDisplayName(enginePolicy.getOwner().getDisplayName());
    policy.setOwner(owner);
   
    AccessControlList acl = new AccessControlList();
    acl.setGrant(toGrants(enginePolicy.getGrants()));
    policy.setAccessControlList(acl);
    return policy;
  }
View Full Code Here

        entries[i].setKey(engineEntries[i].getKey());
        entries[i].setLastModified(engineEntries[i].getLastModified());
        entries[i].setSize(engineEntries[i].getSize());
        entries[i].setStorageClass(StorageClass.STANDARD);
       
        CanonicalUser owner = new CanonicalUser();
        owner.setID(engineEntries[i].getOwnerCanonicalId());
        owner.setDisplayName(engineEntries[i].getOwnerDisplayName());
        entries[i].setOwner(owner);
      }
      return entries;
    }
   
View Full Code Here

    ListAllMyBucketsResponse response = new ListAllMyBucketsResponse();
    ListAllMyBucketsResult result = new ListAllMyBucketsResult();
    ListAllMyBucketsEntry[] entries = null;
   
    S3CanonicalUser ownerEngine = engineResponse.getOwner();
    CanonicalUser owner = new CanonicalUser();
    owner.setID(ownerEngine.getID());
    owner.setDisplayName(ownerEngine.getDisplayName());
    result.setOwner(owner);
    S3ListAllMyBucketsEntry[] engineEntries = engineResponse.getBuckets();
    if (engineEntries != null) {
      entries = new ListAllMyBucketsEntry[engineEntries.length];
      for(int i = 0; i < engineEntries.length; i++) {
View Full Code Here

    return response;
  }
 
  private static AccessControlPolicy toAccessControlPolicy(S3AccessControlPolicy enginePolicy) {
    AccessControlPolicy policy = new AccessControlPolicy();
    CanonicalUser owner = new CanonicalUser();
    owner.setID(enginePolicy.getOwner().getID());
    owner.setDisplayName(enginePolicy.getOwner().getDisplayName());
    policy.setOwner(owner);
   
    AccessControlList acl = new AccessControlList();
    acl.setGrant(toGrants(enginePolicy.getGrants()));
    policy.setAccessControlList(acl);
View Full Code Here

      {
        grants[i] = new Grant();
       
        switch( engineGrants[i].getGrantee()) {
        case SAcl.GRANTEE_USER :
           grantee = new CanonicalUser();
           ((CanonicalUser)grantee).setID(engineGrants[i].getCanonicalUserID());
           ((CanonicalUser)grantee).setDisplayName("TODO");
           grants[i].setGrantee(grantee);
           break;
         
View Full Code Here

    response.setPutObjectInlineResponse(result);
    return response;
  }
 
  public static CopyObjectResponse toCopyObjectResponse(S3CopyObjectResponse engineResponse) throws AxisFault {
    CopyObjectResponse response = new CopyObjectResponse();
    int resultCode = engineResponse.getResultCode();

    CopyObjectResult result = new CopyObjectResult();   
    if ( 300 <= resultCode )
    {
         String description = engineResponse.getResultDescription();
       throw new AxisFault( "" + resultCode, (null == description ? "" : description));
    }
   
    result.setETag( "\"" + engineResponse.getETag() + "\"" );
    result.setLastModified(engineResponse.getLastModified());    
    response.setCopyObjectResult(result);
    return response;
  }
View Full Code Here

        if (null != versionId) response.addHeader( "x-amz-copy-source-version-id", versionId );
        versionId = engineResponse.getPutVersion();
        if (null != versionId) response.addHeader( "x-amz-version-id", versionId );

        // To allow the copy object result to be serialized via Axiom classes
        CopyObjectResponse allBuckets = S3SerializableServiceImplementation.toCopyObjectResponse( engineResponse );

        OutputStream outputStream = response.getOutputStream();
        response.setStatus(200)
        response.setContentType("application/xml");  
        // The content-type literally should be "application/xml; charset=UTF-8"
View Full Code Here

 
  public static CopyObjectResponse toCopyObjectResponse(S3CopyObjectResponse engineResponse) throws AxisFault {
    CopyObjectResponse response = new CopyObjectResponse();
    int resultCode = engineResponse.getResultCode();

    CopyObjectResult result = new CopyObjectResult();   
    if ( 300 <= resultCode )
    {
         String description = engineResponse.getResultDescription();
       throw new AxisFault( "" + resultCode, (null == description ? "" : description));
    }
   
    result.setETag( "\"" + engineResponse.getETag() + "\"" );
    result.setLastModified(engineResponse.getLastModified());    
    response.setCopyObjectResult(result);
    return response;
  }
View Full Code Here

    request.setAcl(toEngineAccessControlList(createBucket.getAccessControlList()));
    return request;
  }
 
  private CreateBucketResponse toCreateBucketResponse(S3CreateBucketResponse engineResponse) {
    CreateBucketResponse response = new CreateBucketResponse();
    CreateBucketResult result = new CreateBucketResult();
    result.setBucketName(engineResponse.getBucketName());
    response.setCreateBucketReturn(result);
    return response;
  }
View Full Code Here

TOP

Related Classes of com.amazon.s3.GetObjectAccessControlPolicyResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.