public abstract class BaseState extends Object
Constructor and Description |
---|
BaseState() |
Modifier and Type | Method and Description |
---|---|
protected static Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> |
constructPatchResponse(PersistentResource record,
StateContext stateContext)
Construct PATCH response.
|
protected static com.fasterxml.jackson.databind.JsonNode |
getResponseBody(PersistentResource resource,
RequestScope requestScope) |
void |
handle(StateContext state,
CoreParser.RootCollectionLoadEntitiesContext ctx)
Handle void.
|
void |
handle(StateContext state,
CoreParser.RootCollectionLoadEntityContext ctx)
Handle void.
|
void |
handle(StateContext state,
CoreParser.RootCollectionRelationshipContext ctx)
Handle void.
|
void |
handle(StateContext state,
CoreParser.RootCollectionSubCollectionContext ctx)
Handle void.
|
void |
handle(StateContext state,
CoreParser.SubCollectionReadCollectionContext ctx)
Handle void.
|
void |
handle(StateContext state,
CoreParser.SubCollectionReadEntityContext ctx)
Handle void.
|
void |
handle(StateContext state,
CoreParser.SubCollectionRelationshipContext ctx)
Handle void.
|
void |
handle(StateContext state,
CoreParser.SubCollectionSubCollectionContext ctx)
Handle void.
|
Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> |
handleDelete(StateContext state)
Handle delete.
|
Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> |
handleGet(StateContext state)
We return a Function because we may have to perform post-commit operations.
|
Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> |
handlePatch(StateContext state)
Handle patch.
|
Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> |
handlePost(StateContext state)
Handle post.
|
public void handle(StateContext state, CoreParser.RootCollectionLoadEntitiesContext ctx)
state
- the statectx
- the ctxpublic void handle(StateContext state, CoreParser.RootCollectionLoadEntityContext ctx)
state
- the statectx
- the ctxpublic void handle(StateContext state, CoreParser.RootCollectionSubCollectionContext ctx)
state
- the statectx
- the ctxpublic void handle(StateContext state, CoreParser.RootCollectionRelationshipContext ctx)
state
- the statectx
- the ctxpublic void handle(StateContext state, CoreParser.SubCollectionReadCollectionContext ctx)
state
- the statectx
- the ctxpublic void handle(StateContext state, CoreParser.SubCollectionReadEntityContext ctx)
state
- the statectx
- the ctxpublic void handle(StateContext state, CoreParser.SubCollectionSubCollectionContext ctx)
state
- the statectx
- the ctxpublic void handle(StateContext state, CoreParser.SubCollectionRelationshipContext ctx)
state
- the statectx
- the ctxpublic Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> handleGet(StateContext state) throws HttpStatusException
state
- the stateHttpStatusException
- the http status exceptionpublic Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> handlePatch(StateContext state) throws HttpStatusException
state
- the stateHttpStatusException
- the http status exceptionpublic Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> handlePost(StateContext state) throws HttpStatusException
state
- the stateHttpStatusException
- the http status exceptionpublic Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> handleDelete(StateContext state) throws HttpStatusException
state
- the stateHttpStatusException
- the http status exceptionprotected static Supplier<org.apache.commons.lang3.tuple.Pair<Integer,com.fasterxml.jackson.databind.JsonNode>> constructPatchResponse(PersistentResource record, StateContext stateContext)
record
- a resource that has been updatedstateContext
- a state that contains reference to request scope where we can get status code for updateprotected static com.fasterxml.jackson.databind.JsonNode getResponseBody(PersistentResource resource, RequestScope requestScope)
Copyright © 2015–2021 Yahoo! Inc.. All rights reserved.