public List<ResourceGrant> revokeResource(List<Integer> idList) {
    if (deleted) {
      throw new RuntimeException("Session: " +
          sessionId + " has been deleted");
    }

    List<ResourceGrant> canceledGrants = new ArrayList<ResourceGrant>();
    for (Integer id : idList) {
      ResourceRequestInfo req = idToRequest.get(id);
      ResourceGrant grant = idToGrant.remove(id);
      if (grant != null) {

        if (req == null) {
          throw new RuntimeException("Session: " + sessionId +
              ", requestId: " + id + " grant exists but request doesn't");
        }

        removeGrantedRequest(req, true);

        // we have previously granted this resource, return to caller
        canceledGrants.add(grant);
      }
    }
    return canceledGrants;
  }
public List < ResourceGrant > revokeResource ( List < Integer > idList ) { if ( deleted ) { throw new RuntimeException ( "Session: " + sessionId + " has been deleted" ) ; } List < ResourceGrant > canceledGrants = new ArrayList < ResourceGrant > ( ) ; for ( Integer id : idList ) { ResourceRequestInfo req = idToRequest . get ( id ) ; ResourceGrant grant = idToGrant . remove ( id ) ; if ( grant != null ) { if ( req == null ) { throw new RuntimeException ( "Session: " + sessionId + ", requestId: " + id + " grant exists but request doesn't" ) ; } removeGrantedRequest ( req , true ) ; canceledGrants . add ( grant ) ; } } return canceledGrants ; }
Revoke a list of resources from a session
@param idList the list of resources to revoke
@return the list of resource grants that have been revoked