The composite repository requires that all property names in a composite view map to only one property from a primary or contributing view. Property names are resolved as follows:
If the
all-properties-propagate
attribute in the definition file is set to true for any view, all properties from that view are combined into the composite view, retaining their property names, property types, and any metadata they may have defined.Any properties marked for exclusion are removed from the composite view. See Explicit Property Exclusion.
All explicit property mappings are performed. See Explicit Property Mappings.
If any remaining property name is the same as any other property name in the composite view, the Personalization module generates an error.
Explicit Property Exclusion
Sometimes you might not want to expose absolutely every property from the primary and contributing views in the composite view. You can use explicit property exclusion to remove from the composite view any properties that you do not require.
Examples:
<primary-item-descriptor name=user>
…
<property mapped-property-name="fax" exclude="true"/>
…
</primary-item-descriptor>
…
<contributing-item-descriptor name=legacyUser>
…
<property mapped-property-name="age" exclude="true"/>
…
</contributing-item-descriptor>
The default setting for the exclude
attribute is false. The mapped-property-name
attribute identifies the property in the underlying repository view that you want to exclude from the composite view.
Explicit Property Mappings
All properties in the composite view must be unique. If two contributing views have properties with the same name, you can avoid collision by mapping a given property in the composite view to one of the contributing property names. The following diagram shows a primary view and a contributing view that both contain a property called phoneNumber
. One property stores a user’s home phone number, and the other holds his or her work phone number. In the example, a workPhoneNumber
property is created in the composite view and mapped to the work phone property in the contributing view.
![The diagram is described in preceding text](media/image5.png)
Within either the primary or contributing item descriptor definition, use the mapped-property-name
attribute of the <property>
tag to create an explicit property mapping. Example:
<contributing-item-descriptor name=legacyUser>
…
<property name="workPhoneNumber" mapped-property-name="phoneNumber"/>
…
</contributing-item-descriptor>
The mapped-property-name
specifies the name of the property in the primary or contributing view (the underlying repository). The name
value specifies the new name for the property in the composite view.
For more information on <property>
tags, see Standard User Profile Repository Definition in this manual and also the SQL Repository Definition Tag Reference chapter in the ATG Repository Guide.