The Claimable repository holds all possible claimable items, namely, gift certificates and coupons . The repository itself is made up of two parts: the database schema and the XML repository definition file. The definition file represents an item that can be claimed (a sub-type of type Claimable) and then defines specific implementations of this item.

The following example shows the pertinent code from the Claimable repository definition file:

<item-descriptor name="claimable" sub-type-property="type"
    <property name="type" data-type="enumerated">
      <option value="GiftCertificateClaimable"/>
      <option value="PromotionClaimable"/>

The following example shows the properties file for the ClaimableRepository component (/atg/commerce/claimable/ClaimableRepository):

# definition files for claimable objects
# name for the repository
# database access
# XML parsing
# id generator

Each item in the Claimable repository has a repositoryId property. The system uses the value in this property as the key for claiming the item (for example, as the claim code for a gift certificate). The value is created by the ObfuscatedIdGenerator service. The ObfuscatedIdGenerator service creates non-sequential repositoryId values. This is important to prevent users from guessing claim codes. The standard IdGenerator generates sequential repositoryId values. See the ID Generators section of the Core Dynamo Services chapter in the ATG Programming Guide.

Disabling the Claimable Repository

The Claimable repository is represented by the /atg/commerce/claimable/ClaimableRepository component. If you are not going to use the Claimable repository, you can disable it. Disabling the repository prevents you from having to create the associated tables in your database.

Follow these steps to disable the ClaimableRepository:

loading table of contents...