@Override
protected void update(String resourceId, HttpServletRequest request)
throws ResourceNotFoundException, InvalidParametersException,
UnauthorizedAccessException {
IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
IAccessRequest ar = persistenceManager.findById(IAccessRequest.class, resourceId);
if (ar == null) throw new ResourceNotFoundException();
String granted = request.getParameter("granted");
if (granted == null) throw new InvalidParametersException();
if (!granted.equals("true") && !granted.equals("false")) throw new InvalidParametersException();
if (granted.equals("true")) grantAccess(persistenceManager, ar);