Address feedback. #2129

This commit is contained in:
Mark H. Wood
2021-09-02 11:21:47 -04:00
parent 5bc4d16175
commit 76ea271ead
8 changed files with 96 additions and 56 deletions

View File

@@ -82,6 +82,18 @@ public class RequestItemBuilder
requestItemService.delete(context, request);
}
/**
* Delete a request identified by its token. If no such token is known,
* simply return.
* @param token the token identifying the request.
*/
static public void deleteRequestItem(String token) {
try (Context context = new Context()) {
RequestItem request = requestItemService.findByToken(context, token);
requestItemService.delete(context, request);
}
}
@Override
protected RequestItemService getService() {
return requestItemService;