@OpenApiAll
public class InteractionHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
InteractionHelper.InteractionHelperCache |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEEP_ALL_OPERATION |
Constructor and Description |
---|
InteractionHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
addOperationForCallActionProvider(com.nomagic.uml2.ext.jmi.helpers.OperationForCallActionProvider operationForCallActionProvider)
Adds operation provider for call action
|
static Parameter |
addParameterForOperation(Operation operation,
java.lang.String name,
boolean generateName) |
static Parameter |
addParameterForOperation(Operation operation,
java.lang.String name,
boolean generateName,
ParameterDirectionKind directionKind)
Adds a parameter to an operation with a given name.
|
static Property |
addPropertyForSignal(Signal signal,
java.lang.String name,
boolean generateName) |
static boolean |
canChangeMessageType(Message message)
Checks if this message can change its type.
|
static void |
changeSynchForMessage(Message message)
Change synch for message.
|
static java.lang.String |
constructMessageText(Message message,
boolean showParameters)
|
static ValueSpecification |
createArgumentForMessage(Message message,
Type type)
Creates an argument for a message.
|
static ValueSpecification |
createArgumentForMessage(Message message,
Type type,
ValueSpecification defaultValue)
Creates an argument for a message.
|
static void |
createArgumentsForCallMessage(Message message)
Creates the arguments for call message.
|
static Duration |
createDuration(DurationConstraint dc)
Deprecated.
|
static Duration |
createDuration(DurationInterval interval,
boolean createObservation)
Create duration for duration interval min or max.
|
static Property |
createProperty(java.lang.String propertyName,
Classifier type,
Interaction inter)
Creates property into interaction for the lifeline use.
|
static MessageOccurrenceSpecification |
createReceiveEventByMessageSort(Message message)
Creates receive event occurrence according message sort
|
static TimeExpression |
createTimeExpression(TimeConstraint tc)
Deprecated.
|
static TimeExpression |
createTimeExpression(TimeInterval timeInterval,
boolean createObservation)
Creates time expression for give time interval min or max.
|
static void |
disposeMessageArguments(Message message)
Dispose message arguments.
|
static void |
enableExecutionSpecificationModeling(DiagramPresentationElement diagramPresentationElement)
Enable ExecutionSpecification modeling in given Sequence diagram.
|
static void |
ensureCorrectReceiveEvent(Message message,
boolean preserveElementID,
java.lang.String elementIDSuffix)
Ensures that a message has a correct receive occurrence (message or destruction).
|
static boolean |
ensureDestructionOccurrence(Lifeline lifeline,
boolean destruct)
Ensures that a proper destruction occurrence is in the model on this lifeline.
|
static void |
ensureFragmentsAreInFragmentCollection(java.util.Collection<InteractionFragment> collection,
java.util.Collection<InteractionFragment> fragments)
Ensures that fragments are in given fragment collection.
|
static Operation |
findCallOperation(java.lang.String name,
Classifier classifier,
java.util.List<Operation> preferredOperations,
Message message)
Find call operation.
|
static Operation |
findCallOperationWithArguments(java.lang.String name,
Classifier classifier,
java.util.List<Operation> preferredOperations,
int paramCount,
Message message)
Find call operation, which has closest parameter count.
|
static Interaction |
findInteraction(Element interactionElement)
Finds interaction for a given interaction element.
|
static Signal |
findSignalForMessage(Message message,
java.lang.String name)
Find signal for message.
|
static java.util.List<java.lang.Class> |
getArgumentSupportedValueSpecifications()
Get argument supported value specification classes.
|
static java.util.Collection<Operation> |
getAvailableOperationsForCallMessage(Message message)
Gets operations which are available to select for a call message.
|
static java.util.Collection<Signal> |
getAvailableSignals(Message message)
Gets all available signals to select for a message.
|
static DestructionOccurrenceSpecification |
getDestructionOccurrenceSpecification(java.util.Collection<InteractionFragment> collection)
Gets destruction occurrence specification from a given lifeline.
|
static DestructionOccurrenceSpecification |
getDestructionOccurrenceSpecification(Lifeline lifeline)
Gets destruction occurrence specification from a given lifeline.
|
static java.lang.String[] |
getIntervalMinMax(IntervalConstraint interval)
Returns min and max values.
|
static java.lang.Object[] |
getIntervalMinMaxValues(IntervalConstraint interval)
Returns min and max values.
|
static java.util.Collection<Lifeline> |
getLifelines(Message message)
Returns lifelines that are covered by given message
|
static Classifier |
getLifelineType(Lifeline lifeline)
Gets the lifeline type.
|
static Message |
getMessage(Gate gate)
Returns message, to which this gate is connected.
|
static Classifier |
getMessageEndClassifier(Message message,
boolean client)
Returns classifier - receiver of message.
|
static java.util.List<Message> |
getMessages(Lifeline lifeline)
Return all connected messages from given lifeline.
|
static Message |
getMessageSubstitute(Message message)
Returns message substitute for given message or the given message, if no substitution found.
|
static java.lang.String |
getNestedNumberAsString(java.util.List number)
Gets the nested number as string.
|
static Operation |
getOperationOfCallMessage(Message message)
Gets the operation of call message.
|
static Parameter |
getOperationParameterByName(Operation op,
java.lang.String name)
Finds parameter from the operation by given name
|
static java.util.Set<Operation> |
getOperations(Classifier classifier,
Message message)
Returns all operations for call actions
|
static java.util.Collection<Operation> |
getOperationsForCallAction(Classifier classifier)
Collects operations from given classifiers, base classifiers and provided interfaces of given classifiers.
|
static java.util.Collection<Operation> |
getOperationsForCallAction(Classifier classifier,
Message message)
Collects operations from given classifiers, base classifiers and provided interfaces of given classifiers.
|
static java.util.Iterator<Gate> |
getPairableGate(CombinedFragment fragment,
boolean replayMessage)
Gets iterator of Gates, which can be used to be formal pair of the gate.
|
static java.util.Iterator<Gate> |
getPairableGate(InteractionUse use,
boolean replayMessage)
Gets iterator of Gates, which can be used to be formal pair of the gate.
|
static Element |
getReceiveElement(Message message)
Gets the receive element.
|
static Classifier |
getReceiverClassifier(Message message)
Returns classifier - receiver of message.
|
static ConnectableElement |
getRemovableConnectableElement(Lifeline lifeline)
Check if the represents can be removed along with lifeline.
|
static Message |
getReplyMessage(Message message)
Return receive event holder of the given message.
|
static int |
getReturnParameterPosition(Operation operation)
Gets the return parameter position.
|
static Classifier |
getSendClassifier(Message message)
Returns classifier - receiver of message.
|
static Element |
getSendElement(Message message)
Return send event holder of the given message.
|
static Property |
getSignalAttributeByName(Signal signal,
java.lang.String name) |
static Property |
getSignalAttributeForArgument(ValueSpecification argument)
Gets signal attribute if it exists for a given message argument.
|
static Signal |
getSignalOfMessage(Message message)
Gets the signal of message.
|
static Classifier |
getStateInvariantClassifier(StateInvariant stateInvariant)
Gets classifier which is related to a given state invariant through a lifeline.
|
static Constraint |
getStateInvariantConstraint(StateInvariant stateInvariant,
boolean create)
Gets state invariant constraint from state invariant.
|
static State |
getStateInvariantState(StateInvariant stateInvariant)
Retrieves state which is set to a given state invariant.
|
static void |
initCoveredInfo(InteractionFragment fragment,
Lifeline lifeline)
Initializes the covered info.
|
static void |
initMessage(Message message,
Element source,
Element target)
Initializes message by the given source and target.
|
static void |
initMessage(Message message,
Lifeline source,
Lifeline target)
Initializes the message.
|
static void |
initOperationForCallMessage(Message message,
Classifier classifier,
Operation operation)
Init the operation for call message.
|
static boolean |
isCallMessage(Message message)
Indicates if message is a call message.
|
static boolean |
isCreateMessage(Message msg)
Checks if is creates the message.
|
static boolean |
isDestroyMessage(Message msg)
Checks if is destroy message.
|
static java.lang.Boolean |
isFirstEvent(DurationConstraint constraint,
Element constrainedElement)
Returns firstEvent value for a given constrained element by index.
|
static boolean |
isFoundMessage(Message message)
Indicates if given message is a found message.
|
static boolean |
isInsideMessage(Message message,
CombinedFragment fragment)
Checks if given message is inside the fragment.
|
static Element |
isLifelinePort(Message message)
Checks if lifeline from message supplier is port and exists in lifeline context.
|
static boolean |
isLostMessage(Message message)
Indicates if given message is a lost message.
|
static boolean |
isNotGate(Message message)
Checks if message send end is Gate (Message send from diagram border)
|
static boolean |
isReplyMessage(Message message)
Indicates if this message is a reply message.
|
static boolean |
isSendMessage(Message message)
Checks if is send message.
|
static boolean |
isSynchMessage(Message msg)
Checks if is synch message.
|
static void |
makeFoundMessage(Message message)
Turns a message to a found message by removing its sending end
and setting necessary properties.
|
static void |
makeLostMessage(Message message)
Turns a message to a lost message by removing its receiving end
and setting necessary properties.
|
static void |
makeMessageOperationCallable(Message message)
If message is not call, makes it call.
|
static java.lang.String |
parseArgumentName(java.lang.String text)
Parses argument from parameter=argument tuple.
|
static void |
parseArguments(Message message,
java.lang.String s)
Parses arguments from string and sets them as message arguments.
|
static java.lang.String |
parseParameterName(java.lang.String text)
Parses parameter from parameter=argument tuple.
|
static int |
removeReturnParameter(java.util.List parameters)
Removes the return parameter.
|
static void |
setDurationInterval(DurationConstraint durationConstraint,
java.lang.String minMax)
Sets duration interval data.
|
static void |
setDurationInterval(DurationConstraint dc,
java.lang.String minValue,
java.lang.String maxValue)
Sets duration interval.
|
static void |
setDurationInterval(DurationInterval durationInterval,
java.lang.String minMax,
boolean createObservation)
Sets duration interval value.
|
static void |
setDurationInterval(DurationInterval interval,
java.lang.String minValue,
java.lang.String maxValue,
boolean createObservation)
Sets duration interval.
|
static void |
setDurationOwner(Duration duration,
Element findParentFrom)
Sets the duration owner.
|
static void |
setEventForDuration(Duration duration,
NamedElement event1,
NamedElement event2)
Sets events for first DurationObservation referenced by given Duration.
|
static void |
setEventForDurationInterval(DurationInterval interval,
NamedElement event1,
NamedElement event2,
boolean createObservations)
Sets events for DurationInterval min and max durations.
|
static void |
setEventForTimeExpression(TimeExpression timeExpression,
NamedElement event)
Sets event for first time observation referenced by a given time expression.
|
static void |
setEventForTimeInterval(TimeInterval interval,
NamedElement event,
boolean createObservation)
Sets event for Time Interval min and max expressions.
|
static void |
setFirstEvent(DurationConstraint constraint,
Element constrainedElement,
boolean value)
Sets firstEvent value for a given constrained element
Does nothing if given element is not a constrained element or firstEvent list size is out of sync with constrainedElement list size.
|
static void |
setGuard(Message message,
java.lang.String guard)
Sets the guard.
|
static void |
setLifelineType(Lifeline lifeline,
Type type)
Sets the lifeline type.
|
static void |
setMessageArguments(Message message,
java.util.List<ValueSpecification> arguments)
Sets the message arguments.
|
static void |
setMessageSort(Message message,
MessageSort sort)
Changes message sort by the given one.
|
static void |
setOperationForMessage(Message message,
Operation operation,
boolean createArguments)
Sets the operation for message.
|
static void |
setReturnValue(Message message,
java.lang.String value)
Sets the return value.
|
static void |
setReturnValueForMessage(Message message,
java.lang.String value)
Sets the return value for message.
|
static void |
setSignalForMessage(Message message,
Signal signal)
Sets the signal for message.
|
static void |
setStateForStateInvariant(StateInvariant stateInvariant,
State state,
boolean createConstraintIfNecessary)
Sets state for state invariant to represent.
|
static void |
setTarget(Message message,
java.lang.String target)
Sets the target.
|
static void |
setTimeExpressionOwner(TimeExpression timeExpression,
Element findParentFrom)
Sets the time expression owner.
|
static void |
setTimeInterval(TimeConstraint timeConstraint,
java.lang.String minMax)
Sets time interval for a time constraint.
|
static void |
setTimeInterval(TimeConstraint timeConstraint,
java.lang.String minValue,
java.lang.String maxValue)
Sets time interval for a given time constraint.
|
static void |
setTimeInterval(TimeInterval timeInterval,
java.lang.String minMax,
boolean createObservation)
Sets time interval data.
|
static void |
setTimeInterval(TimeInterval timeInterval,
java.lang.String minValue,
java.lang.String maxValue,
boolean createObservation)
Sets time interval data.
|
public static final java.lang.String KEEP_ALL_OPERATION
public static boolean isLostMessage(Message message)
message
- message to check.public static boolean isFoundMessage(Message message)
message
- message to check.public static boolean isSendMessage(Message message)
message
- the messagepublic static boolean isSynchMessage(Message msg)
msg
- the msgpublic static boolean isDestroyMessage(Message msg)
msg
- the msgpublic static boolean isReplyMessage(Message message)
message
- - message to check.public static boolean isCallMessage(Message message)
message
- - message to check.public static boolean isCreateMessage(Message msg)
msg
- the msgpublic static boolean canChangeMessageType(Message message)
message
- message to check.@CheckForNull public static Classifier getReceiverClassifier(Message message)
message
- message@CheckForNull public static Classifier getSendClassifier(Message message)
message
- message@CheckForNull public static Classifier getMessageEndClassifier(Message message, boolean client)
message
- messageclient
- the clientpublic static void makeMessageOperationCallable(Message message)
message
- message to check.public static void changeSynchForMessage(Message message)
message
- the messagepublic static void setMessageSort(Message message, MessageSort sort)
message
- Given message, to change sortsort
- Given sort kind, one from MessageSortEnumMessageSortEnum
public static void ensureCorrectReceiveEvent(Message message, boolean preserveElementID, java.lang.String elementIDSuffix)
message
- message for which to ensure correct end.preserveElementID
- indicates if element ID should be preserved.elementIDSuffix
- element ID suffix to append.public static void initMessage(Message message, Lifeline source, Lifeline target)
message
- the messagesource
- the sourcetarget
- the targetpublic static MessageOccurrenceSpecification createReceiveEventByMessageSort(Message message)
message
- messagepublic static void initCoveredInfo(InteractionFragment fragment, Lifeline lifeline)
fragment
- the fragmentlifeline
- the lifeline@CheckForNull public static Interaction findInteraction(@CheckForNull Element interactionElement)
interactionElement
- an element in an interaction.public static void initMessage(Message message, @CheckForNull Element source, @CheckForNull Element target)
message
- messagesource
- sourcetarget
- targetpublic static void makeLostMessage(Message message)
message
- message to turn into a lost message.public static void makeFoundMessage(Message message)
message
- message to turn into a found message.@Deprecated public static java.lang.String constructMessageText(Message message, boolean showParameters)
public static Message getMessageSubstitute(Message message)
message
- message, for which substitution will be searched@CheckForNull public static Operation getOperationOfCallMessage(Message message)
message
- the message@CheckForNull public static Signal getSignalOfMessage(Message message)
message
- the message@CheckForNull public static Property getSignalAttributeForArgument(ValueSpecification argument)
argument
- argument for which to retrieve signal attribute.public static void setOperationForMessage(Message message, Operation operation, boolean createArguments)
message
- the messageoperation
- the operationcreateArguments
- the create argumentspublic static void setSignalForMessage(Message message, Signal signal)
message
- the messagesignal
- the signal@CheckForNull public static Signal findSignalForMessage(Message message, java.lang.String name)
message
- the messagename
- the namepublic static java.util.Collection<Operation> getAvailableOperationsForCallMessage(Message message)
message
- message for which to get available operations for selection.public static java.util.Collection<Operation> getOperationsForCallAction(@CheckForNull Classifier classifier)
classifier
- classifierpublic static java.util.Collection<Operation> getOperationsForCallAction(@CheckForNull Classifier classifier, @CheckForNull Message message)
classifier
- classifiermessage
- call messagepublic static java.util.Set<Operation> getOperations(@CheckForNull Classifier classifier, @CheckForNull Message message)
classifier
- classifier from which we select operationspublic static boolean isNotGate(@CheckForNull Message message)
message
- message@CheckForNull public static Element isLifelinePort(@CheckForNull Message message)
message
- message@CheckForNull public static java.util.Collection<Lifeline> getLifelines(@CheckForNull Message message)
message
- message@CheckForNull public static Operation findCallOperationWithArguments(java.lang.String name, Classifier classifier, java.util.List<Operation> preferredOperations, int paramCount, Message message)
name
- the nameclassifier
- the classifierpreferredOperations
- list of preferred operationsparamCount
- preferred parameter countmessage
- call message@CheckForNull public static Operation findCallOperation(java.lang.String name, Classifier classifier, java.util.List<Operation> preferredOperations, Message message)
name
- the nameclassifier
- the classifierpreferredOperations
- the preferred operationsmessage
- call messagepublic static void createArgumentsForCallMessage(Message message)
message
- the message@CheckForNull public static ValueSpecification createArgumentForMessage(Message message, Type type)
message
- message for which to create an argument.type
- type of the argument.@CheckForNull public static ValueSpecification createArgumentForMessage(Message message, @CheckForNull Type type, @CheckForNull ValueSpecification defaultValue)
message
- message for which to create an argument.type
- type of the argument.defaultValue
- default value for the argument.public static java.util.List<java.lang.Class> getArgumentSupportedValueSpecifications()
public static java.lang.String getNestedNumberAsString(java.util.List number)
number
- the numberpublic static Property createProperty(java.lang.String propertyName, @CheckForNull Classifier type, Interaction inter)
propertyName
- nametype
- typeinter
- interactionpublic static void disposeMessageArguments(Message message)
message
- the messagepublic static void setMessageArguments(Message message, java.util.List<ValueSpecification> arguments) throws com.nomagic.magicdraw.utils.parsers.ParseException
message
- the messagearguments
- the argumentscom.nomagic.magicdraw.utils.parsers.ParseException
- the parse exceptionpublic static int removeReturnParameter(java.util.List parameters)
parameters
- the parameterspublic static void setTarget(Message message, java.lang.String target)
message
- the messagetarget
- the targetpublic static void setGuard(Message message, java.lang.String guard)
message
- the messageguard
- the guard@CheckForNull public static Element getReceiveElement(Message message)
message
- the message@CheckForNull public static Element getSendElement(Message message)
It can be:
message
- Given message, which will be analysedpublic static Message getReplyMessage(Message message)
It can be:
message
- Given message, which will be analysedpublic static void setReturnValue(Message message, java.lang.String value)
message
- the messagevalue
- the valuepublic static int getReturnParameterPosition(@CheckForNull Operation operation)
operation
- the operationpublic static void setReturnValueForMessage(Message message, java.lang.String value)
message
- the messagevalue
- the valuepublic static void parseArguments(Message message, java.lang.String s)
message
- messages
- string to parsepublic static void initOperationForCallMessage(Message message, @CheckForNull Classifier classifier, @CheckForNull Operation operation)
message
- the messageclassifier
- the classifieroperation
- the oppublic static void setLifelineType(Lifeline lifeline, @CheckForNull Type type)
lifeline
- the lifelinetype
- the type@CheckForNull public static Classifier getStateInvariantClassifier(StateInvariant stateInvariant)
stateInvariant
- state invariant for which classifier should found.@CheckForNull public static Classifier getLifelineType(Lifeline lifeline)
lifeline
- the lifeline@CheckForNull public static ConnectableElement getRemovableConnectableElement(Lifeline lifeline)
lifeline
- lifelinepublic static void setTimeInterval(TimeConstraint timeConstraint, java.lang.String minValue, java.lang.String maxValue)
timeConstraint
- time constraint to modify.minValue
- min value.maxValue
- max value.public static void setTimeInterval(TimeInterval timeInterval, java.lang.String minValue, java.lang.String maxValue, boolean createObservation)
timeInterval
- time interval to modify.minValue
- min value.maxValue
- max value.createObservation
- indicates if observation should be created.public static void setTimeInterval(TimeConstraint timeConstraint, java.lang.String minMax)
timeConstraint
- constraint constraint for which to set time interval.minMax
- min..max format value.public static void setTimeInterval(TimeInterval timeInterval, @CheckForNull java.lang.String minMax, boolean createObservation)
timeInterval
- time interval to modify.minMax
- min..max format value.createObservation
- indicates if observation should be created.public static void setDurationInterval(DurationConstraint durationConstraint, java.lang.String minMax)
durationConstraint
- duration constraint to set.minMax
- min..max format value.public static void setDurationInterval(DurationInterval durationInterval, @CheckForNull java.lang.String minMax, boolean createObservation)
durationInterval
- duration interval to modify.minMax
- min..max format value.createObservation
- indicates if observation should be created.@Deprecated public static TimeExpression createTimeExpression(TimeConstraint tc)
createTimeExpression(TimeInterval, boolean)
tc
- constraintpublic static TimeExpression createTimeExpression(TimeInterval timeInterval, boolean createObservation)
timeInterval
- intervalcreateObservation
- create observationpublic static void setTimeExpressionOwner(TimeExpression timeExpression, Element findParentFrom)
timeExpression
- the time expressionfindParentFrom
- the find parent frompublic static java.lang.String[] getIntervalMinMax(IntervalConstraint interval)
interval
- intervalpublic static java.lang.Object[] getIntervalMinMaxValues(IntervalConstraint interval)
interval
- interval@Deprecated public static Duration createDuration(DurationConstraint dc)
createDuration(DurationInterval, boolean)
dc
- constraintpublic static Duration createDuration(DurationInterval interval, boolean createObservation)
interval
- intervalcreateObservation
- create observationpublic static void setDurationOwner(Duration duration, Element findParentFrom)
duration
- the durationfindParentFrom
- the find parent frompublic static void setDurationInterval(DurationConstraint dc, @CheckForNull java.lang.String minValue, @CheckForNull java.lang.String maxValue)
dc
- constraintminValue
- min valuemaxValue
- max valuepublic static void setDurationInterval(DurationInterval interval, @CheckForNull java.lang.String minValue, @CheckForNull java.lang.String maxValue, boolean createObservation)
interval
- intervalminValue
- min valuemaxValue
- max valuecreateObservation
- create observationpublic static boolean isInsideMessage(Message message, CombinedFragment fragment)
fragment
does
- if given message has one end to the nested fragment
Message is expected to have one end connected to fragment
message
- Message to check if ii is insidefragment
- Check if given message is inside THIS fragment@CheckForNull public static Message getMessage(Gate gate)
gate
- given gate to check messagepublic static java.util.Iterator<Gate> getPairableGate(InteractionUse use, boolean replayMessage)
use
- given interaction usereplayMessage
- if true, than all messages will be returned which are pairable for replay message kindpublic static java.util.Iterator<Gate> getPairableGate(CombinedFragment fragment, boolean replayMessage)
fragment
- given interaction fragmentreplayMessage
- if true, than all messages will be returned which are pairable for replay message kindpublic static void setEventForTimeExpression(TimeExpression timeExpression, @CheckForNull NamedElement event)
timeExpression
- time expression to modify.event
- event to set.public static void setEventForTimeInterval(TimeInterval interval, @CheckForNull NamedElement event, boolean createObservation)
interval
- time intervalevent
- eventcreateObservation
- if true create TimeObservation if min and max expressions are createdpublic static void setEventForDuration(Duration duration, @CheckForNull NamedElement event1, @CheckForNull NamedElement event2)
duration
- durationevent1
- event or nullevent2
- event or nullpublic static void setEventForDurationInterval(DurationInterval interval, @CheckForNull NamedElement event1, @CheckForNull NamedElement event2, boolean createObservations)
interval
- duration intervalevent1
- event or nullevent2
- event or nullcreateObservations
- if true create DurationObservation if min and max durations are createdpublic static void setStateForStateInvariant(StateInvariant stateInvariant, State state, boolean createConstraintIfNecessary)
stateInvariant
- state invariant for which state should be set.state
- state which should be set to state invariant.createConstraintIfNecessary
- creates constraint if constraint doesn't exist in a state invariant.@CheckForNull public static Constraint getStateInvariantConstraint(StateInvariant stateInvariant, boolean create)
stateInvariant
- state invariant from which to get state invariant constraint.create
- true if a new constraint should be created when no constraints are found.@CheckForNull public static State getStateInvariantState(StateInvariant stateInvariant)
stateInvariant
- state invariant for which state should be retrieved.public static java.util.List<Message> getMessages(Lifeline lifeline)
lifeline
- lifelinepublic static java.lang.String parseParameterName(java.lang.String text)
text
- text to parse.public static java.lang.String parseArgumentName(java.lang.String text)
text
- text to parse.@CheckForNull public static Parameter addParameterForOperation(Operation operation, java.lang.String name, boolean generateName)
@CheckForNull public static Parameter addParameterForOperation(Operation operation, java.lang.String name, boolean generateName, ParameterDirectionKind directionKind)
operation
- operation for which to add a parameter.name
- name to set.generateName
- indicates whether name should be generated if given name is empty.directionKind
- parameter direction@CheckForNull public static Property addPropertyForSignal(Signal signal, java.lang.String name, boolean generateName)
@CheckForNull public static Parameter getOperationParameterByName(Operation op, java.lang.String name)
op
- provided operationname
- name for the parameter@CheckForNull public static Property getSignalAttributeByName(Signal signal, java.lang.String name)
public static void ensureFragmentsAreInFragmentCollection(java.util.Collection<InteractionFragment> collection, java.util.Collection<InteractionFragment> fragments)
collection
- collection to check.fragments
- fragments to add to the fragment collection.public static java.util.Collection<Signal> getAvailableSignals(Message message)
message
- message for which to retrieve all available signals.@CheckForNull public static DestructionOccurrenceSpecification getDestructionOccurrenceSpecification(Lifeline lifeline)
lifeline
- lifeline for which to get destruction occurrence specification.@CheckForNull public static DestructionOccurrenceSpecification getDestructionOccurrenceSpecification(java.util.Collection<InteractionFragment> collection)
collection
- collection in which to search for destruction occurrence.public static boolean ensureDestructionOccurrence(Lifeline lifeline, boolean destruct)
lifeline
- lifeline for which to ensure destruction occurrence.destruct
- indicates whether lifeline is destructed or not.public static void addOperationForCallActionProvider(com.nomagic.uml2.ext.jmi.helpers.OperationForCallActionProvider operationForCallActionProvider)
operationForCallActionProvider
- operation provider for call actionpublic static void enableExecutionSpecificationModeling(DiagramPresentationElement diagramPresentationElement) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
diagramPresentationElement
- sequence diagram.java.lang.IllegalArgumentException
- if diagram is not sequence diagram.java.lang.IllegalStateException
- if session is not created at the current moment, or diagram is not loaded.public static void setFirstEvent(DurationConstraint constraint, Element constrainedElement, boolean value)
constraint
- constraintconstrainedElement
- constrained elementvalue
- firstEvent value@CheckForNull public static java.lang.Boolean isFirstEvent(DurationConstraint constraint, Element constrainedElement)
constraint
- constraintconstrainedElement
- constrained element