public class TriggeredAction extends PoshDummyElement implements IReferenceElement, INamedElement
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.
|
DataFlavor |
getDataFlavor()
Get data flavour of posh plan element,used during DnD from palette to
PoshScene.
|
List<PoshElement> |
getChildDataNodes()
Get list of children of this node.
|
String |
getName()
Get name of the element.
|
LapType |
getType()
Get type of the element.
|
boolean |
moveChild(int newIndex,
PoshElement child)
Move child to the @newIndex.
|
void |
rename(String newName)
XXX: Not implemented, because I don't have a usecase, but interface has it.
|
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() |
getElementId, getUnusedName, isUsedName, moveChildInListaddElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getChildId, getChildren, getId, 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()
INamedElementgetName in interface INamedElementpublic 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 void rename(String newName) throws InvalidNameException, CycleException, DuplicateNameException
rename in interface INamedElementnewName - What will be new name of all actions with old name.InvalidNameException - Passed name is not valid Yaposh name.CycleException - Renaming causes cycle.DuplicateNameException - Such name is already used in the plan.public boolean moveChild(int newIndex,
PoshElement child)
PoshElementmoveChild in class PoshElementpublic DataFlavor getDataFlavor()
PoshElementgetDataFlavor in class PoshElementpublic LapType getType()
PoshElementgetType 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()
getArguments in interface IReferenceElementCopyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.