Library Classes
As a first step, the modeler has to define the external usable classifiers explicitly in the model. This is done by giving all classes that shall be reused an <<E2ELibraryClass>> stereotype.
Figure: E2ELibrary Classes
Furthermore, interfaces, signals and enumerations can be specified as external usable classifiers as well by giving them the stereotypes <<E2ELibraryInterface>>, <<E2ELibrarySignal>> respectively <<E2ELibraryEnumeration>>.
Library Components
The next step is to put the external usable classifiers into an <<E2ELibrary>> component, as shown in the next figure. This approach is very similar to an <<E2ESOAPService>> component holding an <<E2ESOAPPortType>> class. Of course, one difference is that SOAP services must be placed in an <<E2EComposite>> component, which is not necessary for libraries because libraries do not run on their own.
The following example shows a library that abstracts a SQL access in a simple class called SqlQueries:
Figure: E2ELibrary Component Diagram
The above diagram is an example of a Library Component Diagram. Its structure is very similar component diagrams used to define E2E xUML services. The only significant difference comes from the following new stereotypes:
- <<E2ELibrary>> components represent the implementation of the library.
- <<E2ELibraryClass>>, <<E2ELibraryInterface>>, and <<E2ELibrarySignal>> classifiers represent the external usable interfaces and data structures nested in E2E libraries.
This component diagram can be generated by using the xUML Service Library Wizard. To start this wizard click the icon.
Library SOAP Service
Apart from the library components, a library may also contain a service (SOAP or REST) and a corresponding component diagram. This can be used for testing purposes, to test the library functionality independently from a library usage service.
Library Components of E2E Builder Version 5.1
Compiling the Library
After defining the library you can compile it in the deployment view:
The result of the compile is the library repository SQLQueryLibrary.lrep. This file resides in the ../repository/ folder of the current project, because it is a repository that can now be distributed.