public class TriggeredAction extends NamedLapElement
IWorkExecutor, Competence
or ActionPattern. The call needs name of a callee and possibly some
arguments to pass.
How is the target determined? Engine takes the name and checks if there is a Competence
or ActionPattern with same name (names of all C and AP are unique,
otherwise they get DuplicateNameException). If there is, the action
will execute the found C/AP. If there is no such C/AP, it assumes that is is
a name of an action so it tries to use IWorkExecutor. If that fails,
stop the bot.
Note that we do not allow cycles (thx to CycleException).| Modifier and Type | Field and Description |
|---|---|
static DataFlavor |
dataFlavor |
static String |
taArgs |
static String |
taName |
IDENT_PATTERN| Modifier and Type | Method and Description |
|---|---|
PrimitiveCall |
getActionCall() |
Arguments |
getArguments()
Get arguments of this action.
|
List<PoshElement> |
getChildDataNodes()
Get list of children of this node.
|
DataFlavor |
getDataFlavor()
Get data flavour of posh plan element,used during DnD from palette to
PoshScene.
|
String |
getName()
Get name of the element.
|
boolean |
moveChild(int newIndex,
PoshElement child)
Move child to the @newIndex.
|
void |
setActionName(String newName)
Set name of the action.
|
void |
setArguments(Arguments newArguments)
Action basically consists from
|
void |
synchronize(TriggeredAction source)
Take @source action and set all properties (name, parameters...) to be
same as the @source.
|
String |
toString() |
getUnusedName, isUsedName, moveChildInListaddElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getNumberOfChildInstances, getParent, getRootNode, isChildOfParent, removeElementListener, setParentpublic static final DataFlavor dataFlavor
public static final String taName
public static final String taArgs
public List<PoshElement> getChildDataNodes()
PoshElementgetChildDataNodes in class PoshElementpublic String getName()
NamedLapElementgetName in class NamedLapElementpublic PrimitiveCall getActionCall()
public void setActionName(String newName) throws InvalidNameException, CycleException
newName - New name of an actionInvalidNameException - If name is not validCycleException - if namechange would cause a cycle.public boolean moveChild(int newIndex,
PoshElement child)
PoshElementmoveChild in class PoshElementpublic DataFlavor getDataFlavor()
PoshElementgetDataFlavor in class PoshElementpublic void synchronize(TriggeredAction source) throws CycleException
source - The source of the data this action will synchronize to.CycleExceptionpublic void setArguments(Arguments newArguments)
public Arguments getArguments()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.