Examples of CanonicalGrantee


Examples of com.amazonaws.services.s3.model.CanonicalGrantee

            } else if (name.equals("Grantee")) {
                String type = XmlResponsesSaxParser.findAttributeValue( "xsi:type", attrs );
                if ("AmazonCustomerByEmail".equals(type)) {
                    currentGrantee = new EmailAddressGrantee(null);
                } else if ("CanonicalUser".equals(type)) {
                    currentGrantee = new CanonicalGrantee(null);
                } else if ("Group".equals(type)) {
                    /*
                     * Nothing to do for GroupGrantees here since we
                     * can't construct an empty enum value early.
                     */
 
View Full Code Here

Examples of com.amazonaws.services.s3.model.CanonicalGrantee

            } else if (name.equals("Grantee")) {
                String type = XmlResponsesSaxParser.findAttributeValue( "xsi:type", attrs );           
                if ("AmazonCustomerByEmail".equals(type)) {
                    currentGrantee = new EmailAddressGrantee(null);
                } else if ("CanonicalUser".equals(type)) {
                    currentGrantee = new CanonicalGrantee(null);
                } else if ("Group".equals(type)) {
                    /*
                     * Nothing to do for GroupGrantees here since we
                     * can't construct an empty enum value early.
                     */
 
View Full Code Here

Examples of com.amazonaws.services.s3.model.CanonicalGrantee

            } else if (name.equals("Grantee")) {
                String type = XmlResponsesSaxParser.findAttributeValue( "xsi:type", attrs );
                if ("AmazonCustomerByEmail".equals(type)) {
                    currentGrantee = new EmailAddressGrantee(null);
                } else if ("CanonicalUser".equals(type)) {
                    currentGrantee = new CanonicalGrantee(null);
                } else if ("Group".equals(type)) {
                    /*
                     * Nothing to do for GroupGrantees here since we
                     * can't construct an empty enum value early.
                     */
 
View Full Code Here

Examples of com.amazonaws.services.s3.model.CanonicalGrantee

            } else if (name.equals("Grantee")) {
                String type = XmlResponsesSaxParser.findAttributeValue( "xsi:type", attrs );
                if ("AmazonCustomerByEmail".equals(type)) {
                    currentGrantee = new EmailAddressGrantee(null);
                } else if ("CanonicalUser".equals(type)) {
                    currentGrantee = new CanonicalGrantee(null);
                } else if ("Group".equals(type)) {
                    /*
                     * Nothing to do for GroupGrantees here since we
                     * can't construct an empty enum value early.
                     */
 
View Full Code Here

Examples of com.amazonaws.services.s3.model.CanonicalGrantee

            } else if (name.equals("Grantee")) {
                String type = XmlResponsesSaxParser.findAttributeValue( "xsi:type", attrs );
                if ("AmazonCustomerByEmail".equals(type)) {
                    currentGrantee = new EmailAddressGrantee(null);
                } else if ("CanonicalUser".equals(type)) {
                    currentGrantee = new CanonicalGrantee(null);
                } else if ("Group".equals(type)) {
                    /*
                     * Nothing to do for GroupGrantees here since we
                     * can't construct an empty enum value early.
                     */
 
View Full Code Here

Examples of org.jets3t.service.acl.CanonicalGrantee

    } else if ("Cancel".equals(e.getActionCommand())) {
      updatedAccessControlList = null;
      this.setVisible(false);
    } else if ("addCanonicalGrantee".equals(e.getActionCommand())) {
      int rowIndex = canonicalGranteeTableModel.addGrantee(
        new CanonicalGrantee("NewCanonicalId"), Permission.PERMISSION_READ);
      canonicalGranteeTable.setRowSelectionInterval(rowIndex, rowIndex);
    } else if ("removeCanonicalGrantee".equals(e.getActionCommand())) {
      if (canonicalGranteeTable.getSelectedRow() >= 0) {
        canonicalGranteeTableModel.removeGrantAndPermission(canonicalGranteeTable.getSelectedRow());
      }
View Full Code Here

Examples of org.jets3t.service.acl.CanonicalGrantee

    // TEST DATA
    AccessControlList acl = new AccessControlList();
    S3Owner owner = new S3Owner("1234567890", "Some Name");
    acl.setOwner(owner);
   
    GranteeInterface grantee = new CanonicalGrantee();
    grantee.setIdentifier("zzz");
    acl.grantPermission(grantee, Permission.PERMISSION_WRITE);

    grantee = new CanonicalGrantee();
    grantee.setIdentifier("abc");
        ((CanonicalGrantee)grantee).setDisplayName("jamesmurty");
    acl.grantPermission(grantee, Permission.PERMISSION_FULL_CONTROL);
    grantee = new CanonicalGrantee();
    grantee.setIdentifier("aaa");
    acl.grantPermission(grantee, Permission.PERMISSION_READ);
    grantee = GroupGrantee.ALL_USERS;
    acl.grantPermission(grantee, Permission.PERMISSION_READ);
    grantee = GroupGrantee.AUTHENTICATED_USERS;
    acl.grantPermission(grantee, Permission.PERMISSION_WRITE);
    grantee = new EmailAddressGrantee();
    grantee.setIdentifier("james@test.com");
    acl.grantPermission(grantee, Permission.PERMISSION_READ);
    grantee = new EmailAddressGrantee();
    grantee.setIdentifier("james@test2.com");
    acl.grantPermission(grantee, Permission.PERMISSION_FULL_CONTROL);

    JFrame f = new JFrame("Cockpit");
    S3Bucket bucket = new S3Bucket();
    bucket.setName("SomeReallyLongAndWackyBucketNamePath.HereItIs");
View Full Code Here

Examples of org.jets3t.service.acl.CanonicalGrantee

        // Grant access by email address. Note that this only works email address of AWS S3 members.
        acl.grantPermission(new EmailAddressGrantee("someone@somewhere.com"),
            Permission.PERMISSION_FULL_CONTROL);
       
        // Grant control of ACL settings to a known AWS S3 member.
        acl.grantPermission(new CanonicalGrantee("AWS member's ID"),
            Permission.PERMISSION_READ_ACP);
        acl.grantPermission(new CanonicalGrantee("AWS member's ID"),
            Permission.PERMISSION_WRITE_ACP);
       
    
        /*
         * Temporarily make an Object available to anyone
View Full Code Here

Examples of org.jets3t.service.acl.CanonicalGrantee

                GroupGrantee jets3tGrantee = new GroupGrantee();
                jets3tGrantee.setIdentifier(((Group)grantee).getURI());               
                acl.grantPermission(jets3tGrantee, permission);               
            } else if (grantee instanceof CanonicalUser) {
                CanonicalUser canonicalUser = (CanonicalUser) grantee;
                CanonicalGrantee jets3tGrantee = new CanonicalGrantee();
                jets3tGrantee.setIdentifier(canonicalUser.getID());
                jets3tGrantee.setDisplayName(canonicalUser.getDisplayName());
                acl.grantPermission(jets3tGrantee, permission);               
            } else if (grantee instanceof AmazonCustomerByEmail) {
                AmazonCustomerByEmail customerByEmail = (AmazonCustomerByEmail) grantee;
                EmailAddressGrantee jets3tGrantee = new EmailAddressGrantee();
                jets3tGrantee.setIdentifier(customerByEmail.getEmailAddress());
                acl.grantPermission(jets3tGrantee, permission);               
            } else {
                throw new S3ServiceException("Unrecognised grantee type: " + grantee.getClass());
            }
        }
View Full Code Here

Examples of org.jets3t.service.acl.CanonicalGrantee

                GroupGrantee groupGrantee = (GroupGrantee) jets3tGrantee;
                Group group = new Group();
                group.setURI(groupGrantee.getIdentifier());
                grant.setGrantee(group);
            } else if (jets3tGrantee instanceof CanonicalGrantee) {
                CanonicalGrantee canonicalGrantee = (CanonicalGrantee) jets3tGrantee;
                CanonicalUser canonicalUser = new CanonicalUser();
                canonicalUser.setID(canonicalGrantee.getIdentifier());
                canonicalUser.setDisplayName(canonicalGrantee.getDisplayName());
                grant.setGrantee(canonicalUser);
            } else if (jets3tGrantee instanceof EmailAddressGrantee) {
                EmailAddressGrantee emailGrantee = (EmailAddressGrantee) jets3tGrantee;
                AmazonCustomerByEmail customerByEmail = new AmazonCustomerByEmail();
                customerByEmail.setEmailAddress(emailGrantee.getIdentifier());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.