Exercise 3.3: Creating the CityBank integration design layer

In this exercise, you create the Citybank integration design layer. The integration design layer describes the integration between the external CityBank system that verifies PiggyBank transactions and the PiggyBank. The integration design layer is part of the realization of the Cash Check use case.

The PiggyBank relies on the CityBank to verify transactions. The CityBank provides the service to the PiggyBank by providing an external interface to the CityBank banking system. The CityBank integration layer describes the integration between the PiggyBank online banking application and the CityBank transaction verification interface. The integration component, which builds on information from the analysis model, is based on the data acess object (DAO) pattern.

The CityBank integration layer consists of the CityBank component specification, which implements the CityBank interface, and the CityBankDataAccessObject which is the wrapper for the CityBank integration component.

Creating the CityBank data access object

The CityBank data access object is the wrapper for the CityBank integration component. The CityBank data access object contains the checkCityBankAccount operation that verifies whether or not the CityBank bank account contains enough money to cash the check.

To create the dao subpackage:
  1. In the Model Explorer view, expand Enterprise IT Design Model, expand PiggyBank Implementation Designs, right-click the control package; then click Refactor > Rename.
  2. Name the package dao.
  3. In the dao package, right-click itso.ad.citybank Control Layer Design Elements; then click Refactor > Rename.
  4. Name the diagram dao - Data Access Object for CityBank Web Service.
Because the itso.ad.CityBank implementation design subpackage contains only one subpackage, you can delete the domain, presentation, and resource subpackages. These packages are included as part of the template.

To model the CityBankDataAccessObject class:
  1. In the Model Explorer view, expand PiggyBank Implementation Designs.
  2. In the itso.ad.citybank package, double-click the dao Design Elements diagram.
  3. In the diagram editor, rename the diagram DAO Design Elements.
  4. In the Model Explorer view, click the dao subpackage.
  5. In the Palette, click Class Diagram, double-click Class, and name the class CityBankDataAccessObject.
  6. In the diagram editor, right-click the CityBankDataAccessObject; then click Add UML > Operation and name the operation checkCityBankDataAccessObject( amount, checkReference ) .
  7. In the diagram editor, click the checkCityBankAccount operation.
  8. In the Properties view, on the General page, click Set return type
  9. In the Select Element window, click Boolean.
  10. Click OK.
You have created the CityBankDataAccessObject. Next, you can model the CityBank web service component.

Creating the CityBank Web service component

The CityBank Web service component represents the CityBank transaction verification service that the PiggyBank uses each time that a check is cashed.

To create the CityBank Web service component:
  1. In the Model Explorer view, expand PiggyBank Implementation Designs, and double-click the itso.ad.citybank Design Elements diagram.
  2. In the Palette, click Component Diagram, double-click Component, and name the new component CityBank.
  3. In the diagram editor, click the CityBank element.
  4. In the Properties view, on the Stereotypes page, click Add Stereotypes.
  5. In the Apply Stereotypes window, click Specification, click Service and click OK.
  6. In the Palette, double-click Interface and name the interface CityBank.
  7. In the diagram editor, right-click the CityBank interface; then click Add UML > Operation and name the operation validateCheck ( amount, checkReference ) .
  8. In the diagram editor, click the validateCheck operation.
  9. In the Properties view, on the General page, click Set return type.
  10. In the Select Element window, click Boolean and click OK.
  11. In the Palette, click Implements.
  12. In the diagram editor, click the CityBank component and drag it to the CityBank interface.

You have created the CityBank integration layer. Note that the signatures of the operations match in the CityBankDataAccessObject and the CityBank Web service component that implements the CityBank interface. Your diagram should look similar to the following figure:

The CityBank integration layer design elements.
Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.