public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText = new StringBuilder(); }
public void endElement(String uri, String name, String qName) { if (qName.equals("TargetBucket")) { this.targetBucket = currentOrNull(currentText); } else if (qName.equals("TargetPrefix")) { this.targetPrefix = currentOrNull(currentText); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { targetGrants.add(new Grant(currentGrantee, currentPermission)); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("TargetBucket")) { this.targetBucket = currentOrNull(currentText); } else if (qName.equals("TargetPrefix")) { this.targetPrefix = currentOrNull(currentText); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { targetGrants.add(new Grant(currentGrantee, currentPermission)); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("TargetBucket")) { this.targetBucket = currentOrNull(currentText); } else if (qName.equals("TargetPrefix")) { this.targetPrefix = currentOrNull(currentText); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { targetGrants.add(new Grant(currentGrantee, currentPermission)); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText = new StringBuilder(); }
public void endElement(String uri, String name, String qName) { if (qName.equals("TargetBucket")) { this.targetBucket = currentOrNull(currentText); } else if (qName.equals("TargetPrefix")) { this.targetPrefix = currentOrNull(currentText); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { targetGrants.add(new Grant(currentGrantee, currentPermission)); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText.setLength(0); }
public void endElement(String uri, String name, String qName) { if (qName.equals("TargetBucket")) { this.targetBucket = currentOrNull(currentText); } else if (qName.equals("TargetPrefix")) { this.targetPrefix = currentOrNull(currentText); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { targetGrants.add(new Grant(currentGrantee, currentPermission)); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText = new StringBuilder(); }
public void endElement(String uri, String name, String qName) { if (qName.equals("Owner")) { CanonicalUser owner = new CanonicalUser(currentId); owner.setDisplayName(currentDisplayName); acl.setOwner(owner); } else if (qName.equals("Grantee")) { if ("AmazonCustomerByEmail".equals(currentGranteeType)) { currentGrantee = new EmailAddressGrantee(currentId); } else if ("CanonicalUser".equals(currentGranteeType)) { currentGrantee = new CanonicalUserGrantee(currentId, currentDisplayName); } else if ("Group".equals(currentGranteeType)) { currentGrantee = new GroupGrantee(URI.create(currentId)); } } else if (qName.equals("Grant")) { acl.addPermission(currentGrantee, currentPermission); } else if (qName.equals("ID") || qName.equals("EmailAddress") || qName.equals("URI")) { currentId = currentOrNull(currentText); } else if (qName.equals("DisplayName")) { currentDisplayName = currentOrNull(currentText); } else if (qName.equals("Permission")) { currentPermission = currentOrNull(currentText); } currentText = new StringBuilder(); }
/** * Revoke a permission for the given group grantee, if this specific permission was granted. * * Note that you must be very explicit about the permissions you revoke, you cannot revoke * partial permissions and expect this class to determine the implied remaining permissions. For * example, if you revoke the {@link Permission#READ} permission from a grantee with * {@link Permission#FULL_CONTROL} access, <strong>the revocation will do nothing</strong> and * the grantee will retain full access. To change the access settings for this grantee, you must * first remove the {@link Permission#FULL_CONTROL} permission the add back the * {@link Permission#READ} permission. * * @param groupGranteeURI * @param permission */ public AccessControlList revokePermission(URI groupGranteeURI, String permission) { return revokePermission(new GroupGrantee(groupGranteeURI), permission); }
/** * Revoke a permission for the given group grantee, if this specific permission was granted. * * Note that you must be very explicit about the permissions you revoke, you cannot revoke * partial permissions and expect this class to determine the implied remaining permissions. For * example, if you revoke the {@link Permission#READ} permission from a grantee with * {@link Permission#FULL_CONTROL} access, <strong>the revocation will do nothing</strong> and * the grantee will retain full access. To change the access settings for this grantee, you must * first remove the {@link Permission#FULL_CONTROL} permission the add back the * {@link Permission#READ} permission. * * @param groupGranteeURI * @param permission */ public AccessControlList revokePermission(URI groupGranteeURI, String permission) { return revokePermission(new GroupGrantee(groupGranteeURI), permission); }
/** * Revoke a permission for the given group grantee, if this specific permission was granted. * * Note that you must be very explicit about the permissions you revoke, you cannot revoke * partial permissions and expect this class to determine the implied remaining permissions. For * example, if you revoke the {@link Permission#READ} permission from a grantee with * {@link Permission#FULL_CONTROL} access, <strong>the revocation will do nothing</strong> and * the grantee will retain full access. To change the access settings for this grantee, you must * first remove the {@link Permission#FULL_CONTROL} permission the add back the * {@link Permission#READ} permission. * * @param groupGranteeURI * @param permission */ public AccessControlList revokePermission(URI groupGranteeURI, String permission) { return revokePermission(new GroupGrantee(groupGranteeURI), permission); }
/** * Revoke a permission for the given group grantee, if this specific permission was granted. * * Note that you must be very explicit about the permissions you revoke, you cannot revoke * partial permissions and expect this class to determine the implied remaining permissions. For * example, if you revoke the {@link Permission#READ} permission from a grantee with * {@link Permission#FULL_CONTROL} access, <strong>the revocation will do nothing</strong> and * the grantee will retain full access. To change the access settings for this grantee, you must * first remove the {@link Permission#FULL_CONTROL} permission the add back the * {@link Permission#READ} permission. * * @param groupGranteeURI * @param permission */ public AccessControlList revokePermission(URI groupGranteeURI, String permission) { return revokePermission(new GroupGrantee(groupGranteeURI), permission); }
/** * Revoke a permission for the given group grantee, if this specific permission was granted. * * Note that you must be very explicit about the permissions you revoke, you cannot revoke * partial permissions and expect this class to determine the implied remaining permissions. For * example, if you revoke the {@link Permission#READ} permission from a grantee with * {@link Permission#FULL_CONTROL} access, <strong>the revocation will do nothing</strong> and * the grantee will retain full access. To change the access settings for this grantee, you must * first remove the {@link Permission#FULL_CONTROL} permission the add back the * {@link Permission#READ} permission. * * @param groupGranteeURI * @param permission */ public AccessControlList revokePermission(URI groupGranteeURI, String permission) { return revokePermission(new GroupGrantee(groupGranteeURI), permission); }
/** * Add a permission for the given group grantee. * * @param groupGranteeURI * @param permission */ public AccessControlList addPermission(URI groupGranteeURI, String permission) { return addPermission(new GroupGrantee(groupGranteeURI), permission); }
/** * Add a permission for the given group grantee. * * @param groupGranteeURI * @param permission */ public AccessControlList addPermission(URI groupGranteeURI, String permission) { return addPermission(new GroupGrantee(groupGranteeURI), permission); }
/** * Add a permission for the given group grantee. * * @param groupGranteeURI * @param permission */ public AccessControlList addPermission(URI groupGranteeURI, String permission) { return addPermission(new GroupGrantee(groupGranteeURI), permission); }
/** * Add a permission for the given group grantee. * * @param groupGranteeURI * @param permission */ public AccessControlList addPermission(URI groupGranteeURI, String permission) { return addPermission(new GroupGrantee(groupGranteeURI), permission); }
/** * Add a permission for the given group grantee. * * @param groupGranteeURI * @param permission */ public AccessControlList addPermission(URI groupGranteeURI, String permission) { return addPermission(new GroupGrantee(groupGranteeURI), permission); }