public interface TrackingAction
Modifier and Type | Method and Description |
---|---|
void |
activate()
Does processing when the tracking action is installed.
|
void |
deActivate()
Does processing when the tracking action is uninstalled.
|
void |
deleteData(TrackingActionInstance trackingActionInstance)
Removes any additional data added by this tracking action when the
tracking action instance is removed.
|
void |
exportData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
com.liferay.portal.kernel.xml.Element campaignElement,
Campaign campaign,
com.liferay.portal.kernel.xml.Element trackingActionInstanceElement,
TrackingActionInstance trackingActionInstance)
Exports any additional data added by this tracking action when the
tracking action instance is exported.
|
java.lang.String |
getDescription(java.util.Locale locale)
Returns the tracking action's localized description.
|
java.util.List<java.lang.String> |
getEventTypes()
Returns the list with the event types that can be monitored by this
tracking action.
|
java.lang.String |
getFormHTML(TrackingActionInstance trackingActionInstance,
java.util.Map<java.lang.String,java.lang.Object> context,
java.util.Map<java.lang.String,java.lang.String> values)
Returns the HTML code containing the form fields required to edit the
tracking action instance configuration, based on the context.
|
java.lang.String |
getIcon()
Returns the Font Awesome CSS class for the tracking action icon.
|
java.lang.String |
getName(java.util.Locale locale)
Returns the tracking action's localized name.
|
java.lang.String |
getShortDescription(java.util.Locale locale)
Returns the tracking action's localized short description.
|
java.lang.String |
getSummary(TrackingActionInstance trackingActionInstance,
java.util.Locale locale)
Returns the tracking action instance's localized summary.
|
java.lang.String |
getTrackingActionKey()
Returns the key that identifies the tracking action.
|
void |
importData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
Campaign campaign,
TrackingActionInstance trackingActionInstance)
Imports any additional data added by this tracking action when the
tracking action instance is imported.
|
boolean |
isInstantiable()
Returns
true if the tracking action can be used more than
once with different values for a campaign. |
boolean |
isVisible()
Returns
true if the tracking action is visible. |
boolean |
isVisible(java.lang.String className,
long classPK)
Returns
true if the tracking action is visible. |
java.lang.String |
processTrackingAction(javax.portlet.PortletRequest portletRequest,
javax.portlet.PortletResponse portletResponse,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.String> values)
Returns the result of evaluating the tracking action form fields in the
context of the request and response.
|
void activate()
void deActivate()
void deleteData(TrackingActionInstance trackingActionInstance) throws com.liferay.portal.kernel.exception.PortalException
trackingActionInstance
- the tracking action instance with the
stored configurationcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredvoid exportData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, com.liferay.portal.kernel.xml.Element campaignElement, Campaign campaign, com.liferay.portal.kernel.xml.Element trackingActionInstanceElement, TrackingActionInstance trackingActionInstance) throws java.lang.Exception
portletDataContext
- the context of the data exportcampaignElement
- the element with the campaign export datacampaign
- the campaign containing the tracking action instancetrackingActionInstanceElement
- the element with the tracking
action instance export datatrackingActionInstance
- the tracking action instance with stored
configurationjava.lang.Exception
- if an exception occurredjava.lang.String getDescription(java.util.Locale locale)
locale
- the language localejava.util.List<java.lang.String> getEventTypes()
java.lang.String getFormHTML(TrackingActionInstance trackingActionInstance, java.util.Map<java.lang.String,java.lang.Object> context, java.util.Map<java.lang.String,java.lang.String> values)
trackingActionInstance
- the tracking action instance with stored
configurationcontext
- the map defining the form evaluation contextvalues
- the values configured by users for the current tracking
action instance based on the form controls from the HTML. This
will be used when there is an error and the form is reloaded.java.lang.String getIcon()
java.lang.String getName(java.util.Locale locale)
locale
- the language localejava.lang.String getShortDescription(java.util.Locale locale)
locale
- the language localejava.lang.String getSummary(TrackingActionInstance trackingActionInstance, java.util.Locale locale)
trackingActionInstance
- the tracking action instance with stored
configurationlocale
- the language localejava.lang.String getTrackingActionKey()
void importData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, Campaign campaign, TrackingActionInstance trackingActionInstance) throws java.lang.Exception
portletDataContext
- the context of the data importcampaign
- the campaign containing the tracing action instancetrackingActionInstance
- the tracking action instance with stored
configurationjava.lang.Exception
- if an exception occurredboolean isInstantiable()
true
if the tracking action can be used more than
once with different values for a campaign.true
if the tracking action can be used more than
once; false
otherwiseboolean isVisible()
true
if the tracking action is visible.true
if the tracking action is visible;
false
otherwiseboolean isVisible(java.lang.String className, long classPK)
true
if the tracking action is visible.className
- the class name of the entity to check if the tracking
action is visible within this entityclassPK
- the ID of the entity to check if the tracking action is
visible within this entitytrue
if the tracking action is visible within
specific entity; false
otherwisejava.lang.String processTrackingAction(javax.portlet.PortletRequest portletRequest, javax.portlet.PortletResponse portletResponse, java.lang.String id, java.util.Map<java.lang.String,java.lang.String> values) throws InvalidTrackingActionException
portletRequest
- the request from which to get the request
parametersportletResponse
- the response to receive the render parametersid
- the identifier that differentiates between tracking action
instances of the same type of an instantiable tracing actionvalues
- the values configured by users for the current tracking
action instance based on the form controls from the HTMLInvalidTrackingActionException
- if an invalid tracking action
exception occurred