public class MActivity extends MAssociationTarget
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
activitytype
The activity type.
|
protected java.util.Map<java.lang.String,java.util.List<jadex.commons.FieldInfo>> |
argumentinjections
The argument injection targets.
|
protected jadex.commons.MethodInfo |
bodymethod
The body method cached for speed.
|
protected jadex.commons.MethodInfo |
cancelmethod
The body method cached for speed.
|
protected jadex.bridge.ClassInfo |
clazz
The class.
|
protected java.util.List<jadex.commons.FieldInfo> |
componentinjections
The component injection targets.
|
protected boolean |
eventhandler
The flag if this activity is an event handler.
|
protected java.util.List<MActivity> |
eventhandlers
The event handlers.
|
static java.lang.String |
IFACE
The interface name.
|
protected java.util.List<java.lang.Object> |
incomingmessagesdescriptions
The incoming messages description.
|
protected java.lang.String |
incomingsequenceedgesdescription
The incoming sequence edges description.
|
protected java.util.List<MDataEdge> |
indataedges
The incoming data edges.
|
protected java.util.List<MMessagingEdge> |
inmsgedges
The incoming message edges.
|
protected java.util.List<MSequenceEdge> |
inseqedges
The incoming sequence edges.
|
static java.lang.String |
ISSEQUENTIAL
Constant for the sequential result execution mode .
|
static java.lang.String |
ISSERVICE
Is service constant.
|
protected MLane |
lane
The lane (if any).
|
protected java.lang.String |
lanedescription
The lane description.
|
protected boolean |
looping
The looping flag.
|
static java.lang.String |
METHOD
The method name.
|
protected static jadex.commons.MethodInfo |
MI_NOTFOUND |
protected java.util.List<MDataEdge> |
outdataedges
The outgoing data edges.
|
protected java.util.List<java.lang.Object> |
outgoingmessagesdescriptions
The outgoing messages description.
|
protected java.lang.String |
outgoingsequenceedgesdescription
The outgoing sequence edges description.
|
protected java.util.List<MMessagingEdge> |
outmsgedges
The outgoing message edges.
|
protected java.util.List<MSequenceEdge> |
outseqedges
The outgoing sequence edges.
|
protected jadex.commons.collection.IndexMap<java.lang.String,MParameter> |
parameters
The parameters (name -> MParameter).
|
protected MPool |
pool
The pool.
|
protected jadex.commons.collection.IndexMap<java.lang.String,MProperty> |
properties
The properties (name -> MProperty).
|
protected java.util.Map<java.lang.String,jadex.commons.FieldInfo> |
resultinjections
The result injection targets.
|
static java.lang.String |
RESULTNAME
Constant for the result param name.
|
static java.lang.String |
RESULTTYPE
Constant for the result param type (needed for distinguishing collection results from single values).
|
static java.lang.String |
RETURNPARAM
Constant for the return parameter name.
|
protected boolean |
throwing
The throwing flag.
|
protected java.lang.String |
type
The type.
|
associations, associationsdescription
description, name
annotations
id, ID_GENERATOR
Constructor and Description |
---|
MActivity() |
Modifier and Type | Method and Description |
---|---|
void |
addEventHandler(MActivity eventhandler)
Add an event handler.
|
void |
addIncomingDataEdge(MDataEdge edge)
Add an incoming edge.
|
void |
addIncomingMessageDescription(java.lang.Object desc)
Add an incoming message description.
|
void |
addIncomingMessagingEdge(MMessagingEdge edge)
Add an incoming message edge.
|
void |
addIncomingSequenceEdge(MSequenceEdge edge)
Add an incoming edge.
|
void |
addOutgoingDataEdge(MDataEdge edge)
Add an outgoing edge.
|
void |
addOutgoingMessageDescription(java.lang.Object desc)
Add an outgoing message description.
|
void |
addOutgoingMessagingEdge(MMessagingEdge edge)
Add an outgoing message edge.
|
void |
addOutgoingSequenceEdge(MSequenceEdge edge)
Add an outgoing edge.
|
void |
addParameter(MParameter param)
Add a parameter.
|
void |
addProperty(MProperty prop)
Add a property.
|
void |
addProperty(java.lang.String name,
java.lang.String value)
Add a simple string-based property.
|
void |
addProperty(java.lang.String name,
java.lang.String value,
boolean string)
Add a simple string-based property.
|
java.lang.String |
getActivityType()
Get the activity type.
|
jadex.commons.collection.IndexMap<java.lang.String,MParameter> |
getAllParameters(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String[] imports,
java.lang.ClassLoader cl)
Get the parameters.
|
java.util.Map<java.lang.String,java.util.List<jadex.commons.FieldInfo>> |
getArgumentInjections(java.lang.ClassLoader cl)
Get and save the body method info.
|
jadex.commons.MethodInfo |
getBodyMethod(java.lang.ClassLoader cl)
Get and save the body method info.
|
jadex.commons.MethodInfo |
getCancelMethod(java.lang.ClassLoader cl)
Get and save the cancel method info.
|
jadex.bridge.ClassInfo |
getClazz()
Get the class.
|
java.util.List<jadex.commons.FieldInfo> |
getComponentInjections(java.lang.ClassLoader cl)
Get and save the body method info.
|
java.util.List<MActivity> |
getEventHandlers()
Get the event handlers.
|
static java.util.List<jadex.commons.FieldInfo> |
getFields(java.lang.Class<?> body,
java.lang.Class<? extends java.lang.annotation.Annotation> type)
Get method with an annotation.
|
java.util.List<MDataEdge> |
getIncomingDataEdges()
Get the incoming data edges.
|
java.util.List<java.lang.Object> |
getIncomingMessagesDescriptions()
Get the incoming messages description.
|
java.util.List<MMessagingEdge> |
getIncomingMessagingEdges()
Get the incoming message edges.
|
java.util.List<MSequenceEdge> |
getIncomingSequenceEdges()
Get the incoming edges.
|
void |
getIncomingSequenceEdges(java.util.List<MSequenceEdge> inseqedges)
Set the incoming edges.
|
java.lang.String |
getIncomingSequenceEdgesDescription()
Get the xml incoming edges description.
|
MLane |
getLane()
Get the lane of the activity.
|
java.lang.String |
getLaneDescription()
Get the xml lane description.
|
static jadex.commons.MethodInfo |
getMethod(java.lang.Class<?> body,
java.lang.Class<? extends java.lang.annotation.Annotation> type)
Get method with an annotation.
|
java.util.List<MDataEdge> |
getOutgoingDataEdges()
Get the outgoing data edges.
|
java.util.List<java.lang.Object> |
getOutgoingMessagesDescriptions()
Get the xml outgoing messages descriptions.
|
java.util.List<MMessagingEdge> |
getOutgoingMessagingEdges()
Get the outgoing message edges.
|
void |
getOutgoingMessagingEdges(java.util.List<MMessagingEdge> outmsgedges)
Set the outgoing message edges.
|
java.util.List<MSequenceEdge> |
getOutgoingSequenceEdges()
Get the outgoing sequence edges.
|
java.lang.String |
getOutgoingSequenceEdgesDescription()
Get the xml outgoing sequence edges desription.
|
MParameter |
getParameter(java.lang.String name)
Get a parameter by name.
|
jadex.commons.collection.IndexMap<java.lang.String,MParameter> |
getParameters()
Get the parameters.
|
java.util.List<MParameter> |
getParameters(java.lang.String[] dirs)
Get parameters of specific direction(s).
|
java.lang.Object |
getParsedPropertyValue(java.lang.String name)
Get a property value from the model.
|
MPool |
getPool()
Get the pool of the activity.
|
jadex.commons.collection.IndexMap<java.lang.String,MProperty> |
getProperties()
Get the properties.
|
java.lang.String[] |
getPropertyNames()
Returns the property names.
|
jadex.bridge.modelinfo.UnparsedExpression |
getPropertyValue(java.lang.String name)
Get a property value from the model.
|
java.lang.String |
getPropertyValueString(java.lang.String name)
Get a property value string from the model.
|
java.util.Map<java.lang.String,jadex.commons.FieldInfo> |
getResultInjections(java.lang.ClassLoader cl)
Get and save the body method info.
|
java.lang.String |
getType()
Get the type.
|
boolean |
hasInitialPropertyValue(java.lang.String name)
Test, if a property is declared and has nonull unparsed expression.
|
boolean |
hasParameter(java.lang.String name)
Test if a prop exists.
|
boolean |
hasProperty(java.lang.String name)
Test if a property exists.
|
boolean |
hasPropertyValue(java.lang.String name)
Test, if a property is declared and has nonull unparsed expression.
|
boolean |
isEndEvent()
Test if activity is a end event.
|
boolean |
isEvent()
Test if activity is event.
|
boolean |
isEventHandler()
Get the eventhandler.
|
boolean |
isGateway()
Test if activity is gateway.
|
boolean |
isIntermediateEvent()
Test if activity is an intermediate event.
|
boolean |
isLooping()
Test if the activity is looping.
|
boolean |
isMessageEvent()
Test if activity is event.
|
boolean |
isSignalEvent()
Test if activity is event.
|
boolean |
isStartEvent()
Test if activity is a start event.
|
boolean |
isThrowing()
Test if the activity is throwing.
|
void |
removeEventHandler(MActivity eventhandler)
Remove an event handler.
|
void |
removeIncomingDataEdge(MDataEdge edge)
Remove an outgoing edge.
|
void |
removeIncomingMessageDescription(java.lang.Object desc)
Remove an incoming message description.
|
void |
removeIncomingMessagingEdge(MMessagingEdge edge)
Remove an incoming message edge.
|
void |
removeIncomingSequenceEdge(MSequenceEdge edge)
Remove an incoming edge.
|
void |
removeOutgoingDataEdge(MDataEdge edge)
Remove an outgoing edge.
|
void |
removeOutgoingMessageDescription(java.lang.Object desc)
Remove an outgoing message description.
|
void |
removeOutgoingMessagingEdge(MMessagingEdge edge)
Remove an outgoing message edge.
|
void |
removeOutgoingSequenceEdge(MSequenceEdge edge)
Remove an outgoing edge.
|
void |
removeParameter(MParameter param)
Remove a parameter.
|
void |
removeParameter(java.lang.String name)
Remove a parameter.
|
void |
removeParameters()
Remove a parameter.
|
void |
removeProperty(MProperty prop)
Remove a property.
|
void |
removeProperty(java.lang.String propname)
Remove a property.
|
void |
setActivityType(java.lang.String activitytype)
Set the activity type.
|
void |
setClazz(jadex.bridge.ClassInfo clazz)
Set the class.
|
void |
setEventHandler(boolean eventhandler)
Set the eventhandler.
|
void |
setIncomingDataEdges(java.util.List<MDataEdge> indataedges)
Set the incoming data edges.
|
void |
setIncomingMessagingEdges(java.util.List<MMessagingEdge> inmsgedges)
Set the incoming message edges.
|
void |
setIncomingSequenceEdgesDescription(java.lang.String incomingedges)
Set the xml incoming edges description.
|
void |
setLane(MLane lane)
Set the lane of the activity.
|
void |
setLaneDescription(java.lang.String lanedescription)
Set the xml lane description.
|
void |
setLooping(boolean looping)
Set the looping state.
|
void |
setOutgoingDataEdges(java.util.List<MDataEdge> outdataedges)
Set the outgoing data edges.
|
void |
setOutgoingSequenceEdges(java.util.List<MSequenceEdge> outseqedges)
Set the outgoing sequence edges.
|
void |
setOutgoingSequenceEdgesDescription(java.lang.String outgoingedges)
Set the xml outgoing edges desription.
|
void |
setParameter(java.lang.String name,
java.lang.String value,
java.lang.Class<?> type,
boolean string,
java.lang.String direction)
Set a parameter value:
a) val==null -> remove property
b) val!=null && !hasProp(name) -> addProp(name, val)
c) val!=null && hasProp(name) -> setInitialVal(val)
|
void |
setParameters(jadex.commons.collection.IndexMap<java.lang.String,MParameter> parameters)
Sets the parameters.
|
void |
setPool(MPool pool)
Set the pool of the activity.
|
void |
setProperties(jadex.commons.collection.IndexMap<java.lang.String,MProperty> properties)
Set the properties.
|
void |
setProperty(java.lang.String name,
java.lang.String value,
boolean string)
Set a property value:
a) val==null -> remove property
b) val!=null && !hasProp(name) -> addProp(name, val)
c) val!=null && hasProp(name) -> setInitialVal(val)
|
void |
setPropertyValue(java.lang.String name,
jadex.javaparser.IParsedExpression exp)
Legacy conversion to unparsed expression.
|
void |
setPropertyValue(java.lang.String name,
jadex.bridge.modelinfo.UnparsedExpression exp)
Legacy conversion from unparsed expression.
|
void |
setThrowing(boolean throwing)
Set the throwing state.
|
void |
setType(java.lang.String type)
Set the type.
|
java.lang.String |
toString()
Create a string representation of this activity.
|
addAssociation, getAssociations, getAssociationsDescription, removeAssociation, setAssociationsDescription
getDescription, getName, setDescription, setName
addAnnotation, getAnnotations
equals, getId, hashCode, setId
protected static final jadex.commons.MethodInfo MI_NOTFOUND
public static final java.lang.String RETURNPARAM
public static final java.lang.String IFACE
public static final java.lang.String METHOD
public static final java.lang.String ISSERVICE
public static final java.lang.String ISSEQUENTIAL
public static final java.lang.String RESULTNAME
public static final java.lang.String RESULTTYPE
protected java.lang.String lanedescription
protected java.lang.String outgoingsequenceedgesdescription
protected java.lang.String incomingsequenceedgesdescription
protected java.util.List<java.lang.Object> incomingmessagesdescriptions
protected java.util.List<java.lang.Object> outgoingmessagesdescriptions
protected java.util.List<MSequenceEdge> outseqedges
protected java.util.List<MSequenceEdge> inseqedges
protected java.util.List<MMessagingEdge> outmsgedges
protected java.util.List<MMessagingEdge> inmsgedges
protected java.util.List<MDataEdge> outdataedges
protected java.util.List<MDataEdge> indataedges
protected java.lang.String type
protected java.lang.String activitytype
protected boolean looping
protected boolean throwing
protected java.util.List<MActivity> eventhandlers
protected MPool pool
protected MLane lane
protected boolean eventhandler
protected jadex.commons.collection.IndexMap<java.lang.String,MParameter> parameters
protected jadex.commons.collection.IndexMap<java.lang.String,MProperty> properties
protected jadex.bridge.ClassInfo clazz
protected volatile jadex.commons.MethodInfo bodymethod
protected volatile jadex.commons.MethodInfo cancelmethod
protected volatile java.util.List<jadex.commons.FieldInfo> componentinjections
protected volatile java.util.Map<java.lang.String,java.util.List<jadex.commons.FieldInfo>> argumentinjections
protected volatile java.util.Map<java.lang.String,jadex.commons.FieldInfo> resultinjections
public java.lang.String getLaneDescription()
public void setLaneDescription(java.lang.String lanedescription)
lanedescription
- The lane description to set.public java.lang.String getOutgoingSequenceEdgesDescription()
public void setOutgoingSequenceEdgesDescription(java.lang.String outgoingedges)
outgoingedges
- The outgoing edges to set.public java.lang.String getIncomingSequenceEdgesDescription()
public void setIncomingSequenceEdgesDescription(java.lang.String incomingedges)
incomingedges
- The incoming edges to set.public java.util.List<java.lang.Object> getOutgoingMessagesDescriptions()
public void addOutgoingMessageDescription(java.lang.Object desc)
desc
- The description.public void removeOutgoingMessageDescription(java.lang.Object desc)
desc
- The description.public java.util.List<java.lang.Object> getIncomingMessagesDescriptions()
public void addIncomingMessageDescription(java.lang.Object desc)
desc
- The description.public void removeIncomingMessageDescription(java.lang.Object desc)
desc
- The description.public java.util.List<MSequenceEdge> getOutgoingSequenceEdges()
public void setOutgoingSequenceEdges(java.util.List<MSequenceEdge> outseqedges)
outseqedges
- The outgoing sequence edges.public void addOutgoingSequenceEdge(MSequenceEdge edge)
edge
- The edge.public void removeOutgoingSequenceEdge(MSequenceEdge edge)
edge
- The edge.public java.util.List<MSequenceEdge> getIncomingSequenceEdges()
public void getIncomingSequenceEdges(java.util.List<MSequenceEdge> inseqedges)
inseqedges
- The incoming edges.public void addIncomingSequenceEdge(MSequenceEdge edge)
edge
- The edge.public void removeIncomingSequenceEdge(MSequenceEdge edge)
edge
- The edge.public java.util.List<MMessagingEdge> getOutgoingMessagingEdges()
public void getOutgoingMessagingEdges(java.util.List<MMessagingEdge> outmsgedges)
outmsgedges
- The outgoing message edges.public void addOutgoingMessagingEdge(MMessagingEdge edge)
edge
- The edge.public void removeOutgoingMessagingEdge(MMessagingEdge edge)
edge
- The edge.public java.util.List<MMessagingEdge> getIncomingMessagingEdges()
public void setIncomingMessagingEdges(java.util.List<MMessagingEdge> inmsgedges)
inmsgedges
- The incoming message edges.public void addIncomingMessagingEdge(MMessagingEdge edge)
edge
- The edge.public void removeIncomingMessagingEdge(MMessagingEdge edge)
edge
- The edge.public void addOutgoingDataEdge(MDataEdge edge)
edge
- The edge.public void removeOutgoingDataEdge(MDataEdge edge)
edge
- The edge.public void addIncomingDataEdge(MDataEdge edge)
edge
- The edge.public void removeIncomingDataEdge(MDataEdge edge)
edge
- The edge.public java.util.List<MDataEdge> getIncomingDataEdges()
public void setIncomingDataEdges(java.util.List<MDataEdge> indataedges)
indataedges
- The incoming data edges.public java.util.List<MDataEdge> getOutgoingDataEdges()
public void setOutgoingDataEdges(java.util.List<MDataEdge> outdataedges)
outdataedges
- The outgoing data edges.public java.lang.String getType()
public void setType(java.lang.String type)
type
- The type to set.public java.lang.String getActivityType()
public void setActivityType(java.lang.String activitytype)
activitytype
- The activity type to set.public boolean isLooping()
public void setLooping(boolean looping)
looping
- The looping state to set.public boolean isThrowing()
public void setThrowing(boolean throwing)
throwing
- The throwing state to set.public java.util.List<MActivity> getEventHandlers()
public void addEventHandler(MActivity eventhandler)
eventhandler
- The event handler.public void removeEventHandler(MActivity eventhandler)
eventhandler
- The event handler.public jadex.commons.collection.IndexMap<java.lang.String,MParameter> getParameters()
public MParameter getParameter(java.lang.String name)
public jadex.commons.collection.IndexMap<java.lang.String,MParameter> getAllParameters(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String[] imports, java.lang.ClassLoader cl)
public java.util.List<MParameter> getParameters(java.lang.String[] dirs)
public void setParameters(jadex.commons.collection.IndexMap<java.lang.String,MParameter> parameters)
parameters
- The parameters.public boolean hasParameter(java.lang.String name)
public void addParameter(MParameter param)
param
- The parameter.public void removeParameter(MParameter param)
param
- The parameter.public void removeParameter(java.lang.String name)
param
- The parameter.public void removeParameters()
param
- The parameter.public void setPropertyValue(java.lang.String name, jadex.bridge.modelinfo.UnparsedExpression exp)
name
- Nameexp
- public void setPropertyValue(java.lang.String name, jadex.javaparser.IParsedExpression exp)
name
- Nameexp
- public java.lang.String getPropertyValueString(java.lang.String name)
name
- The name.public jadex.bridge.modelinfo.UnparsedExpression getPropertyValue(java.lang.String name)
name
- The name.public java.lang.Object getParsedPropertyValue(java.lang.String name)
name
- The name.public java.lang.String[] getPropertyNames()
public boolean hasPropertyValue(java.lang.String name)
name
- The property name.public boolean hasInitialPropertyValue(java.lang.String name)
name
- The property name.public jadex.commons.collection.IndexMap<java.lang.String,MProperty> getProperties()
public void setProperties(jadex.commons.collection.IndexMap<java.lang.String,MProperty> properties)
properties
- public boolean hasProperty(java.lang.String name)
public void addProperty(MProperty prop)
prop
- The property.public void addProperty(java.lang.String name, java.lang.String value)
name
- Property name.value
- The string value.public void addProperty(java.lang.String name, java.lang.String value, boolean string)
name
- Property name.value
- The string value.public void removeProperty(java.lang.String propname)
propname
- Name of the property.public void removeProperty(MProperty prop)
prop
- The property.public void setProperty(java.lang.String name, java.lang.String value, boolean string)
public void setParameter(java.lang.String name, java.lang.String value, java.lang.Class<?> type, boolean string, java.lang.String direction)
public java.lang.String toString()
toString
in class java.lang.Object
public MPool getPool()
public void setPool(MPool pool)
pool
- The pool of the activity.public MLane getLane()
public void setLane(MLane lane)
lane
- The lane of the activity.public boolean isEventHandler()
public void setEventHandler(boolean eventhandler)
eventhandler
- The eventhandler to set.public jadex.bridge.ClassInfo getClazz()
public void setClazz(jadex.bridge.ClassInfo clazz)
clazz
- The class to set.public boolean isEvent()
public boolean isStartEvent()
public boolean isEndEvent()
public boolean isIntermediateEvent()
public boolean isMessageEvent()
public boolean isSignalEvent()
public boolean isGateway()
public jadex.commons.MethodInfo getBodyMethod(java.lang.ClassLoader cl)
public jadex.commons.MethodInfo getCancelMethod(java.lang.ClassLoader cl)
public java.util.List<jadex.commons.FieldInfo> getComponentInjections(java.lang.ClassLoader cl)
public java.util.Map<java.lang.String,java.util.List<jadex.commons.FieldInfo>> getArgumentInjections(java.lang.ClassLoader cl)
public java.util.Map<java.lang.String,jadex.commons.FieldInfo> getResultInjections(java.lang.ClassLoader cl)
public static jadex.commons.MethodInfo getMethod(java.lang.Class<?> body, java.lang.Class<? extends java.lang.annotation.Annotation> type)
public static java.util.List<jadex.commons.FieldInfo> getFields(java.lang.Class<?> body, java.lang.Class<? extends java.lang.annotation.Annotation> type)