Class AbstractReplaceNodeCommand<T extends Node>

    • Field Detail

      • _new

        public com.fasterxml.jackson.databind.node.ObjectNode _new
      • _old

        public com.fasterxml.jackson.databind.node.ObjectNode _old
    • Constructor Detail

      • AbstractReplaceNodeCommand

        public AbstractReplaceNodeCommand()
      • AbstractReplaceNodeCommand

        public AbstractReplaceNodeCommand​(T old,
                                          T replacement)
    • Method Detail

      • undo

        public void undo​(Document document)
        Description copied from interface: ICommand
        Called to undo the command (restore the document to a previous state).
        See Also:
        ICommand.undo(Document)
      • replaceNode

        protected abstract void replaceNode​(Node parent,
                                            T newNode)
        Replaces the old node entry with the new node in the data model, without changing the order of the nodes.
      • readNode

        protected abstract T readNode​(Node parent,
                                      com.fasterxml.jackson.databind.node.ObjectNode node)
        Unmarshalls a node into the appropriate type.