@Path(value="patchable-state") @Produces(value="application/json") public class PatchableResource extends Object
| Constructor and Description |
|---|
PatchableResource() |
| Modifier and Type | Method and Description |
|---|---|
State |
getState()
Get current resource state.
|
State |
patchState(State newState)
Set new resource state.
|
@GET @Consumes(value="application/json") public State getState()
@PATCH @Consumes(value="application/json-patch+json") public State patchState(State newState)
We only need to replace the resource state with the one passed into the method
as the actual state patching occurred in the PatchingInterceptor.
newState - new resource state.Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.