ClassName

atg.markers.userprofiling.droplet.ProfileHasMarker

Component

/atg/markers/userprofiling/droplet/ProfileHasMarkerDroplet

The ProfileHasMarker servlet bean class uses the Profile Marker Manager to determine whether a user profile has a profile marker with the key, value, and data property values you specify. You have the option of setting all three parameters to ANY_VALUE in order check to see if a profile has any profile markers at all.

For more information on working with marked profiles, see the UsingMarkedProfiles section in the UsingProfileMarkers chapter of the ATG Personalization Programming Guide.

Input Parameters

itemId
Specifies the ID of a profile that you want to check for markers. If none is specified here, the value indicated in the item input parameter is used.

item
Specifies the profile item to check for markers. If none is specified here, the active profile is used.

key
This required parameter specifies the value in the marker’s key property. By setting this parameter to ANY_VALUE, you indicate that the marker’s key value is irrelevant for your purposes. For example:

<dsp:param name="key" bean="ProfileHasMarkerDroplet.ANY_VALUE"/>

value
Specifies the value in the marker’s value property. You can set this parameter to NULL or omit it altogether if the marker’s value property must be null. By setting this parameter to ANY_VALUE, you indicate that the marker’s value value is irrelevant for your purposes. For example:

<dsp:param name="value" bean="ProfileHasMarkerDroplet.ANY_VALUE"/>

data
Specifies the value in the marker’s data property. You can set this parameter to NULL or omit it altogether if the marker’s data property must be null. By setting this parameter to ANY_VALUE, you indicate that the marker’s data value is irrelevant for your purposes. For example:

<dsp:param name="data" bean="ProfileHasMarkerDroplet.ANY_VALUE"/>

extendedProperties
This parameter is a map that specifies any additional marker properties (set to the map’s key) and property values (set to the map’s value) that must exist on the profile marker.

markerManager
This parameter indicates the Profile Marker Manager component to use. If a Profile Marker Manager is not specified here, the Profile Marker Manager indicated in the servlet bean’s repositoryMarkerManager property is used.

markerPropertyName
Specifies the property on the profile that you want to check for markers. If a property is not specified here, the servlet bean uses the default value specified in its defaultMarkerPropertyName property.

markedItemType
Specifies the type of RepositoryItem that has markers you want to work with. If a repository item type is not specified here, the servlet bean uses the default value specified in its defaultMarkedItemType property.

Output Parameters

errorMsg
This parameter contains any error messages generated during the servlet bean’s execution.

Open Parameters

error
This parameter is rendered when an error occurs during servlet bean execution.

true
This parameter is rendered when the profile has a profile marker that matches the criteria you specify.

false
This parameter is rendered when the profile does not have a marker that matches the criteria you specify.

Example

In this example, the servlet bean checks the current user profile for partner profile markers. When none exist, an advertisement displays.

<dsp:droplet name="/atg/markers/userprofiling/droplet/ProfileHasMarkerDroplet">
   <dsp:param name="key" bean="partner"/>
   <dsp:param name="value" bean="ProfileHasMarkerDroplet.ANY_VALUE"/>
   <dsp:param name="data" bean="ProfileHasMarkerDroplet.ANY_VALUE"/>

<dsp:oparam name="false">
      Purchase your airline tickets with Travel Site A! If you need to rent a car,
check out the deals offered by Travel Site B!
   </dsp:oparam>

</dsp:droplet>
 
loading table of contents...