Class ReplaceOperationCommand
- java.lang.Object
-
- io.apicurio.datamodels.cmd.AbstractCommand
-
- io.apicurio.datamodels.cmd.commands.AbstractReplaceNodeCommand<OpenApiOperation>
-
- io.apicurio.datamodels.cmd.commands.ReplaceOperationCommand
-
- All Implemented Interfaces:
ICommand
public class ReplaceOperationCommand extends AbstractReplaceNodeCommand<OpenApiOperation>
A command used to replace an operation with a newer version.- Author:
- eric.wittmann@gmail.com
-
-
Field Summary
-
Fields inherited from class io.apicurio.datamodels.cmd.commands.AbstractReplaceNodeCommand
_new, _nodePath, _old
-
-
Constructor Summary
Constructors Constructor Description ReplaceOperationCommand()ReplaceOperationCommand(OpenApiOperation old, OpenApiOperation replacement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OpenApiOperationreadNode(Node parent, com.fasterxml.jackson.databind.node.ObjectNode node)Unmarshalls a node into the appropriate type.protected voidreplaceNode(Node parent, OpenApiOperation newNode)Replaces the old node entry with the new node in the data model, without changing the order of the nodes.-
Methods inherited from class io.apicurio.datamodels.cmd.commands.AbstractReplaceNodeCommand
execute, undo
-
Methods inherited from class io.apicurio.datamodels.cmd.AbstractCommand
indexOf, isNullOrUndefined, type
-
-
-
-
Constructor Detail
-
ReplaceOperationCommand
public ReplaceOperationCommand()
-
ReplaceOperationCommand
public ReplaceOperationCommand(OpenApiOperation old, OpenApiOperation replacement)
-
-
Method Detail
-
replaceNode
protected void replaceNode(Node parent, OpenApiOperation newNode)
Description copied from class:AbstractReplaceNodeCommandReplaces the old node entry with the new node in the data model, without changing the order of the nodes.- Specified by:
replaceNodein classAbstractReplaceNodeCommand<OpenApiOperation>
-
readNode
protected OpenApiOperation readNode(Node parent, com.fasterxml.jackson.databind.node.ObjectNode node)
Description copied from class:AbstractReplaceNodeCommandUnmarshalls a node into the appropriate type.- Specified by:
readNodein classAbstractReplaceNodeCommand<OpenApiOperation>
-
-