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, you create four destination repositories, two for staging and two for production, from these properties files:

/atg/commerce/catalog/ProductCatalog_staging.properties
/atg/commerce/pricing/priceLists/PriceLists_staging.properties

/atg/commerce/catalog/ProductCatalog_production.properties
/atg/commerce/pricing/priceLists/PriceLists_production.properties

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 ProductList, as follows:

<property name="priceList"
     column-name="price_list"
     item-type="priceList"
     repository="=/atg/myApp/PriceLists" >

To ensure that cross-references automatically 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:

repositoryMappings=\
   /Nucleus-path/original-repository=/Nucleus-path/new-repository,\
   /Nucleus-path/original-repository=/Nucleus-path/new-repository,\
   ...

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:

repositoryMappings=\
   /atg/myApp/ProductCatalog=\
   /atg/myApp/ProductCatalog_production,\

   /atg/myApp/PriceLists=\
   /atg/myApp/PriceLists_production

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

ForeignRepositoryMapper=/Nucleus-path/repository-mapper

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/ProductionRepositoryMapper.properties, and setting repositoryMappings with the increment/assignment operator += as follows:

repositoryMappings += mapping[,]...
Procedure

To create a destination repository, perform these steps:

 
loading table of contents...