Class 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 Detail

      • PatchableResource

        public PatchableResource()
    • 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.