Class JsonPatchOperation

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.JsonSerializable
    Direct Known Subclasses:
    DualPathOperation, PathValueOperation, RemoveOperation

    public abstract class JsonPatchOperation
    extends java.lang.Object
    implements com.fasterxml.jackson.databind.JsonSerializable
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable

        com.fasterxml.jackson.databind.JsonSerializable.Base
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static MessageBundle BUNDLE  
      protected java.lang.String op  
      protected java.lang.String path  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected JsonPatchOperation​(java.lang.String op, java.lang.String path)
      Constructor
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.JsonNode apply​(com.fasterxml.jackson.databind.JsonNode node)
      Apply this operation to a JSON value
      abstract com.fasterxml.jackson.databind.JsonNode applyInternal​(com.fasterxml.jackson.databind.JsonNode node)  
      java.lang.String getOp()  
      java.lang.String getPath()  
      abstract java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.fasterxml.jackson.databind.JsonSerializable

        serialize, serializeWithType
    • Field Detail

      • op

        protected final java.lang.String op
      • path

        protected final java.lang.String path
    • Constructor Detail

      • JsonPatchOperation

        protected JsonPatchOperation​(java.lang.String op,
                                     java.lang.String path)
        Constructor
        Parameters:
        op - the operation name
        path - the JSON Pointer for this operation
    • Method Detail

      • apply

        public com.fasterxml.jackson.databind.JsonNode apply​(com.fasterxml.jackson.databind.JsonNode node)
                                                      throws JsonPatchException
        Apply this operation to a JSON value
        Parameters:
        node - the value to patch
        Returns:
        the patched value
        Throws:
        JsonPatchException - operation failed to apply to this value
      • applyInternal

        public abstract com.fasterxml.jackson.databind.JsonNode applyInternal​(com.fasterxml.jackson.databind.JsonNode node)
                                                                       throws JsonPatchException
        Throws:
        JsonPatchException
      • getOp

        public final java.lang.String getOp()
      • getPath

        public final java.lang.String getPath()
      • toString

        public abstract java.lang.String toString()
        Overrides:
        toString in class java.lang.Object