Add a profile marker to a profile.

Class Name

atg.markers.userprofiling.droplet.AddMarkerToProfile

Component

/atg/markers/userprofiling/droplet/AddMarkerToProfileDroplet

Required Input Parameters

key

The value to save to the marker’s key property. The profile marker key property holds a string that represents a similarity among a grouping of profile markers. For example, key can represent a type of profile marker or the circumstances under which the marker is assigned.

Optional Input Parameters

itemId

The ID of the profile item the marker is assigned to. If omitted, the value indicated in the item input parameter is used.

item

The profile item that the marker is assigned to. If omitted, the active profile is used.

value

The value that is saved to the marker’s value property. The profile marker value property holds a string that is related to the key property.

data

The value that is saved to the marker’s data property. The profile marker data property holds a string that is related to the key and value properties.

extendedProperties

A map that specifies any property values for marker properties other than key, value, and data that is saved to the new marker. The marker property is saved to the maps key and its property value is set to the map’s value.

duplicationMode

The duplication policy used by the Profile Marker Manager. Options include ALLOW_DUPLICATES, REPLACE_DUPLICATES, and NO_DUPLICATES. If a profile has a marker and a Profile Marker Manager attempts to add an identical marker to it, a mode of REPLACE_DUPLACES causes the existing marker to be replaced by the new one, while a mode of NO_DUPLICATES keeps the existing marker and discards the new one. If this parameter is omitted, the servlet bean uses the default mode provided in its defaultDuplicationMode property.

For more information on duplication modes, see the Configuring the Profile Marker Manager section of the Using Profile Markers chapter of the Personalization Programming Guide.

markerManager

The Profile Marker Manager component to use. If omitted, the Profile Marker Manager specified in the servlet bean’s repositoryMarkerManager property is used.

markerPropertyName

The property on the profile that stores the markers created by this servlet bean. If omitted, the servlet bean uses the default specified in its defaultMarkerPropertyName property.

markerItemType

The type of RepositoryItem used by the marker. If omitted, the servlet bean uses the default specified in its defaultMarkerItemType property.

markedItemType

The type of RepositoryItem that receives a marker. If omitted, the servlet bean uses the default specified in its defaultMarkedItemType property.

Output Parameters

marker

Contains the profile marker created by the servlet bean.

errorMsg

Contains any error messages generated during the servlet bean’s execution.

Open Parameters

output

Rendered when the marker is added to the profile.

error

Rendered when a marker should be created and attached to a profile, but one or both actions are not completed successfully.

Usage Notes

AddMarkerToProfile communicates with the Profile Marker Manager to create a profile marker and attach it to the appropriate profile, based on the marker and profile information you specify.

For more information about attaching profile markers to profiles, see the Marking a User Profile section in the Using Profile Markers chapter of the Personalization Programming Guide.

Example

The following example shows how to add a profile marker to the active user profile. After the marker is added, the user sees a message encouraging the use of travel site A. Because the message is displayed only when the marker is added and the duplication mode prevents the same marker from being added twice, users see the encouragement message only once.

<dsp:droplet
 name="/atg/markers/userprofiling/droplet/AddMarkerToProfileDroplet">
   <dsp:param name="key" value="partner"/>
   <dsp:param name="value" value="travelSiteA"/>
   <dsp:param name="duplicationMode" value="NO_DUPLICATES"/>

   <dsp:oparam name="output">
      We love travel site A! Check out our joint discounts.
   </dsp:oparam>

</dsp:doplet>

Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices