UML Modeling Layer

com.ibm.xtools.uml.msl.internal.providers.copypaste
Class InteractionAtomicSetStrategy

java.lang.Object
  extended by com.ibm.xtools.uml.msl.internal.providers.copypaste.CopyAtomicSetStrategy
      extended by com.ibm.xtools.uml.msl.internal.providers.copypaste.InteractionAtomicSetStrategy

public class InteractionAtomicSetStrategy
extends CopyAtomicSetStrategy

Interaction AtomicSetStrategy


Field Summary
static String NOT_COPYALWAYS_EVENTS
          flag indicating to not copy event as copyAlways objects of occurrence specification
static String NOT_COPYALWAYS_INTERACTION_RE
          flag indicating to not copy interaction related elements as copyAlways objects of interaction
static String NOT_COPYALWAYS_LIFELINE_REPRESENTS
          flag indicating to not copy "lifeline represents" as copyAlways objects of lifeline
 
Constructor Summary
InteractionAtomicSetStrategy()
           
 
Method Summary
protected  void collectRelatedElements(CombinedFragment cf, Set<EObject> atomicSet)
           
protected  void collectRelatedElements(ConnectableElement ce, Set<EObject> atomicSet)
           
protected  void collectRelatedElements(ExecutionOccurrenceSpecification eos, Set<EObject> atomicSet)
           
protected  void collectRelatedElements(ExecutionSpecification bes, Set<EObject> atomicSet)
           
protected  void collectRelatedElements(Gate gate, Set<EObject> atomicSet)
           
protected  void collectRelatedElements(InteractionUse iu, Set<EObject> atomicSet)
           
protected  void collectRelatedElements(MessageOccurrenceSpecification mos, Set<EObject> atomicSet)
           
protected  void collectRelatedElements(Message message, Set<EObject> atomicSet)
           
protected  void collectRelatedElements(OccurrenceSpecification os, Set<EObject> atomicSet)
           
protected  void collectRelatedElements(StateInvariant si, Set<EObject> atomicSet)
           
protected  void collectRelatedElements1(CombinedFragment cf, Set<EObject> atomicSet)
           
 Set<EObject> extractCopyAlwaysSet(Set<EObject> atomicSet, CopyObjects copyObjects, Map<Object,Object> hintMap)
          This method finds all copyAlways objects for elements within the given atomic set.
 Set<EObject> findFilteredSemanticCopyAtomicSet(Set<EObject> objects)
          Given a set of objects, this method returns its filtered copy atomic set.
 Set<EObject> findSemanticCopyAtomicSet(Set<EObject> objects)
          Given a set of objects, this method returns its copy atomic set.
protected  Event getEvent(OccurrenceSpecification os, Interaction interaction)
          Get the event to be copied (or null if it should not be copied).
protected  Event getEvent(Set<EObject> atomicSet, OccurrenceSpecification os)
          Get the event to be added to the copy always set.
protected  String getName()
          This method returns the name of the strategy
 OverridePasteChildOperation getOverrideChildPasteOperation(EObject parentEObject, EObject object, PasteChildOperation overriddenChildPasteOperation)
          Get the paste operation for copy atomic set found by this strategy.
 List<EObject> sort(Set<EObject> atomicSet)
          This method sorts the given atomic set and returns an ordered list of the elements.
 
Methods inherited from class com.ibm.xtools.uml.msl.internal.providers.copypaste.CopyAtomicSetStrategy
createAtomicRootObject, supportOverrideChildPasteOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_COPYALWAYS_LIFELINE_REPRESENTS

public static final String NOT_COPYALWAYS_LIFELINE_REPRESENTS
flag indicating to not copy "lifeline represents" as copyAlways objects of lifeline

See Also:
Constant Field Values

NOT_COPYALWAYS_EVENTS

public static final String NOT_COPYALWAYS_EVENTS
flag indicating to not copy event as copyAlways objects of occurrence specification

See Also:
Constant Field Values

NOT_COPYALWAYS_INTERACTION_RE

public static final String NOT_COPYALWAYS_INTERACTION_RE
flag indicating to not copy interaction related elements as copyAlways objects of interaction

See Also:
Constant Field Values
Constructor Detail

InteractionAtomicSetStrategy

public InteractionAtomicSetStrategy()
Method Detail

getName

protected String getName()
Description copied from class: CopyAtomicSetStrategy
This method returns the name of the strategy

Specified by:
getName in class CopyAtomicSetStrategy
Returns:
name of the strategy

getOverrideChildPasteOperation

public OverridePasteChildOperation getOverrideChildPasteOperation(EObject parentEObject,
                                                                  EObject object,
                                                                  PasteChildOperation overriddenChildPasteOperation)
Description copied from class: CopyAtomicSetStrategy
Get the paste operation for copy atomic set found by this strategy.

Specified by:
getOverrideChildPasteOperation in class CopyAtomicSetStrategy
Returns:

extractCopyAlwaysSet

public Set<EObject> extractCopyAlwaysSet(Set<EObject> atomicSet,
                                         CopyObjects copyObjects,
                                         Map<Object,Object> hintMap)
Description copied from class: CopyAtomicSetStrategy
This method finds all copyAlways objects for elements within the given atomic set. It also updates the given CopyObjects::copyAlways map with the info.

Specified by:
extractCopyAlwaysSet in class CopyAtomicSetStrategy
Parameters:
atomicSet - atomic set
copyObjects - given copyObjects. contains copyAlways map to be updated
hintMap - hint map for the copy/paste operation.
Returns:
new objects found that needs to be copied together.

getEvent

protected Event getEvent(OccurrenceSpecification os,
                         Interaction interaction)
Get the event to be copied (or null if it should not be copied).

Parameters:
os - the occurrence specification
interaction - the interaction that this occurrence specification applies to.
Returns:
the event to be added or null if none exists or it should not be added.

getEvent

protected Event getEvent(Set<EObject> atomicSet,
                         OccurrenceSpecification os)
Get the event to be added to the copy always set.

Parameters:
atomicSet -
os - the occurrence specification
Returns:
the event to be added or null if none exists or it should not be added.

findSemanticCopyAtomicSet

public Set<EObject> findSemanticCopyAtomicSet(Set<EObject> objects)
Description copied from class: CopyAtomicSetStrategy
Given a set of objects, this method returns its copy atomic set. The atomic set is created by atomic set collection rule defined in this strategy.

Specified by:
findSemanticCopyAtomicSet in class CopyAtomicSetStrategy
Returns:

findFilteredSemanticCopyAtomicSet

public Set<EObject> findFilteredSemanticCopyAtomicSet(Set<EObject> objects)
Description copied from class: CopyAtomicSetStrategy
Given a set of objects, this method returns its filtered copy atomic set. This method is called just before the actual copy operation. It should contain logic to do final processing for the given objects before they get copied to the clipboard.

Specified by:
findFilteredSemanticCopyAtomicSet in class CopyAtomicSetStrategy
Returns:

sort

public List<EObject> sort(Set<EObject> atomicSet)
Description copied from class: CopyAtomicSetStrategy
This method sorts the given atomic set and returns an ordered list of the elements.

Specified by:
sort in class CopyAtomicSetStrategy
Returns:
ordered list

collectRelatedElements

protected void collectRelatedElements(Message message,
                                      Set<EObject> atomicSet)

collectRelatedElements

protected void collectRelatedElements(MessageOccurrenceSpecification mos,
                                      Set<EObject> atomicSet)

collectRelatedElements

protected void collectRelatedElements(ExecutionOccurrenceSpecification eos,
                                      Set<EObject> atomicSet)

collectRelatedElements

protected void collectRelatedElements(ExecutionSpecification bes,
                                      Set<EObject> atomicSet)

collectRelatedElements

protected void collectRelatedElements(Gate gate,
                                      Set<EObject> atomicSet)

collectRelatedElements

protected void collectRelatedElements(CombinedFragment cf,
                                      Set<EObject> atomicSet)

collectRelatedElements1

protected void collectRelatedElements1(CombinedFragment cf,
                                       Set<EObject> atomicSet)

collectRelatedElements

protected void collectRelatedElements(InteractionUse iu,
                                      Set<EObject> atomicSet)

collectRelatedElements

protected void collectRelatedElements(OccurrenceSpecification os,
                                      Set<EObject> atomicSet)

collectRelatedElements

protected void collectRelatedElements(ConnectableElement ce,
                                      Set<EObject> atomicSet)

collectRelatedElements

protected void collectRelatedElements(StateInvariant si,
                                      Set<EObject> atomicSet)

UML Modeling Layer

© Copyright IBM Corp. 2009. All rights reserved.