Package com.amazon.s3

Examples of com.amazon.s3.AWSAuthConnection


        engineRequest.setBucketName((String)request.getAttribute(S3Constants.BUCKET_ATTR_KEY));

        S3AccessControlPolicy engineResponse = ServiceProvider.getInstance().getS3Engine().handleRequest(engineRequest);

        // To allow the bucket acl policy result to be serialized via Axiom classes
        GetBucketAccessControlPolicyResponse onePolicy = S3SerializableServiceImplementation.toGetBucketAccessControlPolicyResponse(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


        request.setBucketName(getBucketAccessControlPolicy.getBucket());
        return request;
    }

    public static GetBucketAccessControlPolicyResponse toGetBucketAccessControlPolicyResponse(S3AccessControlPolicy policy) {
        GetBucketAccessControlPolicyResponse response = new GetBucketAccessControlPolicyResponse();
        response.setGetBucketAccessControlPolicyResponse(toAccessControlPolicy(policy));
        return response;
    }
View Full Code Here

    request.setKey(getObjectAccessControlPolicy.getKey());
    return request;
  }
 
  public static GetObjectAccessControlPolicyResponse toGetObjectAccessControlPolicyResponse(S3AccessControlPolicy policy) {
    GetObjectAccessControlPolicyResponse response = new GetObjectAccessControlPolicyResponse();
    response.setGetObjectAccessControlPolicyResponse(toAccessControlPolicy(policy));
    return response;
  }
View Full Code Here

        String version = engineResponse.getVersion();
        if (null != version) response.addHeader( "x-amz-version-id", version );


        // To allow the get object acl policy result to be serialized via Axiom classes
        GetObjectAccessControlPolicyResponse onePolicy = S3SerializableServiceImplementation.toGetObjectAccessControlPolicyResponse( 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

        request.setKey(getObjectAccessControlPolicy.getKey());
        return request;
    }

    public static GetObjectAccessControlPolicyResponse toGetObjectAccessControlPolicyResponse(S3AccessControlPolicy policy) {
        GetObjectAccessControlPolicyResponse response = new GetObjectAccessControlPolicyResponse();
        response.setGetObjectAccessControlPolicyResponse(toAccessControlPolicy(policy));
        return response;
    }
View Full Code Here

    response.setGetObjectResponse(result);
    return response;
  }
 
  private GetObjectExtendedResponse toGetObjectExtendedResponse(S3GetObjectResponse engineResponse) {
    GetObjectExtendedResponse response = new GetObjectExtendedResponse();
    int resultCode = engineResponse.getResultCode();

    GetObjectResult result = new GetObjectResult();
    Status param1 = new Status();
    param1.setCode( resultCode );
    param1.setDescription( engineResponse.getResultDescription());
    result.setStatus( param1 );

    if ( 200 == resultCode || 206 == resultCode )
    {
         result.setData(engineResponse.getData());
         result.setETag( engineResponse.getETag());
         result.setMetadata(toMetadataEntry(engineResponse.getMetaEntries()));
         result.setLastModified( engineResponse.getLastModified());
    }
    else
    {    result.setETag( "" );
       result.setLastModified( Calendar.getInstance())
    }
   
    response.setGetObjectResponse(result);
    return response;
  }
View Full Code Here

        response.setGetObjectResponse(result);
        return response;
    }

    private GetObjectExtendedResponse toGetObjectExtendedResponse(S3GetObjectResponse engineResponse) {
        GetObjectExtendedResponse response = new GetObjectExtendedResponse();
        int resultCode = engineResponse.getResultCode();

        GetObjectResult result = new GetObjectResult();
        Status param1 = new Status();
        param1.setCode(resultCode);
        param1.setDescription(engineResponse.getResultDescription());
        result.setStatus(param1);

        if (200 == resultCode || 206 == resultCode) {
            result.setData(engineResponse.getData());
            result.setETag(engineResponse.getETag());
            result.setMetadata(toMetadataEntry(engineResponse.getMetaEntries()));
            result.setLastModified(engineResponse.getLastModified());
        } else {
            result.setETag("");
            result.setLastModified(Calendar.getInstance());
        }

        response.setGetObjectResponse(result);
        return response;
    }
View Full Code Here

    request.setReturnCompleteObjectOnConditionFailure(getObjectExtended.getReturnCompleteObjectOnConditionFailure());
    return request;
  }
 
  private GetObjectResponse toGetObjectResponse(S3GetObjectResponse engineResponse) {
    GetObjectResponse response = new GetObjectResponse();
    int resultCode = engineResponse.getResultCode();

    GetObjectResult result = new GetObjectResult();
    Status param1 = new Status();
    param1.setCode( resultCode);
    param1.setDescription( engineResponse.getResultDescription());
    result.setStatus( param1 );
   
    if ( 200 == resultCode )
    {
         result.setData(engineResponse.getData());
         result.setETag( engineResponse.getETag());
         result.setMetadata(toMetadataEntry(engineResponse.getMetaEntries()));
         result.setLastModified( engineResponse.getLastModified());
    }
    else
    {    result.setETag( "" );
       result.setLastModified( Calendar.getInstance())
    }
     
    response.setGetObjectResponse(result);
    return response;
  }
View Full Code Here

        request.setReturnCompleteObjectOnConditionFailure(getObjectExtended.getReturnCompleteObjectOnConditionFailure());
        return request;
    }

    private GetObjectResponse toGetObjectResponse(S3GetObjectResponse engineResponse) {
        GetObjectResponse response = new GetObjectResponse();
        int resultCode = engineResponse.getResultCode();

        GetObjectResult result = new GetObjectResult();
        Status param1 = new Status();
        param1.setCode(resultCode);
        param1.setDescription(engineResponse.getResultDescription());
        result.setStatus(param1);

        if (200 == resultCode) {
            result.setData(engineResponse.getData());
            result.setETag(engineResponse.getETag());
            result.setMetadata(toMetadataEntry(engineResponse.getMetaEntries()));
            result.setLastModified(engineResponse.getLastModified());
        } else {
            result.setETag("");
            result.setLastModified(Calendar.getInstance());
        }

        response.setGetObjectResponse(result);
        return response;
    }
View Full Code Here

 
  private GetObjectResponse toGetObjectResponse(S3GetObjectResponse engineResponse) {
    GetObjectResponse response = new GetObjectResponse();
    int resultCode = engineResponse.getResultCode();

    GetObjectResult result = new GetObjectResult();
    Status param1 = new Status();
    param1.setCode( resultCode);
    param1.setDescription( engineResponse.getResultDescription());
    result.setStatus( param1 );
   
    if ( 200 == resultCode )
    {
         result.setData(engineResponse.getData());
         result.setETag( engineResponse.getETag());
         result.setMetadata(toMetadataEntry(engineResponse.getMetaEntries()));
         result.setLastModified( engineResponse.getLastModified());
    }
    else
    {    result.setETag( "" );
       result.setLastModified( Calendar.getInstance())
    }
     
    response.setGetObjectResponse(result);
    return response;
  }
View Full Code Here

TOP

Related Classes of com.amazon.s3.AWSAuthConnection

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.