BEA Logo BEA WLCS Release 2.0

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WLCS Doc Home   |   WLCS Components Tour   |   Previous Topic   |   Next Topic   |   Contents   |   Index   |  

Design

 

This section contains the following topics:

Overview of Design Considerations

Prerequisites for Design Work

Directions for Designing

Step 1. Open a copy of BEA WebLogic Commerce Server Rational Rose model.

Step 2. Create a new MyBuyBeans tour package for the new components.

Step 3. Add a new class diagram to the tour package.

Step 4. Add a BasicBean Component to the class diagram.

Step 5. Add an ItemPriceCalculationPolicy Component to the class diagram.

Step 6. Create a new BeanieHat Component that extends the BasicBean Component.

Step 7. Create a new BeanieHatPricePolicy Component that extends the ItemPriceCalculationPolicy Component.

Step 8. Add attributes to the BeanieHat Component.

Step 9. Save and review the final Rational Rose model.

 


Overview of Design Considerations

Having received instructions from senior management to extend the MyBuyBeans.com site, the MyBuyBeans technical staff sits down to plan their course of action. Being the leader of the newly assembled team, you decide to first model a solution to the problem.

Senior management has given your team the beanie hat attributes that are of importance to customers: color and the number of propellers. The MyBuyBeans product catalog must contain information on both of these attributes and both customers and MyBuyBeans staff must be able to search for beanie hats using these properties. In addition to these requirements, management has expressed interest in a specialized pricing policy for beanie hats. Being a knowledgeable WebLogic Commerce Server developer, you decide to use WebLogic Commerce Server to develop a solution.

Looking at the Rational Rose model of the existing MyBuyBeans solution, you quickly realize that all items in the MyBuyBeans catalog are represented by a Configurable Entity Component. You also notice that each item has a corresponding Business Policy Component for implementing specialized pricing policies. As such, you decide to extend the existing model with two new Components: BeanieHat and BeanieHatPricePolicy.

 


Prerequisites for Design Work

In order to fully understand this section of the tour, it is recommended that you have a general understanding of Rational Rose and UML. For information on these two topics, please see the Development Process chapter in the BEA WebLogic Commerce Server Components Developer's Guide.

 


Directions for Designing

Step 1. Open a copy of BEA WebLogic Commerce Server Rational Rose model.

  1. Navigate to the model directory found under the WebLogic Commerce Server installation directory.

  2. Create a new subdirectory called tour. Be sure to name this new subdirectory "tour" exactly as given here (all lower-case), or else the rest of the technical demonstration will not work.

  3. Create a copy of the Rational Rose model WebLogicCommerce.mdl (found in the WebLogicCommerce directory) in the new tour directory.

  4. Start Rational Rose.

  5. Click on the Open menu item in the File menu.

  6. Navigate to the model\tour directory found under the WebLogic Commerce Server installation directory.

  7. Double click on WebLogicCommerce.mdl. This will open Rational Rose.

Step 2. Create a new MyBuyBeans tour package for the new components.

  1. Expand the Logical View folder in the Rational Rose navigation window.

  2. Expand the examples folder.

  3. Right click on the buybeans folder.

  4. Highlight the New menu item and then click on the Package menu item.

  5. Name the new package tour.

Step 3. Add a new class diagram to the tour package.

  1. Right click on the tour folder.

  2. Highlight the New menu item and then click on the Class Diagram menu item.

  3. Name the class diagram Main.

  4. Double click on the Main class diagram icon.

  5. Your Rational Rose navigation window should now look something like the following:

Step 4. Add a BasicBean Component to the class diagram.

  1. Expand the examples directory in the Logical View folder.

  2. Expand the buybeans directory.

  3. Expand the item directory.

  4. Click and drag the BasicBean class icon onto the Main class diagram window.

Step 5. Add an ItemPriceCalculationPolicy Component to the class diagram.

  1. Expand the theory directory in the Logical View folder.

  2. Expand the smart directory.

  3. Expand the ebusiness directory. Expand the item directory.

  4. Click and drag the ItemPriceCalculationPolicy class icon onto the Main class diagram window.

  5. Your Main class diagram window should now contain something like the following:

Step 6. Create a new BeanieHat Component that extends the BasicBean Component.

  1. Click on the Class button on the center toolbar. This button looks like the following:

  2. Create a new class by clicking on the Main class diagram window.

  3. Name the new class BeanieHat.

  4. Right click on the BeanieHat class and then click on the Open Specification menu item.

  5. Select BSC.ConfigurableEntity in the Stereotype pull down menu. Press the OK button.

  6. Click on the Generalization button on the center toolbar. This button looks like:

  7. Place the cursor over the BeanieHat class. Click and drag the cursor over the BasicBean class and then release the mouse button.

  8. Your Main class diagram window should now contain something like the following:

Step 7. Create a new BeanieHatPricePolicy Component that extends the ItemPriceCalculationPolicy Component.

  1. Click on the Class button on the center toolbar.

  2. Create a new class by clicking on the Main class diagram window.

  3. Name the new class BeanieHatPricePolicy.

  4. Right click on the BeanieHatPricePolicy class and then click on the Open Specification menu item.

  5. Select BSC.BusinessPolicy in the Stereotype pull down menu. Press the OK button.

  6. Click on the Generalization button on the center toolbar.

  7. Place the cursor over the BeanieHatPricePolicy class. Click and drag the cursor over the ItemPriceCalculationPolicy class and then release the mouse button.

  8. Click on the Dependency button on the center toolbar. This button looks like:

  9. Place the cursor over the BeanieHat class. Click and drag the cursor over the BeanieHatPricePolicy class and then release the mouse button. Right click on the resulting dotted line and then click on the Open Specification menu item. Name the dependency uses. Press the OK button.

  10. Your Main class diagram window should now contain something like the following:

Step 8. Add attributes to the BeanieHat Component.

  1. Right click on the BeanieHat class in the Main class diagram.

  2. Click on the Open Specification menu item.

  3. Click on the Attributes tab in the Class Specification dialog.

  4. Right click on the attributes list and select the Insert menu item. Name the new attribute color.

  5. Double click on the color attribute. This should open an Attribute Specification dialog.

  6. Type String in the Type field and select the Public radio button in the Export Control panel. Press the OK button.

  7. Right click on the attributes list and select the Insert menu item. Name the new attribute propellers.

  8. Double click on the propellers attribute. This should open an Attribute Specification dialog.

  9. Type int in the Type field and select the Public radio button in the Export Control panel. Press the OK button.

  10. Press the OK button in the Class Specification dialog.

Step 9. Save and review the final Rational Rose model.

  1. Click on the Save menu item in the File menu.

  2. Your final Main class diagram should contain something like the following: