Class ReplacePathItemCommand
- java.lang.Object
-
- io.apicurio.datamodels.cmd.AbstractCommand
-
- io.apicurio.datamodels.cmd.commands.AbstractReplaceNodeCommand<OpenApiPathItem>
-
- io.apicurio.datamodels.cmd.commands.ReplacePathItemCommand
-
- All Implemented Interfaces:
ICommand
public class ReplacePathItemCommand extends AbstractReplaceNodeCommand<OpenApiPathItem>
A command used to replace a path item 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 ReplacePathItemCommand()ReplacePathItemCommand(OpenApiPathItem old, OpenApiPathItem replacement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OpenApiPathItemreadNode(Node parent, com.fasterxml.jackson.databind.node.ObjectNode node)Unmarshalls a node into the appropriate type.protected voidreplaceNode(Node parent, OpenApiPathItem 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
-
ReplacePathItemCommand
public ReplacePathItemCommand()
-
ReplacePathItemCommand
public ReplacePathItemCommand(OpenApiPathItem old, OpenApiPathItem replacement)
-
-
Method Detail
-
replaceNode
protected void replaceNode(Node parent, OpenApiPathItem 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<OpenApiPathItem>
-
readNode
protected OpenApiPathItem 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<OpenApiPathItem>
-
-