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" version-property="version"> ... <property name="type" data-type="enumerated"> <option value="GiftCertificateClaimable"/> <option value="PromotionClaimable"/> </property> ... </item-descriptor>
The following example shows the properties file for the ClaimableRepository component (/atg/commerce/claimable/ClaimableRepository):
$class=atg.adapter.gsa.GSARepository # definition files for claimable objects definitionFiles=\ /atg/commerce/claimable/claimableRepository.xml # name for the repository repositoryName=Claimable # database access transactionManager=/atg/dynamo/transaction/TransactionManager dataSource=/atg/dynamo/service/jdbc/JTDataSource # XML parsing XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory # id generator IdGenerator=/atg/dynamo/service/ObfuscatedIdGenerator lockManager=/atg/dynamo/service/ClientLockManager
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:
Edit the
/atg/registry/ContentRepositoriescomponent and remove the value in theinitialRepositoriesproperty that references the/atg/commerce/claimable/ClaimableRepositorycomponent.Edit the
/atg/commerce/claimable/ClaimableToolscomponent and set theclaimableRepositoryproperty to null.

