Determines whether a profile has a profile marker.

Class Name

atg.markers.userprofiling.droplet.ProfileHasMarker

Component

/atg/markers/userprofiling/droplet/ProfileHasMarkerDroplet

Required Input Parameters

key

The value in the marker’s key property. Set this parameter to ANY_VALUE to indicate that the marker’s key value is irrelevant for your purposes. For example:

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

Optional Input Parameters

itemId

The ID of a profile to check for markers. If omitted, the value indicated in the item input parameter is used.

item

The profile item to check for markers. If omitted, the active profile is used.

value

The value in the marker’s value property. You can set this parameter to NULL or omit it if the marker’s value property must be null.

Set this parameter to ANY_VALUE to indicate that the marker’s value value is irrelevant for your purposes. For example:

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

data

The value in the marker’s data property. You can set this parameter to NULL or omit it if the marker’s data property must be null.

Set this parameter to ANY_VALUE to indicate that the marker’s data value is irrelevant for your purposes. For example:

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

extendedProperties

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

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

markerPropertyName

The property on the profile to check for markers. If omitted, the servlet bean uses the default value specified in its defaultMarkerPropertyName property.

markedItemType

The type of RepositoryItem that has markers to work with. If omitted, the servlet bean uses the default value specified in its defaultMarkedItemType property.

Output Parameters

errorMsg

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

Open Parameters

error

Rendered when an error occurs during servlet bean execution.

true

Rendered when the profile has a profile marker that matches the criteria you specify.

false

Rendered when the profile does not have a marker that matches the criteria you specify.

Usage Notes

ProfileHasMarker class uses the Profile Marker Manager to determine whether a user profile has a profile marker with the specified key, value, and data property values. In order to check whether a profile has any profile markers, set all three parameters to ANY_VALUE.

For more information on working with marked profiles, see the Using Marked Profiles section in the Using Profile Markers chapter of the Personalization Programming Guide.

Example

In the following 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" value="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>

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