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, waitgetEventTypes, getFormHTML, getSummarypublic void activate()
TrackingActionactivate in interface TrackingActionpublic void deActivate()
TrackingActiondeActivate in interface TrackingActionpublic void deleteData(TrackingActionInstance trackingActionInstance) throws com.liferay.portal.kernel.exception.PortalException
TrackingActiondeleteData in interface TrackingActiontrackingActionInstance - 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
TrackingActionexportData in interface TrackingActionportletDataContext - 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)
TrackingActiongetDescription in interface TrackingActionlocale - the language localepublic java.lang.String getIcon()
TrackingActiongetIcon in interface TrackingActionpublic java.lang.String getName(java.util.Locale locale)
TrackingActiongetName in interface TrackingActionlocale - the language localepublic java.lang.String getShortDescription(java.util.Locale locale)
TrackingActiongetShortDescription in interface TrackingActionlocale - the language localepublic java.lang.String getTrackingActionKey()
TrackingActiongetTrackingActionKey in interface TrackingActionpublic void importData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
Campaign campaign,
TrackingActionInstance trackingActionInstance)
throws java.lang.Exception
TrackingActionimportData in interface TrackingActionportletDataContext - 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()
TrackingActiontrue if the tracking action can be used more than
once with different values for a campaign.isInstantiable in interface TrackingActiontrue if the tracking action can be used more than
once; false otherwisepublic boolean isVisible()
TrackingActiontrue if the tracking action is visible.isVisible in interface TrackingActiontrue if the tracking action is visible;
false otherwisepublic boolean isVisible(java.lang.String className,
long classPK)
TrackingActiontrue if the tracking action is visible.isVisible in interface TrackingActionclassName - 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
TrackingActionprocessTrackingAction in interface TrackingActionportletRequest - 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)