O - output type of the actionpublic class ActionResult<O> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ActionResult.StatusFlag |
| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR
Result code for error.
|
static String |
SUCCESS
Result code for success.
|
| Constructor and Description |
|---|
ActionResult(String resultCode)
Constructor with a result code.
|
ActionResult(String resultCode,
O data)
Constructor with a result code and data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOutputSocketToSend(String outputId,
Object outputData)
Adds data to be sent to the output socket with the given ID after the action has performed.
|
void |
addSocketAfterOperation(BackgroundOperationDefinition definition)
Registers a background operation.
|
O |
getData()
Returns the output data returned by the performed action.
|
Map<String,Object> |
getOutputsToSend()
Returns socket outputs and data to be sent after the action is has performed.
|
String |
getResultCode()
Returns the result code of the action.
|
String |
getResultMessage()
Returns the result message.
|
List<BackgroundOperationDefinition> |
getSocketAfterOperation()
Retuns all background operations.
|
EnumSet<ActionResult.StatusFlag> |
getStatusFlags() |
void |
setData(O data)
Sets the output data of the performed action.
|
void |
setResultCode(String resultCode)
Sets the result code of the action.
|
void |
setResultMessage(String resultMessage)
Sets the result message.
|
void |
setStatusFlags(EnumSet<ActionResult.StatusFlag> statusFlags) |
public static final String SUCCESS
public static final String ERROR
public ActionResult(String resultCode)
public O getData()
public void setData(O data)
data - output data of the performed actionpublic String getResultCode()
public void setResultCode(String resultCode)
public String getResultMessage()
public void setResultMessage(String resultMessage)
resultMessage - result messagepublic Map<String,Object> getOutputsToSend()
public void addOutputSocketToSend(String outputId, Object outputData)
outputId - output ID of the socket through which the data should be sent. It is a socket of the widget the
action
resides in.outputData - the data to be sentpublic void addSocketAfterOperation(BackgroundOperationDefinition definition)
definition - background operationpublic List<BackgroundOperationDefinition> getSocketAfterOperation()
public EnumSet<ActionResult.StatusFlag> getStatusFlags()
public void setStatusFlags(EnumSet<ActionResult.StatusFlag> statusFlags)
Copyright © 2018. All rights reserved.