Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Tigerstripe Class Diagram Tutorial"

(New page: You can model a Tigerstripe project graphically using the Tigerstripe Diagram Editor. The Tigerstripe Diagram Editor allows you to define your service contract graphically so you can bet...)
 
Line 1: Line 1:
  
 +
You can model a Tigerstripe project graphically using the Tigerstripe Diagram Editor. The Tigerstripe Diagram Editor allows you to define your service contract graphically so you can better visualize how each model interacts within your service.
  
You can model a Tigerstripe project graphically using the Tigerstripe Diagram Editor. The Tigerstripe Diagram Editor allows you to define your service contract graphically so you can better visualize how each model interacts within your service. Before you can complete this tutorial, you must be familiar with creating a Tigerstripe project including the following:
+
=Prerequisites=
 +
 
 +
Before you can complete this tutorial, you must be familiar with creating a Tigerstripe project including the following:
  
 
* Creating a Tigerstripe project using the New Tigerstripe Project dialog box.
 
* Creating a Tigerstripe project using the New Tigerstripe Project dialog box.
Line 11: Line 14:
 
If you need more information about the above items, refer to the information outlined in the Simple Service Contract Design tutorial.
 
If you need more information about the above items, refer to the information outlined in the Simple Service Contract Design tutorial.
  
To create a new project:
+
=Create a new class diagram=
  
 
# Create a new Tigerstripe project. Refer to Create a New Tigerstripe Project for more information.
 
# Create a new Tigerstripe project. Refer to Create a New Tigerstripe Project for more information.
Line 31: Line 34:
  
  
You have the same tools available with the Tigerstripe Diagram Editor however, you have multiple ways to access them.
 
 
Standard Toolbar
 
 
 
Right-click shortcut menu
 
 
 
Diagram Editor drawing pallete
 
 
 
toolbar
 
 
 
 
 
pallete
 
 
   
 
   
=Standard Toolbar=
+
=Add existing Artifacts a Class diagram=
  
 
Click the Create a new Tigerstripe Artifact () from the toolbar. The Artifact menu displays, from which you can select the item you wish to create in your service contract.
 
Click the Create a new Tigerstripe Artifact () from the toolbar. The Artifact menu displays, from which you can select the item you wish to create in your service contract.
Line 55: Line 41:
  
 
Right-click the src folder in the Tigerstripe Explorer and the Artifact menu displays. Select the item from the shortcut menu.
 
Right-click the src folder in the Tigerstripe Explorer and the Artifact menu displays. Select the item from the shortcut menu.
Diagram Editor Drawing Pallete
+
 
 +
=Adding Artifact using the Diagram Editor Drawing Pallete=
  
 
The drawing pallete is the most convient way to create your service contract when utilizing the Tigerstripe Diagram Editor. The drawing pallete automatically displays on the right hand side of the Tigerstripe Diagram Editor once you create your project. In addition to the Artifact menu options, you can also:
 
The drawing pallete is the most convient way to create your service contract when utilizing the Tigerstripe Diagram Editor. The drawing pallete automatically displays on the right hand side of the Tigerstripe Diagram Editor once you create your project. In addition to the Artifact menu options, you can also:
Line 61: Line 48:
 
* Select items in your diagram using the Select tool ().
 
* Select items in your diagram using the Select tool ().
 
* Zoom in closer to view specific areas of your diagram using the Zoom tool ().  
 
* Zoom in closer to view specific areas of your diagram using the Zoom tool ().  
* Zoom out to view your entier diagram by pressing SHIFT + the Zoom tool.
+
* Zoom out to view your entire diagram by pressing SHIFT + the Zoom tool.
 
* Attach notes and text to your diagram by using the Note tool () and the corresponding pull-down menu to select from the options available: Note, Text, Note Attachment.
 
* Attach notes and text to your diagram by using the Note tool () and the corresponding pull-down menu to select from the options available: Note, Text, Note Attachment.
  

Revision as of 10:53, 24 January 2008

You can model a Tigerstripe project graphically using the Tigerstripe Diagram Editor. The Tigerstripe Diagram Editor allows you to define your service contract graphically so you can better visualize how each model interacts within your service.

Prerequisites

Before you can complete this tutorial, you must be familiar with creating a Tigerstripe project including the following:

  • Creating a Tigerstripe project using the New Tigerstripe Project dialog box.
  • Documenting your project and adding project descriptors.
  • Creating a service end-point and a web service definition.
  • Adding methods and arguments.
  • Saving and generating your Tigerstripe project.

If you need more information about the above items, refer to the information outlined in the Simple Service Contract Design tutorial.

Create a new class diagram

  1. Create a new Tigerstripe project. Refer to Create a New Tigerstripe Project for more information.
    • For this tutorial, the project name is SimpleProject.
  2. . Right-click on your project (SimpleProject), select New and click New Diagram. The New Tigerstripe Diagram dialog box opens.
    creatediagram
  3. Accept the default file name (default) and click Finish.

Tigerstripe Workbench creates a new project named SimpleProject, with the standard src folder and a .settings folder in the Tigerstripe Explorer. Under the .settings folder, you will see two new files:

  • default.wvd
  • default.wvm

Note: default is the file name that you created in Step 4.

You are now ready to start graphically designing your service contract using the Tigerstripe Diagram Editor.

Diagram Editor

Add existing Artifacts a Class diagram

Click the Create a new Tigerstripe Artifact () from the toolbar. The Artifact menu displays, from which you can select the item you wish to create in your service contract. Right-click Shortcut Menu

Right-click the src folder in the Tigerstripe Explorer and the Artifact menu displays. Select the item from the shortcut menu.

Adding Artifact using the Diagram Editor Drawing Pallete

The drawing pallete is the most convient way to create your service contract when utilizing the Tigerstripe Diagram Editor. The drawing pallete automatically displays on the right hand side of the Tigerstripe Diagram Editor once you create your project. In addition to the Artifact menu options, you can also:

  • Select items in your diagram using the Select tool ().
  • Zoom in closer to view specific areas of your diagram using the Zoom tool ().
  • Zoom out to view your entire diagram by pressing SHIFT + the Zoom tool.
  • Attach notes and text to your diagram by using the Note tool () and the corresponding pull-down menu to select from the options available: Note, Text, Note Attachment.

Note: If you rest on the drawing area of the editor, an Artifact shortcut menu will appear. The tools available from this menu are identical to the tools available from the other access options. Attaching Notes and Text

Using the options available from the Note tool, you can attach text and notes to your diagram to further explain your service contract.

To attach a note:

  1.
     Click Note (), in the Diagram Editor Drawing pallete.
  2.
     Click in the Diagram Editor and the Note appears.
  3.
     Enter the necessary information in your note and click Save to save your changes.

To attach text:

  1. Select the drop-down menu next to the Note tool.
  2. Click Text and click in the Diagram Editor. An empty text box appears.
  3. Enter your text in the text box and click Save to save your changes.

Create a Session Facade

With the diagram editor.

In the previous step, you created a new project named SimpleProject. After you create your new project, you can create a Session Facade using the Tigerstripe Diagram Editor. For detailed information about a Session Facade, refer to Create a Service End-point Model. Complete the following procedure to create a Session Facade in your SimpleProject.

To create a Session Facade:

  1.
     Click Session Facade (), in the Diagram Editor Drawing pallete.
  2.
     Click in the Diagram Editor and the Session Facade appears. When you initially create a Session Facade, the facade is pre-populated with the default name of Session0.
  3.
     Enter a name for your facade.
     For this example, name your facade MySessionFacade.

Note: Your new facade automatically displays in the Tigerstripe Explorer under the src folder.

  4.
     Rest on your facade, and the Add Method option appears (createmethod).
  5.
     Click Add Method and a default method named void method0() appears.
  6.
     Enter a new name for your method.
     For this example, name your method processOrder.
  7.
     Double click the project descriptor (tigerstripe.xml) in the Tigerstripe Explorer. This opens your Tigerstripe project perspective.
  8.
     Navigate to the Generation tab and enable the desired generation plug-ins.
  9.
     Click Save to save your changes.
 10. Click the Generate icon generateIcon on the toolbar. The Generate Tigerstrip Project dialog box displays.
 11. Accept the default Source Folder or click Browse to navigate to a new location and click Finish.

Create a Managed Entity

Enhancing your session facade.

As in the Simple Service Contract Design tutorial, you can enhance your service model by creating an entity artifact and adding attributes to your entity. After you successfully create your entity artifact, you can establish your managed entity.

To create an entity artifact:

  1.
     Click Managed Entity (), in the Diagram Editor Drawing pallete.
  2.
     Click in the Diagram Editor and the Managed Entity appears. When you initially create a Managed Entity, the entity is pre-populated with the default name of Entity0.
  3.
     Enter a name for entity.
     In this example, name your entity Order.

To add attributes to your entity:

  1. Rest on your entity, and the Add Attribute option appears ().

Note: You will also have the option to add a method.

  2.
     Click Add Attribute and a default attribute named attribute0:String appears.
  3.
     Enter a new name for your attribute.
     For this example, name your attribute OrderId.

To establish your managed entity:

  1. Rest on your session facade;MySessionFacade. In addition to the Add Method option, you will also see a couple of arrows appear. These arrows allow you to establish associations between entities within your service contract.
     In this example, you have one session facade named MySessionFacade and one entity named Order.
  2. Click the arrow that leads away from your session facade and connect the arrow to your Order entity.
  3. Select Create Manages from the shortcut menu. A line connects the session facade to your entity and the word manages displays. This indicates that the entity is a managed entity of the associated session facade.
  4. Click Save to save your changes.
  5. Click the Generate icon and review your generated code.

The following image in a graphical representation of the your service contract as displayed in the Tigerstripe Diagram Editor.


As you can see, the session facade MySessionFacade has a method named processOrder. The Order entity has an attribute named orderID. And the Order entity is managed by MySessionFacade as indicated by the arrow connecting the two items in the diagram.


Congratulations! You've completed your first Tigerstripe Service Contract using the Tigerstripe Diagram Editor! Tigerstripe Diagram Editor Additional concepts.

In addition to the basic tools available with the Tigerstripe Diagram Editor, you also have access to additional standard drawing tools. These tools allow you to add basic shapes to your diagram, such as ovals, triangles, rectangles, cylinders, and diamonds.

To access the standard shapes palette:

  1. Right-click on the Tigerstripe Diagram Editor. A shortcut menu displays.
  2. Click Add and select the shape for which you want to add to your diagram. The shape appears in the Tigerstripe Diagram Editor.
  3. Click to highlight the shape and move the shape to the desired location on your diagram.

You can move the shape any where on your diagram including on an entity or session facade.

To move the shape on an entity or session facade:

  1. Select the shape and drag it to the desired location. The area on the entity or session facade becomes darker.
  2. Release the shape.

You can place the shape behind your diagram to highlight a specific area.

To place the shape behind an entity or session facade:

  1. Select the shape from the diagram right-click menu.
  2. Resize the shape to encompass the desired area. The shape appears over your entity or facade.
  3. Right-click the shape and click Format.
  4. Click Order and select Send to Back. The shape displays behind the item as shown in the following figure.

Back to the top