@Override
public void modify(final Permission permission) throws PermissionDeniedException {
if(permission instanceof SimpleACLPermission) {
//insert the ace
final SimpleACLPermission aclPermission = ((SimpleACLPermission)permission);
aclPermission.modifyACE(index, access_type, mode);
} else {
throw new PermissionDeniedException("ACL like permissions have not been enabled");
}
}
});