Class AddPathItemCommand
- java.lang.Object
-
- io.apicurio.datamodels.cmd.AbstractCommand
-
- io.apicurio.datamodels.cmd.commands.AddPathItemCommand
-
- All Implemented Interfaces:
ICommand
public class AddPathItemCommand extends AbstractCommand
A command used to add a new pathItem in a document. Source for the new pathItem must be provided. This source will be converted to an OAS pathItem object and then added to the data model.- Author:
- eric.wittmann@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description String_newPathItemNamecom.fasterxml.jackson.databind.node.ObjectNode_newPathItemObjboolean_nullPathItemsboolean_pathItemExists
-
Constructor Summary
Constructors Constructor Description AddPathItemCommand()AddPathItemCommand(String pathItemName)AddPathItemCommand(String pathItemName, com.fasterxml.jackson.databind.node.ObjectNode from)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(Document document)Called to execute the command against the given document.voidundo(Document document)Called to undo the command (restore the document to a previous state).-
Methods inherited from class io.apicurio.datamodels.cmd.AbstractCommand
indexOf, isNullOrUndefined, type
-
-
-
-
Field Detail
-
_pathItemExists
public boolean _pathItemExists
-
_newPathItemName
public String _newPathItemName
-
_newPathItemObj
public com.fasterxml.jackson.databind.node.ObjectNode _newPathItemObj
-
_nullPathItems
public boolean _nullPathItems
-
-
Method Detail
-
execute
public void execute(Document document)
Description copied from interface:ICommandCalled to execute the command against the given document.- See Also:
ICommand.execute(Document)
-
undo
public void undo(Document document)
Description copied from interface:ICommandCalled to undo the command (restore the document to a previous state).- See Also:
ICommand.undo(Document)
-
-