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, type
public NodePath _operationPath
public boolean _created
public void execute(Document document)
ICommand
public void undo(Document document)
ICommand
protected abstract boolean hasRequestBody(OasOperation operation)
operation
- protected abstract void doCreateRequestBody(OasOperation operation)
operation
- protected abstract void doRemoveRequestBody(OasOperation operation)
operation
- Copyright © 2021 Red Hat. All rights reserved.