UML Modeling Layer

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

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

public abstract class CopyAtomicSetStrategy
extends Object

Base class for CopyAtomicSetStrategy


Constructor Summary
CopyAtomicSetStrategy()
           
 
Method Summary
 EObject createAtomicRootObject()
          create an atomic set root for this strategy.
abstract  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.
abstract  Set<EObject> findFilteredSemanticCopyAtomicSet(Set<EObject> objects)
          Given a set of objects, this method returns its filtered copy atomic set.
abstract  Set<EObject> findSemanticCopyAtomicSet(Set<EObject> objects)
          Given a set of objects, this method returns its copy atomic set.
protected abstract  String getName()
          This method returns the name of the strategy
abstract  OverridePasteChildOperation getOverrideChildPasteOperation(EObject parentEObject, EObject object, PasteChildOperation overriddenChildPasteOperation)
          Get the paste operation for copy atomic set found by this strategy.
abstract  List<EObject> sort(Set<EObject> atomicSet)
          This method sorts the given atomic set and returns an ordered list of the elements.
 boolean supportOverrideChildPasteOperation(EObject parentEObject, EObject atomicSetRoot)
          Determine if this strategy can provide paste operation for the given atomic set root.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyAtomicSetStrategy

public CopyAtomicSetStrategy()
Method Detail

findSemanticCopyAtomicSet

public abstract Set<EObject> findSemanticCopyAtomicSet(Set<EObject> objects)
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.

Parameters:
selectedObjects -
Returns:

sort

public abstract List<EObject> sort(Set<EObject> atomicSet)
This method sorts the given atomic set and returns an ordered list of the elements.

Parameters:
atomicSet -
Returns:
ordered list

getName

protected abstract String getName()
This method returns the name of the strategy

Returns:
name of the strategy

extractCopyAlwaysSet

public abstract 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. It also updates the given CopyObjects::copyAlways map with the info.

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.

getOverrideChildPasteOperation

public abstract OverridePasteChildOperation getOverrideChildPasteOperation(EObject parentEObject,
                                                                           EObject object,
                                                                           PasteChildOperation overriddenChildPasteOperation)
Get the paste operation for copy atomic set found by this strategy.

Parameters:
parentEObject -
object -
overriddenChildPasteOperation -
Returns:

supportOverrideChildPasteOperation

public boolean supportOverrideChildPasteOperation(EObject parentEObject,
                                                  EObject atomicSetRoot)
Determine if this strategy can provide paste operation for the given atomic set root.

Parameters:
parentEObject -
object - atomic set root.
Returns:

createAtomicRootObject

public EObject createAtomicRootObject()
create an atomic set root for this strategy.

Returns:

findFilteredSemanticCopyAtomicSet

public abstract Set<EObject> findFilteredSemanticCopyAtomicSet(Set<EObject> objects)
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.

Parameters:
objects -
Returns:

UML Modeling Layer

© Copyright IBM Corp. 2009. All rights reserved.