public class ResourceAction
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_RESOURCE_ACTION_ID |
| Modifier | Constructor and Description |
|---|---|
|
ResourceAction(Capability capability,
Command<? extends Capability.CommandId> command)
This class is used to represent the action.
|
protected |
ResourceAction(int id,
Capability capability,
Command<? extends Capability.CommandId> command)
This class is used to represent the action.
|
| Modifier and Type | Method and Description |
|---|---|
static ResourceAction |
fromJson(java.lang.String jsonAction)
A function to create resource action from JSON.
|
Capability |
getCapability()
A function to get the capability on which the command will be executed.
|
Command<? extends Capability.CommandId> |
getCommand()
A function to get the command which get executed while executing the resourceAction.
|
int |
getId()
A function to get the identifier of the current object.
|
java.lang.String |
toJson()
A function to make this ResourceAction to a serialized string.
|
java.lang.String |
toString() |
public static final int DEFAULT_RESOURCE_ACTION_ID
public ResourceAction(Capability capability, Command<? extends Capability.CommandId> command)
capability - The capability to which the command will be sentcommand - The command which will get executedprotected ResourceAction(int id,
Capability capability,
Command<? extends Capability.CommandId> command)
id - The id of the actioncapability - The capability to which the command will be sentcommand - The command which will get executedpublic int getId()
public Command<? extends Capability.CommandId> getCommand()
public Capability getCapability()
public java.lang.String toJson()
public java.lang.String toString()
toString in class java.lang.Objectpublic static ResourceAction fromJson(java.lang.String jsonAction)
jsonAction - The stringified Json format of the resourceAction