Principles of transferring elements between projects

 

Description of the transfer function

The transferring elements feature (shown in Figure 17) gives you the possibility of importing elements which come from another project into your project.  The elements imported can be packages or classes.

 

Figure 17. The transfer function allows the import of elements which come from other projects

 

Note:      If a current UML project is connected to a teamwork repository, it is possible to import elements coming from other projects through the File/Import command. Be careful, this operation can only be done with projects that are not connected to the same teamwork repository. Never make import through the "File/Import" command between projects connected to the same repository.


To update the teamwork repository connected to the current UML project, you have to launch the check-in command on the elements you have imported. The projects connected to this repository can update their UML model through the "Import from repository" command.

 

 

To import elements from other Objecteering databases, the following steps should be carried out:

1.      Carry out a check-out on the UML model root in "non-hierarchical" mode.

2.      Import the package through the import window.

3.      Finally, carry out a check-in on the UML model root in "hierarchical" mode.

 

 

Identifying model elements

Objecteering identifies all elements entered graphically (diagrams) or in the model explorer, in a universally unique way (site/base/project/element) as soon as they are created.  Transfer logic uses these identifiers to ensure their automatic update.

 

Example:

1.      Create the C1 class in the P1 project.

2.      Transfer C1 to the P2 project.

3.      Rename C1 as C2 in the P2 project.

4.      Transfer C2 from the P2 project to the P1 project.

 

Result: C2 replaces C1 in the P1 project model.

 

 

Import logic

Import operations use identifiers in their logic. If elements with the same identifier do not yet exist, a copy of the element is made.  If an element with the same identifier already exists, it is replaced.

 

If a newly-imported element has links towards other elements, the links are retained if the linked elements with the same identifiers exist.  If not, the links are destroyed.

 

For example, the import of the C1 class into an empty project creates this class, but destroys its associations, generalizations, and so on. The import of the S1 diagram into an empty project creates the diagram and its classes and creates the links between these classes, but not those which reference external elements.

 

Note:       For more details on import operations, please see "Importing elements between projects".