Class DeleteMediaTypeCommand
- java.lang.Object
-
- io.apicurio.datamodels.cmd.AbstractCommand
-
- io.apicurio.datamodels.cmd.commands.DeleteMediaTypeCommand
-
- All Implemented Interfaces:
ICommand
public class DeleteMediaTypeCommand extends AbstractCommand
A command used to delete a single mediaType from an operation.- Author:
- eric.wittmann@gmail.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeleteMediaTypeCommand.MediaTypeRemoverstatic classDeleteMediaTypeCommand.MediaTypeRestorer
-
Field Summary
Fields Modifier and Type Field Description String_mediaTypeNameNodePath_mediaTypePathcom.fasterxml.jackson.databind.node.ObjectNode_oldMediaTypeint_oldMediaTypeIndexNodePath_parentPath
-
Constructor Summary
Constructors Constructor Description DeleteMediaTypeCommand()DeleteMediaTypeCommand(OpenApiMediaType mediaType)
-
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
-
-
-
-
Constructor Detail
-
DeleteMediaTypeCommand
public DeleteMediaTypeCommand()
-
DeleteMediaTypeCommand
public DeleteMediaTypeCommand(OpenApiMediaType mediaType)
-
-
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)
-
-