public abstract class BaseChannel extends java.lang.Object implements Channel
| Constructor and Description |
|---|
BaseChannel() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Does processing when the channel is installed.
|
void |
deActivate()
Does processing when the channel is uninstalled.
|
void |
deleteData(ChannelInstance channelInstance)
Removes any additional data added by this channel when the channel
instance is removed.
|
void |
exportData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
com.liferay.portal.kernel.xml.Element tacticElement,
Tactic tactic,
com.liferay.portal.kernel.xml.Element channelInstanceElement,
ChannelInstance channelInstance)
Exports any additional data added by this channel when the channel
instance is exported.
|
java.lang.String |
getChannelKey()
Returns the key that identifies the channel.
|
java.lang.String |
getDescription(java.util.Locale locale)
Returns the channel's localized description.
|
protected java.lang.String |
getExportImportErrorMessage(Tactic tactic,
ChannelInstance channelInstance,
java.lang.String missingReferenceClassName,
java.lang.String missingReferenceId,
java.lang.String action) |
java.lang.String |
getIcon()
Returns the Font Awesome CSS class for the channel icon.
|
java.lang.String |
getName(java.util.Locale locale)
Returns the channel's localized name.
|
java.lang.String |
getShortDescription(java.util.Locale locale)
Returns the channel's localized short description.
|
void |
importData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
Tactic tactic,
ChannelInstance channelInstance)
Imports any additional data added by this channel when the channel
instance is imported.
|
boolean |
isInstantiable()
Returns
true if the channel can be used more than once with
different values for a campaign. |
boolean |
isVisible()
Returns
true if the channel is visible. |
java.lang.String |
processChannel(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 channel form fields in the context
of the request and response.
|
void |
updateChannel(java.lang.String typeSettings,
long channelInstanceId)
Associates the current channel with the channel instance matching the ID.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormHTML, getSummarypublic void activate()
Channelpublic void deActivate()
ChanneldeActivate in interface Channelpublic void deleteData(ChannelInstance channelInstance) throws com.liferay.portal.kernel.exception.PortalException
ChanneldeleteData in interface ChannelchannelInstance - the channel 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 tacticElement,
Tactic tactic,
com.liferay.portal.kernel.xml.Element channelInstanceElement,
ChannelInstance channelInstance)
throws java.lang.Exception
ChannelexportData in interface ChannelportletDataContext - the context of the data exporttacticElement - the element with the tactic export datatactic - the tactic containing the channel instancechannelInstanceElement - the element with the channel instance
export datachannelInstance - the channel instance with stored configurationjava.lang.Exception - if an exception occurredpublic java.lang.String getChannelKey()
ChannelgetChannelKey in interface Channelpublic java.lang.String getDescription(java.util.Locale locale)
ChannelgetDescription in interface Channellocale - the language localepublic java.lang.String getIcon()
ChannelgetIcon in interface Channelpublic java.lang.String getName(java.util.Locale locale)
Channelpublic java.lang.String getShortDescription(java.util.Locale locale)
ChannelgetShortDescription in interface Channellocale - the language localepublic void importData(com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext,
Tactic tactic,
ChannelInstance channelInstance)
throws java.lang.Exception
ChannelimportData in interface ChannelportletDataContext - the context of the data importtactic - the tactic containing the channel instancechannelInstance - the channel instance with stored configurationjava.lang.Exception - if an exception occurredpublic boolean isInstantiable()
Channeltrue if the channel can be used more than once with
different values for a campaign.isInstantiable in interface Channeltrue if the channel can be used more than once;
false otherwisepublic boolean isVisible()
Channeltrue if the channel is visible.public java.lang.String processChannel(javax.portlet.PortletRequest portletRequest,
javax.portlet.PortletResponse portletResponse,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.String> values)
throws InvalidChannelException
ChannelprocessChannel in interface ChannelportletRequest - the request from which to get the request
parametersportletResponse - the response to receive the render parametersid - the identifier that differentiates between channel instances
of the same type of an instantiable channelvalues - the values configured by users for the current channel
instance based on the form controls from the HTMLInvalidChannelException - if an invalid channel exception occurredpublic void updateChannel(java.lang.String typeSettings,
long channelInstanceId)
ChannelupdateChannel in interface ChanneltypeSettings - the processed settings for the channelchannelInstanceId - the ID of the channel instance to associateprotected java.lang.String getExportImportErrorMessage(Tactic tactic, ChannelInstance channelInstance, java.lang.String missingReferenceClassName, java.lang.String missingReferenceId, java.lang.String action)