Class AcceptActions

java.lang.Object
com.dassault_systemes.modeler.sysml.model.AcceptActions

@OpenApiAll public class AcceptActions extends Object
Utility methods for accessing and modifying the payload and receiver parameters of an AcceptActionUsage.
  • Field Details

    • PAYLOAD_PARAMETER_INDEX

      public static final int PAYLOAD_PARAMETER_INDEX
      Index of the payload input parameter.
      See Also:
    • RECEIVER_PARAMETER_INDEX

      public static final int RECEIVER_PARAMETER_INDEX
      Index 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 usage
      definitions - 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 usage
      definitions - the definitions to add as payload types
    • getOwnedPayloadParameter

      @CheckForNull public static Feature getOwnedPayloadParameter(AcceptActionUsage actionUsage)
      Returns the owned payload parameter of the accept action, or null if it has not been created.
      Parameters:
      actionUsage - the accept action usage
      Returns:
      the owned payload parameter, or null
    • getOrCreatePayloadParameter

      public static Feature getOrCreatePayloadParameter(AcceptActionUsage actionUsage)
      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

      @CheckForNull public static Feature getOwnedReceiverParameter(AcceptActionUsage actionUsage)
      Returns the owned receiver parameter of the accept action, or null if it has not been created.
      Parameters:
      actionUsage - the accept action usage
      Returns:
      the owned receiver parameter, or null
    • getOrCreateReceiverParameter

      public static Feature getOrCreateReceiverParameter(AcceptActionUsage actionUsage)
      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