Package railo.commons.io.res.type.s3

Examples of railo.commons.io.res.type.s3.AccessControlPolicy


    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


        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

    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

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "GetObjectAccessControlPolicy" + convertDateToString(timestamp));
            AccessControlPolicy result = s3SoapBinding.getObjectAccessControlPolicy(
                bucketName, objectKey, getAWSAccessKey(),
                timestamp, signature, null);
            return convertAccessControlTypes(result);
        } catch (RuntimeException e) {
            throw e;
View Full Code Here

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "GetBucketAccessControlPolicy" + convertDateToString(timestamp));
            AccessControlPolicy result = s3SoapBinding.getBucketAccessControlPolicy(bucketName,
                getAWSAccessKey(), timestamp, signature, null);
            return convertAccessControlTypes(result);
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "GetObjectAccessControlPolicy" + convertDateToString(timestamp));
            AccessControlPolicy result = s3SoapBinding.getObjectAccessControlPolicy(
                bucketName, objectKey, getAWSAccessKey(),
                timestamp, signature, null);
            return convertAccessControlTypes(result);
        } catch (RuntimeException e) {
            throw e;
View Full Code Here

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "GetBucketAccessControlPolicy" + convertDateToString(timestamp));
            AccessControlPolicy result = s3SoapBinding.getBucketAccessControlPolicy(bucketName,
                getAWSAccessKey(), timestamp, signature, null);
            return convertAccessControlTypes(result);
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "GetObjectAccessControlPolicy" + convertDateToString(timestamp));
            AccessControlPolicy result = s3SoapBinding.getObjectAccessControlPolicy(
                bucketName, objectKey, getAWSAccessKey(),
                timestamp, signature, null);
            return convertAccessControlTypes(result);
        } catch (RuntimeException e) {
            throw e;
View Full Code Here

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "GetBucketAccessControlPolicy" + convertDateToString(timestamp));
            AccessControlPolicy result = s3SoapBinding.getBucketAccessControlPolicy(bucketName,
                getAWSAccessKey(), timestamp, signature, null);
            return convertAccessControlTypes(result);
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

  private static Object toArrayStruct(List<AccessControl> accessControlList) throws S3Exception {
    Array arr=new ArrayImpl();
    String type;
    Struct sct;
    AccessControl ac;
    Iterator<AccessControl> it = accessControlList.iterator();
    while(it.hasNext()){
      ac=it.next();
      arr.appendEL(sct=new StructImpl());
      sct.setEL(KeyConstants._id, ac.getId());
      sct.setEL(PERMISSION, ac.getPermission());
     
      type = AccessControl.toType(ac.getType());
      if("Group".equalsIgnoreCase(type))        
        setGroup(sct,ac);
      else if("CanonicalUser".equalsIgnoreCase(type))
        sct.setEL(DISPLAY_NAME, ac.getDisplayName());
      else
        sct.setEL(KeyConstants._email, ac.getId());
    }
    return arr;
  }
View Full Code Here

TOP

Related Classes of railo.commons.io.res.type.s3.AccessControlPolicy

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.