For each target repository, you must create a destination GSARepository. For example, given two targets, staging and production, and two repositories on each target, ProductCatalog and PriceLists, four destination repositories are required:, two for staging and two for production, as configured by these properties files:



Note: The distribution for Oracle ATG Web Commerce Merchandising provides ProductCatalog and PriceLists repositories and their corresponding destination repositories, for production-only and production/staging deployments. If you create your own repositories, you must also create their destination repositories.

Foreign Repository Mappings

Items in one destination repository can link to items in another through their repository attribute. Because the destination repositories are renamed copies of the corresponding production repositories, you must provide a way to resolve external references. For example, items in the destination repository ProductCatalog_production might reference items in the original repository PriceList, as follows:

<property name="priceList"
     repository="/atg/myApp/PriceLists" >

To ensure that cross-references resolve correctly, you can create a RepositoryMapper component from the class atg.repository.RepositoryMapper, which extends the GenericService class. This component’s RepositoryMappings property provides the mappings that are required by a foreign repository, as follows:


where Nucleus-path must be the repository’s absolute Nucleus path.

Thus, given the previous example, you set the RepositoryMappings property for a RepositoryMapper as follows:


Each repository that requires mapping for its items must set a RepositoryMapper in its foreignRepositoryMapper property. Given the previous example, and must set their foreignRepositoryMapper property to a RepositoryMapper as follows:


Note: The ATG platform distribution provides a RepositoryMapper that contains required mappings; you can add your own mappings to these by creating, in the management server’s localconfig layer, /atg/repository/, and setting repositoryMappings with the increment/assignment operator += as follows:


To create a destination repository, perform these steps:

For example: