public abstract class BaseTrackingAction extends java.lang.Object implements TrackingAction
Constructor and Description |
---|
BaseTrackingAction() |
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 trackingInstanceElement,
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.
|
protected java.lang.String |
getExportImportErrorMessage(Campaign campaign,
TrackingActionInstance trackingActionInstance,
java.lang.String missingReferenceClassName,
java.lang.String missingReferenceId,
java.lang.String action) |
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 |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventTypes, getFormHTML, getSummary
public void activate()
TrackingAction
activate
in interface TrackingAction
public void deActivate()
TrackingAction
deActivate
in interface TrackingAction
public void deleteData(TrackingActionInstance trackingActionInstance) throws com.liferay.portal.kernel.exception.PortalException
TrackingAction
deleteData
in interface TrackingAction
trackingActionInstance
- the tracking action instance with the
stored configurationcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic void exportData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, com.liferay.portal.kernel.xml.Element campaignElement, Campaign campaign, com.liferay.portal.kernel.xml.Element trackingInstanceElement, TrackingActionInstance trackingActionInstance) throws java.lang.Exception
TrackingAction
exportData
in interface TrackingAction
portletDataContext
- the context of the data exportcampaignElement
- the element with the campaign export datacampaign
- the campaign containing the tracking action instancetrackingInstanceElement
- the element with the tracking
action instance export datatrackingActionInstance
- the tracking action instance with stored
configurationjava.lang.Exception
- if an exception occurredpublic java.lang.String getDescription(java.util.Locale locale)
TrackingAction
getDescription
in interface TrackingAction
locale
- the language localepublic java.lang.String getIcon()
TrackingAction
getIcon
in interface TrackingAction
public java.lang.String getName(java.util.Locale locale)
TrackingAction
getName
in interface TrackingAction
locale
- the language localepublic java.lang.String getShortDescription(java.util.Locale locale)
TrackingAction
getShortDescription
in interface TrackingAction
locale
- the language localepublic java.lang.String getTrackingActionKey()
TrackingAction
getTrackingActionKey
in interface TrackingAction
public void importData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext, Campaign campaign, TrackingActionInstance trackingActionInstance) throws java.lang.Exception
TrackingAction
importData
in interface TrackingAction
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 occurredpublic boolean isInstantiable()
TrackingAction
true
if the tracking action can be used more than
once with different values for a campaign.isInstantiable
in interface TrackingAction
true
if the tracking action can be used more than
once; false
otherwisepublic boolean isVisible()
TrackingAction
true
if the tracking action is visible.isVisible
in interface TrackingAction
true
if the tracking action is visible;
false
otherwisepublic boolean isVisible(java.lang.String className, long classPK)
TrackingAction
true
if the tracking action is visible.isVisible
in interface TrackingAction
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
otherwisepublic 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) throws InvalidTrackingActionException
TrackingAction
processTrackingAction
in interface TrackingAction
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 occurredprotected java.lang.String getExportImportErrorMessage(Campaign campaign, TrackingActionInstance trackingActionInstance, java.lang.String missingReferenceClassName, java.lang.String missingReferenceId, java.lang.String action)