class StatusResource {

  @GET
  @Path("/{type}/{entity}/{action}")
  public Response getStatus(
      @PathParam("type") String type,
      @PathParam("entity") String entity,
      @PathParam("action") String action
  ) throws Exception {
    CommandId commandId = new CommandId(type, entity, action);

    Optional<CommandStatus> commandStatus = statementExecutor.getStatus(commandId);

    if (!commandStatus.isPresent()) {
      return Errors.notFound("Command not found");
    }

    return Response.ok(commandStatus.get()).build();
  }

  public  StatusResource(StatementExecutor statementExecutor);

}