Class PatchableResource
- java.lang.Object
-
- org.glassfish.jersey.examples.httppatch.PatchableResource
-
-
Constructor Summary
Constructors Constructor Description PatchableResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StategetState()Get current resource state.StatepatchState(State newState)Set new resource state.
-
-
-
Method Detail
-
getState
@GET @Consumes("application/json") public State getState()
Get current resource state.- Returns:
- current resource state.
-
patchState
@PATCH @Consumes("application/json-patch+json") public State patchState(State newState)
Set new resource state.We only need to replace the resource state with the one passed into the method as the actual state patching occurred in the
PatchingInterceptor.- Parameters:
newState- new resource state.- Returns:
- patched state.
-
-