public class ProfileMarkerManager extends RepositoryMarkerManager implements atg.userprofiling.ProfileSwapEventListener
This extension is a registered listener of ProfileSwapEvents issued by the ProfileForm class so that it may copy markers from an anonymous user to a persistent user when a login occurs.
However, there is one caveat. The conditional application logic that originally added a marker to the transient user is not reevaluated when copying the marker from the transient to the persistent user. Therefore, a marker that was conditionally added to the transient user will be added to the persistent user without performing the same conditional checks. As a result, the application may subsequently see unexpected results in the persistent user's marker collection.
For example, if a marker was added in a scenario that conditionally added a marker based on the value of other markers, it will be copied to the persistent user without first checking the value of other markers.
Configurable properties:
RepositoryMarkerManager
,
ProfileSwapEventListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
mAddMessageJMSType, mAlwaysValidate, mDefaultDuplicationMode, mDefaultMarkedItemType, mDefaultMarkerDuplicateComparator, mDefaultMarkerItemType, mDefaultMarkerPropertyName, mDefaultMarkerSortPropertyName, mGenerateEvents, mMarkerDuplicateComparators, mMarkerMessageSource, mMarkerValidators, mMaxItemsPerTransaction, mRemoveMessageJMSType, mReplaceMessageJMSType, mRepository, mRequiredExtendedProperties, mTransactionManager
SERVICE_INFO_KEY
ALLOW_DUPLICATES, ANY_VALUE, DEFAULT_MARKER_ID_PROPERTY_NAME, DEFAULT_MARKER_ITEM_TYPE, DEFAULT_MARKER_PROPERTY_NAME, DEFAULT_MARKER_SORT_PROPERTY_NAME, MARKER_CREATIONDATE_PROPERTY_NAME, MARKER_DATA_PROPERTY_NAME, MARKER_DUPLICATIONMODE_PROPERTY_NAME, MARKER_KEY_PROPERTY_NAME, MARKER_OWNER_PROPERTY_NAME, MARKER_RESOURCE_NAME, MARKER_VALUE_PROPERTY_NAME, NO_DUPLICATES, PARAM_DATA, PARAM_DUPMODE, PARAM_EXTENDED_PROPERTIES, PARAM_ITEM, PARAM_ITEM_ID, PARAM_KEY, PARAM_MARKED_ITEM_TYPE, PARAM_MARKER_ITEM_TYPE, PARAM_MARKER_MANAGER, PARAM_MARKER_PROPERTY_NAME, PARAM_VALUE, REPLACE_DUPLICATES, sResourceBundle
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
ProfileMarkerManager() |
Modifier and Type | Method and Description |
---|---|
void |
addSwapEventListener(atg.userprofiling.ProfileSwapEventListener pListener)
Adds a ProfileSwapEventListener to the list of listeners that
care about ProfileSwapEvents
|
protected java.lang.String |
getMarkerEventProfileId(java.lang.String pMarkedItemId,
java.lang.String pMarkedItemType,
RepositoryItem pMarkerItem)
This method extension will return the markedItemId if the markedItemType is the
same as the defaultMarkedItemType.
|
java.lang.String[] |
getProfilePropertyNames()
Returns the profile property names that contain markers
|
void |
receiveSwapEvent(atg.userprofiling.ProfileSwapEvent pEvent)
Accepts and processes a ProfileSwapEvent
generated by the ProfileForm.
|
void |
removeSwapEventListener(atg.userprofiling.ProfileSwapEventListener pListener)
Removes a ProfileSwapEventListener to the list of listeners that
care about ProfileSwapEvents
|
protected void |
sendProfileSwapEvent(atg.userprofiling.ProfileSwapEvent pEvent)
Sends a ProfileSwapEvent to the swap event listeners
This method is called by receiveSwapEvent to pass along
the swap event to other listeners so, if need be, those
listeners can perform additional processing after the
ProfileMarkerManager.
|
void |
setProfilePropertyNames(java.lang.String[] pProfilePropertyNames) |
addMarkerItemToItem, addMarkerToItem, addMarkerToItem, addMarkerToItem, addMarkerToItem, addMarkerToItem, addMarkerToItem, addMarkerToItem, addMarkerToItem, addMarkerToItem, addMarkerToItemsCollection, addMarkerValidator, areMarkerPropertiesEqual, compareDefaultPropertyValues, compareExtendedPropertyValues, createAddedEventMessage, createAddedEventMessage, createAddedMarkerData, createMarkerItem, createRemovedEventMessage, createRemovedEventMessage, createRemovedMarkerData, createReplacedEventMessage, createReplacedEventMessage, createReplacedMarkerData, createSortedArrayOfMarkers, deleteMarkers, doStartService, findComparator, findDuplicates, findLastMarkerOnItem, findMarkerValidator, findMarkerValidator, findMatchingMarkers, findMatchingMarkers, findMatchingMarkers, findValidKeys, findValidValuesForKey, generateAddMessage, generateMarkerData, generateMarkerExtendedPropertyQuery, generateMarkerQualifyingAndedQuery, generateRemoveMessage, generateReplaceMessage, getAddMessageJMSType, getAllMarkersFromItem, getAllMarkersFromItem, getAllMarkersFromItem, getAllMarkersFromItem, getComparatorKey, getDefaultDuplicationMode, getDefaultMarkedItemType, getDefaultMarkerDuplicateComparator, getDefaultMarkerItemType, getDefaultMarkerPropertyName, getDefaultMarkerSortPropertyName, getDefaultPropertyQuery, getDuplicationMode, getItemsWithMarker, getItemsWithMarker, getMarkedItemType, getMarkerCollectionFromItem, getMarkerDuplicateComparators, getMarkerItemType, getMarkerMessageSource, getMarkerPropertyName, getMarkerSortPropertyName, getMarkerValidators, getMaxItemsPerTransaction, getRemoveMessageJMSType, getReplaceMessageJMSType, getRepository, getRequiredExtendedProperties, getTransactionManager, getValidatedKeysAndValues, hasDuplicates, hasMarker, hasMarker, hasMarker, hasMarker, identifyMissingExtendedProperties, isAlwaysValidate, isDuplicateMarker, isGenerateEvents, isValidKey, isValidValueForKey, matchLastMarker, matchLastMarker, matchLastMarker, matchLastMarker, matchLastMarkerWithKey, matchLastMarkerWithKey, matchLastMarkerWithKey, matchLastMarkerWithKey, removeAllMarkersFromItem, removeAllMarkersFromItem, removeAllMarkersFromItem, removeAllMarkersFromItem, removeMarkersFromItem, removeMarkersFromItem, removeMarkersFromItem, removeMarkersFromItem, removeMarkersFromItemsCollection, removeMarkerValidator, setAddMessageJMSType, setAlwaysValidate, setBaseMarkerData, setBaseMarkerEventProperties, setBaseMarkerEventProperties, setDefaultDuplicationMode, setDefaultMarkedItemType, setDefaultMarkerDuplicateComparator, setDefaultMarkerItemType, setDefaultMarkerProperties, setDefaultMarkerPropertyName, setDefaultMarkerSortPropertyName, setExtendedMarkerData, setExtendedMarkerProperties, setGenerateEvents, setMarkerDuplicateComparators, setMarkerMessageSource, setMarkerValidators, setMaxItemsPerTransaction, setRemoveMessageJMSType, setReplaceMessageJMSType, setRepository, setRequiredExtendedProperties, setTransactionManager, validateMarker
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public void setProfilePropertyNames(java.lang.String[] pProfilePropertyNames)
public java.lang.String[] getProfilePropertyNames()
public void addSwapEventListener(atg.userprofiling.ProfileSwapEventListener pListener)
pListener
- the ProfileSwapEventListener to addpublic void removeSwapEventListener(atg.userprofiling.ProfileSwapEventListener pListener)
pListener
- the ProfileSwapEventListener to removeprotected java.lang.String getMarkerEventProfileId(java.lang.String pMarkedItemId, java.lang.String pMarkedItemType, RepositoryItem pMarkerItem)
getMarkerEventProfileId
in class RepositoryMarkerManager
pMarkedItemId
- the marked item's repository idpMarkedItemType
- the marked item's repository typepMarkerItem
- the marker repository itempublic void receiveSwapEvent(atg.userprofiling.ProfileSwapEvent pEvent)
When an anonymous user logs in, this method copies the markers from the anonymous profile to the persistent profile.
The original duplication mode for each marker is applied when adding the marker to the persistent profile.
receiveSwapEvent
in interface atg.userprofiling.ProfileSwapEventListener
pEvent
- the event to processprotected void sendProfileSwapEvent(atg.userprofiling.ProfileSwapEvent pEvent)
pEvent
- the ProfileSwapEvent