List of usage examples for com.amazonaws.services.s3.model Owner getId
public String getId()
Gets the ID of the owner.
From source file:com.upplication.s3fs.S3FileSystemProvider.java
License:Open Source License
/** * check if the param acl has the same owner than the parameter owner and * have almost one of the permission set in the parameter permissions * @param acl//from www . ja v a2 s . c o m * @param owner * @param permissions almost one * @return */ private boolean hasPermissions(AccessControlList acl, Owner owner, EnumSet<Permission> permissions) { boolean result = false; for (Grant grant : acl.getGrants()) { if (grant.getGrantee().getIdentifier().equals(owner.getId()) && permissions.contains(grant.getPermission())) { result = true; break; } } return result; }