Rose Panther Link


Chapter 3 . Building Class Diagrams


Modeling Panther Service Components in Rose

Creating a New Model Diagram

How to Create a New Class Diagram

  1. Start your Rational Rose product.
  2. The screen displays a Logical View window with a blank Class Diagram. (A new diagram is also available using FileNew.)
  3. Check that Rose Panther Link is available by looking for the Panther icon on the toolbar. (For instructions on customizing the toolbar, refer to "How to Verify Your Rose Panther Link Installation.")

    Figure 3-1 New class diagram in Rational Rose

Configuring the Model

After creating a diagram, you must specify the model's options for the Panther classes. All the classes in a model inherit these settings; however, they can be overridden at the class level.

How to Specify Model Settings for Panther Classes

  1. Choose ToolsOptions.
  2. On the Options window, select the Panther tab, which displays the current default values.

  3. To change a property setting, click once to select the property. Click a second time to display an option menu or list box where you can enter the new value, as illustrated in the following diagram.

  4. The following properties must be specified:
  5. If desired, change the setting for ComponentGenerationLanguage: Java or JPL.
  6. Specify the component type: GenerateCOM, GenerateJetNet/TUXEDO, and/or GenerateEJB.
  7. When finished, choose Apply. Any changes from the default values are saved with the model.

    Note: For more information on each setting, refer to "Model/Class Specification."

Creating a Panther Class

Each class you create in a Rose model can generate a Panther service component.

How to Create a Panther Class

Choose one of the following options:

How to Change the Visual Representation of the Panther Class

  1. Right-click on the class.
  2. Select OptionStereotype Display.
  3. Choose between None, Label, Decoration and Icon.

Building a Class Specification

In the Class Specification, you can specify:

How to Define the Class Specification

  1. Define the Class Specification for a Panther component by performing one of the following options:
  2. On the Class Specification window, select the Panther tab.
  3. Modify the values to override the model defaults. Any values that reflect model defaults are gray, whereas changes are black. For information on each setting, refer to "Model/Class Specification."
  4. When finished, choose Override; then choose Apply.

Specifying Attributes

Attributes of a Rose class correspond to properties of a Panther service component.

How to Add Attributes

  1. Open the Class Specification window (by double-clicking on the class component).
  2. Select the Attributes tab.
  3. Modify Attributes as appropriate (right-click and select Insert to insert an attribute).

How to Add Attribute-specific Properties

  1. Double-click on the Attribute to launch the Class Attribute Specification window.

  2. For an attribute to show up in your Panther service component, you must set the Export Control to Public.
  3. Modify other Attribute Properties as appropriate.
  4. Enter comments in the Documentation window. The comments will be available in Panther as service component and field properties. (Optional)
  5. Under the Panther tab, set any Panther-specific Attribute properties. For information on each setting, refer to "Attribute Specification."

Specifying Operations

Operations of a Rose class correspond to methods of a Panther service component.

How to Add Operations

  1. Open the Class Specification window (by double-clicking on the class component).
  2. Select the Operations tab.

  3. Modify Operations as appropriate (right-click and select Insert to insert an operation).

How to Add Operation-specific Properties

  1. Double-click on the Operation to launch the Operation Specification window.

  2. Enter comments in the Documentation window. The comments will be available in Panther as service component and field properties. (Optional)
  3. Under the Panther tab, set any Panther-specific Operation properties. For information on each setting, refer to "Operation Specification."

  4. If you have an existing Panther component, and you do not want to overwrite any customized return_args and receive_args statements, set the RegenerateReturnArguments and RegenerateReceiveArguments properties to False.

Adding Arguments

How to Add Arguments to the Operation

  1. Open the Operation Specification window.
  2. Select the Detail tab.
  3. Modify Arguments as appropriate (right-click and select Insert to insert an argument).

How to Edit Parameter-specific Properties

  1. Double-click on an Argument to launch the Parameter Specification window.
  2. In Rose, a variable can be specified as any type. Panther supports only the following types: Void, String, Integer, Boolean, Double, and Object. Variables specified in Rose as being of a type not recognized by Panther will be represented in Panther as type Object.

  3. Enter comments in the Documentation window. The comments will be available in Panther as field properties. (Optional)
  4. Under the Panther tab, set any Panther-specific Argument properties. For information on each setting, refer to "Parameter Specification."

Samples

Your Rose Panther Link directory includes a sample, auction.mdl. This model shows three classes that are part of an auction e-commerce application.

Figure 3-2 auction.mdl