|
Guidelines, Patterns, and code for end-to-end Java applications.Java Pet Store Demo 1.3.1 > Using the Demo Using the DemoThis section describes how to use the Java Pet Store Demo. It starts by describing the high-level components of the demo, and how to use the demo through its various user interfaces. Demo at a GlanceThe Java Pet Store Demo consists of the following high-level components:
Using the StorefrontVisiting the StorefrontUsing a browser, go to the following URL:
If you have installed the Java Web Services Developer Pack, the URL changes to:
Creating a New UserIf this is your first time visiting the store, create a new user before making a purchase.
Placing an OrderTo purchase a bulldog, for example, follow these steps:
When you complete the order, the Storefront sends the order info asyncronously to the OPC. Because the order is less than $500, the OPC approves it automatically. Using the Admin ClientOpening the Admin ClientOrders are reviewed and modified using a Java administrator client. Using a browser, go to the following URL: If you have installed the Java Web Services Developer Pack, the URL changes to: To launch the administrator rich client interface, click Launch Rich Client at the home screen. The client is launched using Java Web Start. When the client appears, you will see two panes for displaying pending
and non-pending orders. The bulldog order from the previous section would
be non-pending, because it was less than $500, and all orders under $500 are
automatically approved. If you have enabled Web-services in the demo,
you can also use a stand-alone version of this Java client that communicates
to the server using Web-services. To run this client, do the following:
Viewing Non-Pending OrdersThe View Non-Pending Orders panel shows non-pending orders. Each of these orders has been approved, denied, or committed (fulfilled). To load the orders, click the Refresh button. To create or edit inventory for the Supplier, see Managing the Supplier. Approving/Denying OrdersYou approve or deny pending orders using the Process Pending Orders panel. An order appears as pending if its total value is greater than $500. To approve or deny an order:
You can approve or deny as many orders as you wish. To save your changes, click Commit. To see your changes, click the Refresh button. Managing the SupplierOpening the Supplier ClientThe supplier and its inventory are managed using a simple Web interface. Make sure to first logout of the admin client, before using the supplier. Using a browser, go to the following URL:
If you have installed the Java Web Services Developer Pack, the URL changes to:
Viewing and Editing InventoryTo view and edit inventory, click Display Inventory at the home screen. A table shows the quantity for each item in the inventory. To edit that item's quantity, edit the New Quantity cell in the item's entry, and check the Update box. After making all your changes, commit your edits to the database by clicking Submit. Any time you update the database, the Supplier notifies the OPC about the changes to the inventory. The OPC examines these changes to see if it can fulfill any orders that it previously could not. If it can fullill an order, it will mark the order as completed. | |||
|
| ||||||||||||