The following example shows the Profile Update SQL Mapper (<ATG11dir>/DSS/config/atg/registry/data/mappers/profileupdatemapper.xml
), which is included by default with the Scenarios module. This mapper maps the properties of a Personalization module ProfileUpdateEvent
to the specified database table.
For additional examples, look at the mapper XML files located in the <ATG11dir>/DSS/config/atg/registry/data/mappers
directory.
<mapper> <registry-descriptor> <id>/profileupdatemapper.xml</id> <display-name>Profile Update SQL Mapper</display-name> <description> This maps the properties of a DPS ProfileUpdateEvent to a table in a database </description> </registry-descriptor> <input-filter context="jms"> <value>atg.dps.ProfileUpdate</value> </input-filter> <data-listener>/atg/reporting/dataset/ProfileUpdateLoggerQueue</data-listener> <database> <transaction-manager>/atg/dynamo/transaction/TransactionManager </transaction-manager> <datasource>dynamo:/atg/dynamo/service/jdbc/JTDataSource</datasource> <table> <name>dss_dps_update</name> <display-name> DPS Profile Update Event Dataset Table </display-name> <mappings> <dataset-mapping hidden="true"> <display-name>Dataset Id</display-name> <column>id</column> <type>java.lang.String</type> <property>datasetId</property> </dataset-mapping> <timestamp-mapping hidden="true"> <display-name>Time Stamp</display-name> <column>clocktime</column> <type>java.sql.Timestamp</type> <property>timestamp</property> </timestamp-mapping> <property-mapping> <display-name>Session Id</display-name> <column>sessionid</column> <type>java.lang.String</type> <property>context.request.session.id</property> </property-mapping> <property-mapping> <display-name>Changed Properties</display-name> <column>changedproperties</column> <type>java.lang.String</type> <property>context.message.reportingChangedProperties</property> </property-mapping> <property-mapping> <display-name>Old Values</display-name> <column>oldvalues</column> <type>java.lang.String</type> <property>context.message.reportingOldValues</property> </property-mapping> <property-mapping> <display-name>New Values</display-name> <column>newvalues</column> <type>java.lang.String</type> <property>context.message.reportingNewValues</property> </property-mapping> <repository-item-mapping> <display-name>Profile Id</display-name> <column>profileid</column> <type>java.lang.String</type> <property>context.profile.repositoryid</property> <component>/atg/userprofiling/ProfileAdapterRepository</component> </repository-item-mapping> </mappings> </table> </database> </mapper>