Package com.amazon.s3

Examples of com.amazon.s3.Group


          engineGrant.setGrantee(SAcl.GRANTEE_USER);
          engineGrant.setCanonicalUserID(((CanonicalUser)grantee).getID());
        }
        else if (grantee instanceof Group)
        {
           Group temp = (Group)grantee;
           String uri = temp.getURI();
           if ( uri.equalsIgnoreCase( "http://acs.amazonaws.com/groups/global/AllUsers" )) {
              // -> this allows all public unauthenticated access based on permission given
              engineGrant.setGrantee(SAcl.GRANTEE_ALLUSERS);
              engineGrant.setCanonicalUserID( "*" );
           }
View Full Code Here


           ((CanonicalUser)grantee).setDisplayName("TODO");
           grants[i].setGrantee(grantee);
           break;
         
        case SAcl.GRANTEE_ALLUSERS:
           grantee = new Group();
           ((Group)grantee).setURI( "http://acs.amazonaws.com/groups/global/AllUsers" );
           grants[i].setGrantee(grantee);
             break;
            
        case SAcl.GRANTEE_AUTHENTICATED:       
           grantee = new Group();
           ((Group)grantee).setURI( "http://acs.amazonaws.com/groups/global/Authenticated" );
           grants[i].setGrantee(grantee);
           break;
         
        default :
View Full Code Here

    result.setOwner(owner);
    S3ListAllMyBucketsEntry[] engineEntries = engineResponse.getBuckets();
    if (engineEntries != null) {
      entries = new ListAllMyBucketsEntry[engineEntries.length];
      for(int i = 0; i < engineEntries.length; i++) {
        entries[i] = new ListAllMyBucketsEntry();
        entries[i].setName(engineEntries[i].getName());
        entries[i].setCreationDate(engineEntries[i].getCreationDate());   //setTimeZone(TimeZone.getTimeZone("Z"));
      }

      ListAllMyBucketsList list = new ListAllMyBucketsList();
View Full Code Here

        result.setOwner(owner);
        S3ListAllMyBucketsEntry[] engineEntries = engineResponse.getBuckets();
        if (engineEntries != null) {
            entries = new ListAllMyBucketsEntry[engineEntries.length];
            for (int i = 0; i < engineEntries.length; i++) {
                entries[i] = new ListAllMyBucketsEntry();
                entries[i].setName(engineEntries[i].getName());
                entries[i].setCreationDate(engineEntries[i].getCreationDate());   //setTimeZone(TimeZone.getTimeZone("Z"));
            }

            ListAllMyBucketsList list = new ListAllMyBucketsList();
View Full Code Here

        entries[i] = new ListAllMyBucketsEntry();
        entries[i].setName(engineEntries[i].getName());
        entries[i].setCreationDate(engineEntries[i].getCreationDate());   //setTimeZone(TimeZone.getTimeZone("Z"));
      }

      ListAllMyBucketsList list = new ListAllMyBucketsList();
        list.setBucket(entries);
        result.setBuckets(list);
    }
    response.setListAllMyBucketsResponse(result);
    return response;
  }
View Full Code Here

                entries[i] = new ListAllMyBucketsEntry();
                entries[i].setName(engineEntries[i].getName());
                entries[i].setCreationDate(engineEntries[i].getCreationDate());   //setTimeZone(TimeZone.getTimeZone("Z"));
            }

            ListAllMyBucketsList list = new ListAllMyBucketsList();
            list.setBucket(entries);
            result.setBuckets(list);
        }
        response.setListAllMyBucketsResponse(result);
        return response;
    }
View Full Code Here

    request.setSignature(listAllMyBuckets.getSignature());
    return request;
  }
 
  public static ListAllMyBucketsResponse toListAllMyBucketsResponse(S3ListAllMyBucketsResponse engineResponse) {
    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++) {
        entries[i] = new ListAllMyBucketsEntry();
        entries[i].setName(engineEntries[i].getName());
        entries[i].setCreationDate(engineEntries[i].getCreationDate());   //setTimeZone(TimeZone.getTimeZone("Z"));
      }

      ListAllMyBucketsList list = new ListAllMyBucketsList();
        list.setBucket(entries);
        result.setBuckets(list);
    }
    response.setListAllMyBucketsResponse(result);
    return response;
  }
View Full Code Here

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

        // To allow the all buckets list to be serialized via Axiom classes
        ListAllMyBucketsResponse allBuckets = S3SerializableServiceImplementation
                .toListAllMyBucketsResponse(engineResponse);

        OutputStream outputStream = response.getOutputStream();
        response.setStatus(200);
        response.setContentType("application/xml");
View Full Code Here

        engineRequest.setSignature("");

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

        // To allow the all buckets list to be serialized via Axiom classes
        ListAllMyBucketsResponse allBuckets = S3SerializableServiceImplementation.toListAllMyBucketsResponse(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.setSignature(listAllMyBuckets.getSignature());
        return request;
    }

    public static ListAllMyBucketsResponse toListAllMyBucketsResponse(S3ListAllMyBucketsResponse engineResponse) {
        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++) {
                entries[i] = new ListAllMyBucketsEntry();
                entries[i].setName(engineEntries[i].getName());
                entries[i].setCreationDate(engineEntries[i].getCreationDate());   //setTimeZone(TimeZone.getTimeZone("Z"));
            }

            ListAllMyBucketsList list = new ListAllMyBucketsList();
            list.setBucket(entries);
            result.setBuckets(list);
        }
        response.setListAllMyBucketsResponse(result);
        return response;
    }
View Full Code Here

TOP

Related Classes of com.amazon.s3.Group

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.