As described above, you designate one contributing view as the primary view. Then you specify a method for matching (linking) items in each contributing view to items in the primary view – the two possible methods are linking by repository ID or linking by the value of one or more given properties. (Both techniques are described in the Composite Repositories chapter of the ATG Repository Guide.) When a getItem() or createItem() method attempts to retrieve an item from the composite repository, the repository component compares profile items in the contributing and primary views to see if any are linked; if they are, it creates a composite profile item that is an amalgamation of the properties from the contributing and primary views.

Consider the following example: You have a primary view and a contributing view as shown in the diagram below. You choose to link the primary and contributing view by the value of the user’s login property (called login in the primary view and userLogin in the contributing view). If the values in these properties match, a composite profile item is created when an item is retrieved from the composite repository.

The expression you would use in the composite repository definition file to specify how to link the two views is as follows:

        <link-via-property primary="login" contributing="userLogin"/>

For more information, refer to the description of the primary-item-descriptor-link tag in the Composite Repositories chapter of the ATG Repository Guide.

loading table of contents...