Class PatchableResource
java.lang.Object
org.glassfish.jersey.examples.httppatch.PatchableResource
@Path("patchable-state")
@Produces("application/json")
public class PatchableResource
extends Object
Patchable resource.
- Author:
- Gerard Davison (gerard.davison at oracle.com), Marek Potociar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetState()Get current resource state.patchState(State newState) Set new resource state.
-
Constructor Details
-
PatchableResource
public PatchableResource()
-
-
Method Details
-
getState
Get current resource state.- Returns:
- current resource state.
-
patchState
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.
-