atg.userprofiling
Class PageEventTrigger

java.lang.Object
  extended by atg.userprofiling.PageEventTrigger

public class PageEventTrigger
extends java.lang.Object

This class is used to fire events/messages when pages are viewed, or certain links are clicked

For PageViewedEvents, both the D4 style events will be fired (if sendD4StyleEvents is set to true in Nucleus.properties) as well as the JMS Message, atg.userprofiling.dms.PageVisitMessage

For ClickThroughMessages, only the JMS Message will be sent. There is no corresponding D4 style event that is fired.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String SCENARIO_PATH_INFO_SEPARATOR
          The separator for the scenario path info
 
Constructor Summary
PageEventTrigger()
          Constructs an instanceof PageEventTrigger
 
Method Summary
 java.lang.String getClickThroughProfileIdParameter()
           
 java.lang.String getClickThroughReferrerParameter()
           
 java.lang.String getClickThroughSourceParameter()
           
 atg.service.event.EventDistributor getDistributor()
          The EventDistributor to send fired events to.
 atg.userprofiling.dms.DPSMessageSource getMessageSource()
          Returns property messageSource
 java.lang.String[] getNoPageEventMimeTypes()
          Returns property noPageEventMimeTypes
 long getNumClickThroughEvents()
           
 long getNumPageViewedEvents()
          Returns property NumPageViewedEvents
 java.lang.String getProfilePath()
          Returns property ProfilePath
 java.lang.String getRequestPageName(DynamoHttpServletRequest pRequest, boolean pRemoveQueryArgs)
           
 java.lang.String getSourceNameDelimiter()
           
 boolean getUsePathInfo()
           
 WebAppRegistry getWebAppRegistry()
          Get property WebAppRegistry
 boolean isNoIncludedPages()
           
 boolean isNoRedirectedPages()
           
 boolean isRemoveClickThroughURIArguments()
           
 boolean isRemoveURIArguments()
          Returns property RemoveURIArguments
 void sendClickThroughEvent(DynamoHttpServletRequest pRequest)
          Sends a click through event using the parameters defined in pRequest.
 void sendClickThroughEvent(DynamoHttpServletRequest pRequest, java.lang.String[] pSourceNames)
          This sends a ClickThroughMessage using the current request and the value of the source parameter.
 void sendClickThroughEvent(DynamoHttpServletRequest pRequest, java.lang.String pSourcePath, java.lang.String pDestinationPath, java.lang.String[] pSourceNames)
          Sends a ClickThroughMessage using the method arguments.
 void sendClickThroughEvent(DynamoHttpServletRequest pRequest, java.lang.String pSourcePath, java.lang.String pDestinationPath, java.lang.String pSourceScenarioPathInfo, java.lang.String pDestinationScenarioPathInfo, java.lang.String[] pSourceNames)
          Sends a ClickThroughMessage using the method arguments.
 void sendClickThroughEvent(java.lang.String pSourcePath, java.lang.String pDestinationPath, java.lang.String[] pSourceNames, java.lang.String pProfileId)
          Sends a ClickThroughMessage
 void sendClickThroughEvent(java.lang.String pSourcePath, java.lang.String pDestinationPath, java.lang.String pSourceScenarioPathInfo, java.lang.String pDestinationScenarioPathInfo, java.lang.String[] pSourceNames, RepositoryItem pProfile, java.lang.String pSessionId, java.lang.String pParentSessionId)
          Sends a ClickThroughMessage
 void sendClickThroughEvent(java.lang.String pSourcePath, java.lang.String pDestinationPath, java.lang.String pSourceScenarioPathInfo, java.lang.String pDestinationScenarioPathInfo, java.lang.String[] pSourceNames, java.lang.String pProfileId)
          Sends a ClickThroughMessage
 void sendClickThroughEvent(java.lang.String pSourcePath, java.lang.String pDestinationPath, java.lang.String pSourceScenarioPathInfo, java.lang.String pDestinationScenarioPathInfo, java.lang.String[] pSourceNames, java.lang.String pProfileId, java.lang.String pSessionId, java.lang.String pParentSessionId)
          Sends a ClickThroughMessage
 void sendPageViewedEvent(DynamoHttpServletRequest pRequest)
          Send a page viewed event.
 void sendPageViewedEvent(java.lang.String pPageName)
          Send a page viewed event with out attached request, session, or profile properties
 void sendPageViewedEvent(java.lang.String pPageName, java.lang.String pScenarioPathInfo, DynamoHttpServletRequest pRequest)
          Send a page viewed event.
 void sendPageViewedEvent(java.lang.String pPageName, java.lang.String pScenarioPathInfo, DynamoHttpServletRequest pRequest, javax.servlet.http.HttpSession pSession, RepositoryItem pProfile)
          Send a page viewed event with the given information.
 void setClickThroughProfileIdParameter(java.lang.String pClickThroughProfileIdParameter)
           
 void setClickThroughReferrerParameter(java.lang.String pClickThroughReferrerParameter)
          Sets the name of the request parameter that is used to identify the source path of the referring page.
 void setClickThroughSourceParameter(java.lang.String pClickThroughSourceParameter)
          Sets the name of the source parameter that will be used to generate ClickThroughMessages
 void setDistributor(atg.service.event.EventDistributor pValue)
          The EventDistributor to send fired events to.
 void setMessageSource(atg.userprofiling.dms.DPSMessageSource pMessageSource)
          Sets property messageSource
 void setNoIncludedPages(boolean pNoIncludedPages)
           
 void setNoPageEventMimeTypes(java.lang.String[] pNoPageEventMimeTypes)
          Sets property noPageEventMimeTypes
 void setNoRedirectedPages(boolean pNoRedirectedPages)
           
 void setProfilePath(java.lang.String pProfilePath)
          Sets property ProfilePath
 void setRemoveClickThroughURIArguments(boolean pRemoveClickThroughURIArguments)
           
 void setRemoveURIArguments(boolean pRemoveURIArguments)
          Sets property RemoveURIArguments
 void setSourceNameDelimiter(java.lang.String pSourceNameDelimiter)
           
 void setUsePathInfo(boolean pUsePathInfo)
          Sets the property UsePathInfo.
 void setWebAppRegistry(WebAppRegistry pWebAppRegistry)
          Set property WebAppRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


SCENARIO_PATH_INFO_SEPARATOR

public static final java.lang.String SCENARIO_PATH_INFO_SEPARATOR
The separator for the scenario path info

See Also:
Constant Field Values
Constructor Detail

PageEventTrigger

public PageEventTrigger()
Constructs an instanceof PageEventTrigger

Method Detail

setWebAppRegistry

public void setWebAppRegistry(WebAppRegistry pWebAppRegistry)
Set property WebAppRegistry

Parameters:
pWebAppRegistry - new value to set

getWebAppRegistry

public WebAppRegistry getWebAppRegistry()
Get property WebAppRegistry

Returns:
WebAppRegistry

setDistributor

public void setDistributor(atg.service.event.EventDistributor pValue)
The EventDistributor to send fired events to.


getDistributor

public atg.service.event.EventDistributor getDistributor()
The EventDistributor to send fired events to.


setClickThroughSourceParameter

public void setClickThroughSourceParameter(java.lang.String pClickThroughSourceParameter)
Sets the name of the source parameter that will be used to generate ClickThroughMessages

Parameters:
pClickThroughsourceParameter - the name of the request parameter that will be examined in order to generate ClickThroughMessages

getClickThroughSourceParameter

public java.lang.String getClickThroughSourceParameter()
Returns:
the name of the source request parameter that is used in ClickThroughMessages

setClickThroughReferrerParameter

public void setClickThroughReferrerParameter(java.lang.String pClickThroughReferrerParameter)
Sets the name of the request parameter that is used to identify the source path of the referring page. This is an optional parameter and if it is not present, the "Referer" HTTP header will be used to determine the referring page's path

Parameters:
pClickThroughReferrerParameter - the name of the request parameter that is used to identify the path of the referring page

getClickThroughReferrerParameter

public java.lang.String getClickThroughReferrerParameter()
Returns:
the name of the request parameter that is used to identify the path of the referring page

setClickThroughProfileIdParameter

public void setClickThroughProfileIdParameter(java.lang.String pClickThroughProfileIdParameter)

getClickThroughProfileIdParameter

public java.lang.String getClickThroughProfileIdParameter()

setProfilePath

public void setProfilePath(java.lang.String pProfilePath)
Sets property ProfilePath


getProfilePath

public java.lang.String getProfilePath()
Returns property ProfilePath


getNumPageViewedEvents

public long getNumPageViewedEvents()
Returns property NumPageViewedEvents


getNumClickThroughEvents

public long getNumClickThroughEvents()
Returns:
the number of ClickThroughMessages that have been sent

setRemoveURIArguments

public void setRemoveURIArguments(boolean pRemoveURIArguments)
Sets property RemoveURIArguments


isRemoveURIArguments

public boolean isRemoveURIArguments()
Returns property RemoveURIArguments


setUsePathInfo

public void setUsePathInfo(boolean pUsePathInfo)
Sets the property UsePathInfo.

Parameters:
pUsePathInfo - new value to set

getUsePathInfo

public boolean getUsePathInfo()
Returns:
The value of the property UsePathInfo.

setMessageSource

public void setMessageSource(atg.userprofiling.dms.DPSMessageSource pMessageSource)
Sets property messageSource


getMessageSource

public atg.userprofiling.dms.DPSMessageSource getMessageSource()
Returns property messageSource


setNoPageEventMimeTypes

public void setNoPageEventMimeTypes(java.lang.String[] pNoPageEventMimeTypes)
Sets property noPageEventMimeTypes


getNoPageEventMimeTypes

public java.lang.String[] getNoPageEventMimeTypes()
Returns property noPageEventMimeTypes


setSourceNameDelimiter

public void setSourceNameDelimiter(java.lang.String pSourceNameDelimiter)

getSourceNameDelimiter

public java.lang.String getSourceNameDelimiter()

setRemoveClickThroughURIArguments

public void setRemoveClickThroughURIArguments(boolean pRemoveClickThroughURIArguments)

isRemoveClickThroughURIArguments

public boolean isRemoveClickThroughURIArguments()

setNoIncludedPages

public void setNoIncludedPages(boolean pNoIncludedPages)

isNoIncludedPages

public boolean isNoIncludedPages()

setNoRedirectedPages

public void setNoRedirectedPages(boolean pNoRedirectedPages)

isNoRedirectedPages

public boolean isNoRedirectedPages()

sendClickThroughEvent

public void sendClickThroughEvent(DynamoHttpServletRequest pRequest)
Sends a click through event using the parameters defined in pRequest. A Message will not get sent unless pRequest contains the parameter defined by getClickThroughSourceParameter

Parameters:
pRequest - the current request object

sendClickThroughEvent

public void sendClickThroughEvent(DynamoHttpServletRequest pRequest,
                                  java.lang.String[] pSourceNames)
This sends a ClickThroughMessage using the current request and the value of the source parameter. The remaining properties used to generate a ClickThroughMessage will be retrieved from the pRequest Object

Parameters:
pRequest - the current request
pSourceNames - an array of logical source names

sendClickThroughEvent

public void sendClickThroughEvent(DynamoHttpServletRequest pRequest,
                                  java.lang.String pSourcePath,
                                  java.lang.String pDestinationPath,
                                  java.lang.String[] pSourceNames)
Sends a ClickThroughMessage using the method arguments. The remaining properties required to create a ClickThroughMessage are retrieved from the pRequest Object

Parameters:
pRequest - the current request
pSourcePath - the path info of the referring page
pDestinationPath - the path info of the current request
pSourceNames - an array of logical source names

sendClickThroughEvent

public void sendClickThroughEvent(DynamoHttpServletRequest pRequest,
                                  java.lang.String pSourcePath,
                                  java.lang.String pDestinationPath,
                                  java.lang.String pSourceScenarioPathInfo,
                                  java.lang.String pDestinationScenarioPathInfo,
                                  java.lang.String[] pSourceNames)
Sends a ClickThroughMessage using the method arguments. The remaining properties required to create a ClickThroughMessage are retrieved from the pRequest Object

Parameters:
pRequest - the current request
pSourcePath - the path info of the referring page
pDestinationPath - the path info of the current request
pSourceScenarioPathInfo - the application name and relative path of the source URL
pDestinationScenarioPathInfo - the application name and relative path of the destination URL
pSourceNames - an array of logical source names

sendClickThroughEvent

public void sendClickThroughEvent(java.lang.String pSourcePath,
                                  java.lang.String pDestinationPath,
                                  java.lang.String[] pSourceNames,
                                  java.lang.String pProfileId)
Sends a ClickThroughMessage

Parameters:
pSourcePath - the path info of the referring page. At this point it could be a fully qualified URI with protocol, domain name and URI arguments, but this will be dealt with later
pDestinationPath - the path info of the current request. This is expected to be the strict pathInfo
pSourceNames - an array of logical source names
pProfile - the Profile RepositoryItem associated with this clicked link

sendClickThroughEvent

public void sendClickThroughEvent(java.lang.String pSourcePath,
                                  java.lang.String pDestinationPath,
                                  java.lang.String pSourceScenarioPathInfo,
                                  java.lang.String pDestinationScenarioPathInfo,
                                  java.lang.String[] pSourceNames,
                                  java.lang.String pProfileId)
Sends a ClickThroughMessage

Parameters:
pSourcePath - the path info of the referring page. At this point it could be a fully qualified URI with protocol, domain name and URI arguments, but this will be dealt with later
pDestinationPath - the path info of the current request. This is expected to be the strict pathInfo
pSourceScenarioPathInfo - the application name and relative path of the source URL
pDestinationScenarioPathInfo - the application name and relative path of the destination URL
pSourceNames - an array of logical source names
pProfile - the Profile RepositoryItem associated with this clicked link

sendClickThroughEvent

public void sendClickThroughEvent(java.lang.String pSourcePath,
                                  java.lang.String pDestinationPath,
                                  java.lang.String pSourceScenarioPathInfo,
                                  java.lang.String pDestinationScenarioPathInfo,
                                  java.lang.String[] pSourceNames,
                                  RepositoryItem pProfile,
                                  java.lang.String pSessionId,
                                  java.lang.String pParentSessionId)
Sends a ClickThroughMessage

Parameters:
pSourcePath - the path info of the referring page. At this point it could be a fully qualified URI with protocol, domain name and URI arguments, but this will be dealt with later
pDestinationPath - the path info of the current request. This is expected to be the strict pathInfo
pSourceScenarioPathInfo - the application name and relative path of the source URL
pDestinationScenarioPathInfo - the application name and relative path of the destination URL
pSourceNames - an array of logical source names
pProfile - the Profile RepositoryItem associated with this clicked link
pSessionId - session id
pParentSessionId - parent session id

sendClickThroughEvent

public void sendClickThroughEvent(java.lang.String pSourcePath,
                                  java.lang.String pDestinationPath,
                                  java.lang.String pSourceScenarioPathInfo,
                                  java.lang.String pDestinationScenarioPathInfo,
                                  java.lang.String[] pSourceNames,
                                  java.lang.String pProfileId,
                                  java.lang.String pSessionId,
                                  java.lang.String pParentSessionId)
Sends a ClickThroughMessage

Parameters:
pSourcePath - the path info of the referring page. At this point it could be a fully qualified URI with protocol, domain name and URI arguments, but this will be dealt with later
pDestinationPath - the path info of the current request. This is expected to be the strict pathInfo
pSourceScenarioPathInfo - the application name and relative path of the source URL
pDestinationScenarioPathInfo - the application name and relative path of the destination URL
pSourceNames - an array of logical source names
pProfile - the Profile RepositoryItem associated with this clicked link
pSessionId - session id
pParentSessionId - parent session id

sendPageViewedEvent

public void sendPageViewedEvent(DynamoHttpServletRequest pRequest)
Send a page viewed event. The name of the page, session and profile is extracted out of the request


getRequestPageName

public java.lang.String getRequestPageName(DynamoHttpServletRequest pRequest,
                                           boolean pRemoveQueryArgs)

sendPageViewedEvent

public void sendPageViewedEvent(java.lang.String pPageName)
Send a page viewed event with out attached request, session, or profile properties


sendPageViewedEvent

public void sendPageViewedEvent(java.lang.String pPageName,
                                java.lang.String pScenarioPathInfo,
                                DynamoHttpServletRequest pRequest)
Send a page viewed event. The session and profile is extracted out of the request object if they are available.


sendPageViewedEvent

public void sendPageViewedEvent(java.lang.String pPageName,
                                java.lang.String pScenarioPathInfo,
                                DynamoHttpServletRequest pRequest,
                                javax.servlet.http.HttpSession pSession,
                                RepositoryItem pProfile)
Send a page viewed event with the given information.