Class AcceptActions
java.lang.Object
com.dassault_systemes.modeler.sysml.model.AcceptActions
Utility methods for accessing and modifying the payload and receiver
parameters of an
AcceptActionUsage.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndex of the payload input parameter.static final intIndex of the receiver input parameter. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddPayload(AcceptActionUsage acceptActionUsage, List<? extends Definition> definitions) Adds the given definitions to the payload parameter of the accept action.static FeaturegetOrCreatePayloadParameter(AcceptActionUsage actionUsage) Returns the payload parameter of the accept action, creating it if necessary.static FeaturegetOrCreateReceiverParameter(AcceptActionUsage actionUsage) Returns the receiver parameter of the accept action, creating it if necessary.static FeaturegetOwnedPayloadParameter(AcceptActionUsage actionUsage) Returns the owned payload parameter of the accept action, ornullif it has not been created.static FeaturegetOwnedReceiverParameter(AcceptActionUsage actionUsage) Returns the owned receiver parameter of the accept action, ornullif it has not been created.static voidsetPayload(AcceptActionUsage actionUsage, List<? extends Definition> definitions) Sets the payload of the accept action to the given definitions.
-
Field Details
-
PAYLOAD_PARAMETER_INDEX
public static final int PAYLOAD_PARAMETER_INDEXIndex of the payload input parameter.- See Also:
-
RECEIVER_PARAMETER_INDEX
public static final int RECEIVER_PARAMETER_INDEXIndex of the receiver input parameter.- See Also:
-
-
Constructor Details
-
AcceptActions
public AcceptActions()
-
-
Method Details
-
setPayload
public static void setPayload(AcceptActionUsage actionUsage, List<? extends Definition> definitions) Sets the payload of the accept action to the given definitions.If a payload parameter already exists, any subsettings or existing value expressions are removed before assigning the new type. Only definition‑based payloads are supported.
- Parameters:
actionUsage- the accept action usagedefinitions- the definitions to assign as payload type(s)
-
addPayload
public static void addPayload(AcceptActionUsage acceptActionUsage, List<? extends Definition> definitions) Adds the given definitions to the payload parameter of the accept action. Creates the payload parameter if it does not already exist.- Parameters:
acceptActionUsage- the accept action usagedefinitions- the definitions to add as payload types
-
getOwnedPayloadParameter
Returns the owned payload parameter of the accept action, ornullif it has not been created.- Parameters:
actionUsage- the accept action usage- Returns:
- the owned payload parameter, or
null
-
getOrCreatePayloadParameter
Returns the payload parameter of the accept action, creating it if necessary.- Parameters:
actionUsage- the accept action usage- Returns:
- the existing or newly created payload parameter
-
getOwnedReceiverParameter
Returns the owned receiver parameter of the accept action, ornullif it has not been created.- Parameters:
actionUsage- the accept action usage- Returns:
- the owned receiver parameter, or
null
-
getOrCreateReceiverParameter
Returns the receiver parameter of the accept action, creating it if necessary.- Parameters:
actionUsage- the accept action usage- Returns:
- the existing or newly created receiver parameter
-