public abstract class NewRequestBodyCommand extends AbstractCommand
| Modifier and Type | Field and Description |
|---|---|
boolean |
_created |
NodePath |
_operationPath |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doCreateRequestBody(OasOperation operation)
Creates an empty request body for the given operation.
|
protected abstract void |
doRemoveRequestBody(OasOperation operation)
Removes the request body.
|
void |
execute(Document document)
Called to execute the command against the given document.
|
protected abstract boolean |
hasRequestBody(OasOperation operation)
Returns true if the given operation already has a body parameter.
|
void |
undo(Document document)
Called to undo the command (restore the document to a previous state).
|
isNullOrUndefined, typepublic NodePath _operationPath
public boolean _created
public void execute(Document document)
ICommandpublic void undo(Document document)
ICommandprotected abstract boolean hasRequestBody(OasOperation operation)
operation - protected abstract void doCreateRequestBody(OasOperation operation)
operation - protected abstract void doRemoveRequestBody(OasOperation operation)
operation - Copyright © 2019 Red Hat. All rights reserved.