The business layer classes contain the logic for managing gift lists and items. The methods within these classes are used to create, update, and delete selected gift lists for a given customer. The business layer components are the interface to the Giftlists repository. All calls to modify a gift list are made through these classes.
Gift list business layer classes include the following:
GiftlistManager: The majority of the functionality for gift list management exists in theGiftlistManagercomponent. The class contains such methods ascreateGiftlist,updateGiftlist,addItemToGiftlistandremoveItemFromGiftlist. These methods are higher level than those inGiftlistToolsand mostly perform validation tasks before callingGiftlistToolsto update the gift list repository.GiftlistTools:TheGiftlistToolscomponent is the low level interface and contains the logic for creating and editing gift lists in the repository.GiftlistToolsis not usually called directly. Generally, it is called by theGiftlistManagerclass to perform tasks on gift lists.
Because these classes do not contain any state, it makes sense for them to exist as globally-scoped services in Oracle ATG Web Commerce. Rather than constructing a new object when required, Commerce places one instance of each component into the Nucleus hierarchy to be shared. They can be found in the hierarchy under:
/atg/commerce/gifts/GiftlistTools/atg/commerce/gifts/GiftlistManager
Note: Gift lists use the ClientLockManager component to control locks on repository items. The ClientLockManager prevents a deadlock situation or data corruption that could occur when multiple customers update the same gift list. The ClientLockManager is located at /atg/dynamo/service/ClientLockManager. See the Using Locking in Fulfillment section of the Fulfillment Framework chapter for more information on the ClientLockManager.

