The Oracle ATG Web Commerce implementation of gift lists supports most of the requirements for this feature for a typical commerce site. However, gift list functionality can be extended, if necessary.

This section describes how to extend gift list functionality by adding additional item properties to the gift-list item descriptor. The process includes the following basic steps:

Updating the Database and Repository Definition

You can extend your sites’ gift list functionality by adding new gift-list item properties. To add new properties, do the following:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE taglib
  PUBLIC "-//Art Technology Group, Inc.//DTD General SQL Adapter//EN"
  "http://www.atg.com/dtds/gsa/gsa_1.0.dtd">

<gsa-template>
  <header>
    <name>Commerce Giftlists</name>
    <author>Company XYZ</author>
    <version>$Id$</version>
  </header>
  <item-descriptor name="gift-list">
    <table name="dcs_giftlist">
      <property name="giftlistStatus" data-type="timestamp"
                column-name="giftlist_status"/>
    </table>
  </item-descriptor>
</gsa-template>

Note: You should only need to add to the schema and repository definition. Removing anything that is already there requires substantially more work.

Extending GiftlistFormHandler

After Updating the Database and Repository Definition to support additional gift-list item properties, you also need to extend the GiftlistFormHandler component to support them. To do so, do the following:

  1. Extend the class atg.commerce.gifts.GiftlistFormHandler to support your new properties and override related methods. The source code for this form handler can be found in <ATG10dir>/DCS/src/Java/atg/commerce/gifts.

    Note that most handlers in the GiftlistFormHandler have preXXX and postXXX methods that can be overridden to support your requirements. To support your new property, you should override the postSaveGiftlist method to save your new property value in the repository.

  2. Layer on a GiftlistFormHandler.properties file to configure an instance of the new class you created in step 1. The contents of the configuration file would look similar to the following:

    # MyNewGiftlistFormHandler
    #
    $class=xyz.commerce.gifts.MyNewGiftlistFormHandler


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices