@Override public Supplier<Pair<Integer, JsonNode>> visitQuery(QueryContext ctx) { return state.handleDelete(); } }
@Override public Supplier<Pair<Integer, JsonNode>> visitQuery(QueryContext ctx) { return state.handlePost(); } }
public BaseVisitor(RequestScope requestScope) { state = new StateContext(new StartState(), requestScope); }
@Override public void handle(StateContext state, RootCollectionLoadEntityContext ctx) { PersistentResource record = entityRecord(state, ctx.entity()); state.setState(new RecordTerminalState(record)); }
@Override public void handle(StateContext state, RootCollectionSubCollectionContext ctx) { PersistentResource record = entityRecord(state, ctx.entity()); state.setState(new RecordState(record)); }
@Override public Supplier<Pair<Integer, JsonNode>> handlePatch(StateContext state) { return handleRequest(state, this::patch); }
@Override public Supplier<Pair<Integer, JsonNode>> visitQuery(QueryContext ctx) { return state.handlePatch(); } }
@Override public Supplier<Pair<Integer, JsonNode>> visitQuery(QueryContext ctx) { return state.handleGet(); } }
public Supplier<Pair<Integer, JsonNode>> handleGet() { return currentState.handleGet(this); }
public Supplier<Pair<Integer, JsonNode>> handlePost() { return currentState.handlePost(this); }
public Supplier<Pair<Integer, JsonNode>> handleDelete() { return currentState.handleDelete(this); } }
@Override public void handle(StateContext state, RootCollectionLoadEntityContext ctx) { PersistentResource record = entityRecord(state, ctx.entity()); state.setState(new RecordTerminalState(record)); }
@Override public void handle(StateContext state, RootCollectionSubCollectionContext ctx) { PersistentResource record = entityRecord(state, ctx.entity()); state.setState(new RecordState(record)); }
public BaseVisitor(RequestScope requestScope) { state = new StateContext(new StartState(), requestScope); }
@Override public Supplier<Pair<Integer, JsonNode>> handlePost(StateContext state) { return handleRequest(state, this::post); }
@Override public Supplier<Pair<Integer, JsonNode>> visitQuery(QueryContext ctx) { return state.handleDelete(); } }
@Override public Supplier<Pair<Integer, JsonNode>> visitQuery(QueryContext ctx) { return state.handlePost(); } }
@Override public Supplier<Pair<Integer, JsonNode>> visitQuery(QueryContext ctx) { return state.handlePatch(); } }
@Override public Supplier<Pair<Integer, JsonNode>> visitQuery(QueryContext ctx) { return state.handleGet(); } }
@Override public Supplier<Pair<Integer, JsonNode>> handleDelete(StateContext state) { return handleRequest(state, this::delete); }