public boolean setAcl(String cid, String id, String permission, String clientId) throws StorageCloudException {
try {
GSAccessControlList acl = new GSAccessControlList();
if(permission.equals("rw"))
acl.grantPermission(new UserByIdGrantee(clientId), Permission.PERMISSION_FULL_CONTROL);
else if(permission.equals("r"))
acl.grantPermission(new UserByIdGrantee(clientId), Permission.PERMISSION_READ);
else if(permission.equals("w"))
acl.grantPermission(new UserByIdGrantee(clientId), Permission.PERMISSION_WRITE);
gsService.putBucketAcl(cid, acl);
return true;
} catch (ServiceException e) {
throw new StorageCloudException("AWSS3Exception::" + e.getMessage());
}