/** * @param granteeURI * @return the permissions assigned to a group grantee. */ public Collection<Permission> getPermissions(GroupGranteeURI granteeURI) { return getPermissions(granteeURI.getIdentifier()); }
/** * @param grantee * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(Grantee grantee, Permission permission) { return hasPermission(grantee.getIdentifier(), permission); }
public Builder fromDeleteResult(DeleteResult result) { return addAll(result.getDeleted()).errors(result.getErrors()); } }
public Builder toBuilder() { return builder().fromDeleteResult(this); }
/** * Add a permission for the given group grantee. * * @param groupGranteeURI * @param permission */ public AccessControlList addPermission(GroupGranteeURI groupGranteeURI, Permission permission) { return addPermission(new GroupGrantee(groupGranteeURI), permission); }
/** * @param grantee * @return the permissions assigned to a grantee. */ public Collection<Permission> getPermissions(Grantee grantee) { return getPermissions(grantee.getIdentifier()); }
public String apply(Object from) { return ((S3Object) from).getMetadata().getKey(); }
public static Builder builder() { return new Builder(); }
/** * Revoke all the permissions granted to the given grantee. * * @param grantee */ public AccessControlList revokeAllPermissions(Grantee grantee) { Collection<Grant> grantsForGrantee = findGrantsForGrantee(grantee.getIdentifier()); grants.removeAll(grantsForGrantee); return this; }
public GroupGrantee(GroupGranteeURI groupURI) { super(groupURI.getIdentifier()); } }
public BucketLogging getResult() { if (targetBucket == null) return null; return new BucketLogging(targetBucket, targetPrefix, targetGrants); }
public Permission apply(Grant g) { return g.getPermission(); } });
public String getEmailAddress() { return getIdentifier(); } }
public Builder fromDeleteResult(DeleteResult result) { return addAll(result.getDeleted()).errors(result.getErrors()); } }
public Builder toBuilder() { return builder().fromDeleteResult(this); }
/** * @param granteeURI * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(GroupGranteeURI granteeURI, Permission permission) { return getPermissions(granteeURI.getIdentifier()).contains(permission); }
public Builder fromDeleteResult(DeleteResult result) { return addAll(result.getDeleted()).errors(result.getErrors()); } }
public Builder toBuilder() { return builder().fromDeleteResult(this); }