public void deleteEntity(EntityReference ref, Map<String, Object> params) {
   String id = ref.getId();
   if (id == null) {
     throw new IllegalArgumentException(
         "The reference must include an id for deletes (id is currently null)");
   }
   Poll poll = getPollById(id);
   if (poll == null) {
     throw new IllegalArgumentException("No poll found for the given reference: " + ref);
   }
   try {
     pollListManager.deletePoll(poll);
   } catch (SecurityException e) {
     throw new SecurityException(
         "The current user ("
             + developerHelperService.getCurrentUserReference()
             + ") is not allowed to delete this poll: "
             + ref);
   }
 }