Package org.jclouds.s3.domain

Examples of org.jclouds.s3.domain.AccessControlList$Permission


           else throw new UnsupportedOperationException("Unsupported grantee group URI: " + uri );

        }
        else throw new UnsupportedOperationException("Unsupported grantee type: " + grantee.getClass().getCanonicalName());
       
        Permission permission = grant.getPermission();
        String permissionValue = permission.getValue();
        if(permissionValue.equalsIgnoreCase("READ")) {
          engineGrant.setPermission(SAcl.PERMISSION_READ);
        } else if(permissionValue.equalsIgnoreCase("WRITE")) {
          engineGrant.setPermission(SAcl.PERMISSION_WRITE);
        } else if(permissionValue.equalsIgnoreCase("READ_ACP")) {
View Full Code Here


                        throw new UnsupportedOperationException("Unsupported grantee group URI: " + uri);

                } else
                    throw new UnsupportedOperationException("Unsupported grantee type: " + grantee.getClass().getCanonicalName());

                Permission permission = grant.getPermission();
                String permissionValue = permission.getValue();
                if (permissionValue.equalsIgnoreCase("READ")) {
                    engineGrant.setPermission(SAcl.PERMISSION_READ);
                } else if (permissionValue.equalsIgnoreCase("WRITE")) {
                    engineGrant.setPermission(SAcl.PERMISSION_WRITE);
                } else if (permissionValue.equalsIgnoreCase("READ_ACP")) {
View Full Code Here

           else throw new UnsupportedOperationException("Unsupported grantee group URI: " + uri );

        }
        else throw new UnsupportedOperationException("Unsupported grantee type: " + grantee.getClass().getCanonicalName());
       
        Permission permission = grant.getPermission();
        String permissionValue = permission.getValue();
        if(permissionValue.equalsIgnoreCase("READ")) {
          engineGrant.setPermission(SAcl.PERMISSION_READ);
        } else if(permissionValue.equalsIgnoreCase("WRITE")) {
          engineGrant.setPermission(SAcl.PERMISSION_WRITE);
        } else if(permissionValue.equalsIgnoreCase("READ_ACP")) {
View Full Code Here

    userRole.setSubnetworkId(subnetworkId);
    userRole.setParentUserRoleId(parentUserRoleId);

    // Create a permission object to represent each permission this user role
    // has.
    Permission permission1 = new Permission();
    permission1.setId(permission1Id);
    Permission permission2 = new Permission();
    permission2.setId(permission2Id);
    Permission[] permissions = new Permission[] {permission1, permission2};

    // Add the permissions to the user role.
    userRole.setPermissions(permissions);
View Full Code Here

    userRole.setSubnetworkId(subnetworkId);
    userRole.setParentUserRoleId(parentUserRoleId);

    // Create a permission object to represent each permission this user role
    // has.
    Permission permission1 = new Permission();
    permission1.setId(permission1Id);
    Permission permission2 = new Permission();
    permission2.setId(permission2Id);
    Permission[] permissions = new Permission[] {permission1, permission2};

    // Add the permissions to the user role.
    userRole.setPermissions(permissions);
View Full Code Here

        "System.Anonymous", "Global.LogEvent",
        "Global.Diagnostics", "Folder.Create"} );
   
    System.out.println("The new role ID: " + roleId);
   
    Permission perm = new Permission();
    perm.setGroup(false); // false for user, true for group
    perm.setPrincipal("vimaster"); // the vimaster must exist
    perm.setPropagate(true); // propagate down the hierarchy
    perm.setRoleId(roleId);
   
    am.setEntityPermissions( si.getRootFolder(),
        new Permission[] {perm} );
   
    Permission[] ps = am.retrieveEntityPermissions(
View Full Code Here

   public static class Builder extends BaseProviderMetadata.Builder {

      protected Builder(){
         id("greenqloud-storage")
         .name("GreenQloud Simple Storage Service (S3)")
         .apiMetadata(new S3ApiMetadata())
         .homepage(URI.create("http://www.greenqloud.com"))
         .console(URI.create("https://manage.greenqloud.com"))
         .linkedServices("greenqloud-compute", "greenqloud-storage")
         .iso3166Codes("IS-1")
         .endpoint("https://s.greenqloud.com")
View Full Code Here

*/
@Test(groups = "unit", testName = "GreenQloudStorageProviderTest")
public class GreenQloudStorageProviderTest extends BaseProviderMetadataTest {

   public GreenQloudStorageProviderTest() {
      super(new GreenQloudStorageProviderMetadata(), new S3ApiMetadata());
   }
View Full Code Here

                        CONSTANT_DATE).put("Authorization", "AWS identity:ZWVz2v/jGB+ZMmijoyfH9mFMPo0=").build())
               .build();

      HttpResponse success = HttpResponse.builder().statusCode(200).build();

      S3Client clientWhenBucketExists = requestsSendResponses(bucketFooExists, redirectResponse, bucketFooExistsNowUsesGET, success);
     
      assert clientWhenBucketExists.bucketExists("foo");

   }
View Full Code Here

         keyToAcl.put(bucketName + "/" + object.getMetadata().getKey(), options.getAcl());
      return blobStore.putBlob(bucketName, object2Blob.apply(object));
   }

   protected AccessControlList getACLforS3Item(String bucketAndObjectKey) {
      AccessControlList acl = null;
      Object aclObj = keyToAcl.get(bucketAndObjectKey);
      if (aclObj instanceof AccessControlList) {
         acl = (AccessControlList) aclObj;
      } else if (aclObj instanceof CannedAccessPolicy) {
         acl = AccessControlList.fromCannedAccessPolicy((CannedAccessPolicy) aclObj, DEFAULT_OWNER_ID);
View Full Code Here

TOP

Related Classes of org.jclouds.s3.domain.AccessControlList$Permission

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.