Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »


Contents

Primary Presentation

Element Catalog

Variability Guide

Other Information

Related Views

Primary Presentation <<app>Petstore

Diagram 1. High-level View


Diagram in MS Visio format

Diagram 2. A Detailed View


Diagram in MS Visio format

Element Catalog

components

Package. Refinement view available for this element.

waf

Package. Refinement view available for this element.

under the namespace petstore::controller::ejb

actions

The classes in this package implement an EJB action following the command design pattern.

actions::CartEJBAction

Implements an EJB action following the command design pattern. Depending on the event that triggered it, updates quantity, add a new item or deletes an item to the shopping cart

actions::ChangeLocaleEJBAction

Implements an EJB action following the command design pattern. Changes the locale of the waf::StateMachine, ShoppingClientFacade, and the (components) ShoppingCart

actions::CreateUserEJBAction

Implements an EJB action following the command design pattern. Creates a user in the SignOnEJB, associates a ShoppingClientFacade to it.

actions::CustomerEJBAction

Implements an EJB action following the command design pattern. It creates or updates a customer based on the type of event that occurred

actions::OrderEJBAction

Implements an EJB action following the command design pattern. Creates an order, empties the cart and creates an OrderEventResponse

actions::SignOnEJBAction

Implements an EJB action following the command design pattern. It signs a user on.

ShoppingClientFacade

(Stateful) caches references and provides unified access to customer, shopping cart, and user ID.

ShoppingControllerEJB

(Stateful) Session Bean that provides access to the Shopping Client Facade. Extends the WAF EJB controller (EJBControllerLocalEJB).


Under the namespace petstore::controller::events

CartEvent

This Event contains the information for the EJBController of a change the state of the shopping cart. There are four basic types of cart events: ADD_ITEM, DELETE_ITEM, andUPDATE_ITEM(S)

CreateUserEvent

This Event contains the new username and password

CustomerEvent

This Event contains contact information, credit card, and profile information of a customer

OrderEvent

This Event contains the information about credit cart, billing and shipping of an order.

OrderEventResponse

This Event contains information about an order that has been placed.

SignOnEvent

This Event contains the information for the EJBController of the username that signed on.


under the namespace petstore::controller::web

actions

The classes in this package implement an Web actions following the command design pattern.

actions::CartHTMLAction

Processes a user change in the shopping cart. Changes include: adding items, removing items, updating item quantities, emptying the cart

actions::CreateUserHTMLAction

Processes a user sign on.

actions::CustomerHTMLAction

Processes a user changes/creation of a customer. Changes include: create customer, update customer

actions::OrderHTMLAction

Processes a user change in the order.

actions::SignOffHTMLAction

Processes a signoff

BannerHelper

This class relates to some web tier specific display selection where this helper will choose the banner to be displayed based on the category. The mapping of banners to categories could also be maintained in a properties file or database.

flow::handlers::CreateUserFlowHandler

This class will forward a user to the screen they left before they attempted to create an account. It is assumed that the SignOn component is used which provides an attribute of which screen to return to.

PetstoreComponentManager

Implements waf::controller::web::DefaultComponentManager and provides access to services in the web tier and ejb tier.

ShoppingWebController

This class is essentially just a proxy object that calls methods on the EJB tier using the waf.controller.ejb.ShoppingClientControllerEJB object. All the methods that access the EJB are synchronized so that concurrent requests do not happen to the stateful session bean.

SignonNotifier

This class will bind with the current session and notify the petstore backend when a SignOn has occurred. This allows for a loose coupling of the SignOn component and the petstoreApplication. Ensure the necessary setup is done in the application when a user signs in.

under the namespace tools::populate

AccountPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

AddressPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

CategoryDetailsPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

CategoryPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

ContactInfoPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

CreditCardPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

ItemDetailsPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

ItemPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

ProductDetailsPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

ProductPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

ProfilePopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

UserPopulator

Anonymously extends an XMLFilter to create and fill tables with the information that it gets from an XML stream (XMLReader).

XMLDBHandler

Extends org.xml.sax.helpers.XMLFilter. Sits between an XMLReader and the client application's event handlers, it modifies the configuration requests as they pass through.

Variability Guide

The tools::populate package is useful for testing environments. In production environments this package should be deleted or updated (synchronizing real data, etc.)

Other Information

The tools::populate package contains 12 Populator classes. All of them have a very similar behavior and have the same class method names, but strangely enough there is not a common interface that all classes implement. The same code is repeated over and over, the use of inheritance would be the natural way to go, but apparently the writers of the code did not consider this possibility before jumping to code. This code is difficult to maintain and error-prone.

Related Views

Back to the Pet Store SAD main page

  • No labels