public class HandlingTask
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
HandlingTask |
addData(java.lang.String key,
java.lang.Object value)
Add data to this handling tasks additionalData field.
|
ShopAction |
getAction()
Provides the action type of the task.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAdditionalData()
Provides a key value store that provides more information possibly needed for the task.
|
java.util.Optional<java.lang.String> |
getRedirectUrl()
Provides a redirect URL of the task requires one.
|
static HandlingTask |
of(ShopAction action)
Create a new
HandlingTask instance representing the passed action. |
HandlingTask |
redirectUrl(java.lang.String redirectUrl)
Add a redirect URL to this instance
|
public static HandlingTask of(ShopAction action)
HandlingTask
instance representing the passed action.action
- the ShopAction
to be doneHandlingTask
public HandlingTask redirectUrl(java.lang.String redirectUrl)
redirectUrl
- the URLpublic HandlingTask addData(java.lang.String key, java.lang.Object value)
key
- the identifier of the data objectvalue
- the object to be storedpublic ShopAction getAction()
public java.util.Optional<java.lang.String> getRedirectUrl()
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalData()