Package org.ametys.web.analytics
Class AbstractWebAnalyticsProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.analytics.AbstractWebAnalyticsProvider
- All Implemented Interfaces:
LogEnabled,PluginAware,WebAnalyticsProvider,Configurable
- Direct Known Subclasses:
GoogleAnalyticsProvider,MatomoAnalyticsProvider
public abstract class AbstractWebAnalyticsProvider
extends AbstractLogEnabled
implements WebAnalyticsProvider, Configurable, PluginAware
Abstract web analytics provider for static configuration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe provider idprotected I18nizableTextThe provider labelprotected StringThe plugin namestatic final StringToken to replace in the url by a random id value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String_encodeValue(String value) Encode a value to use as an identifier component.voidconfigure(Configuration configuration) getId()Get the id of the providergetLabel()Get the label of the providervoidsetPluginInfo(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.web.analytics.WebAnalyticsProvider
getEventImageUri, getEventLinkCampaignParams
-
Field Details
-
RANDOM_NUMBER_TOKEN
Token to replace in the url by a random id value- See Also:
-
_id
The provider id -
_label
The provider label -
_pluginName
The plugin name
-
-
Constructor Details
-
AbstractWebAnalyticsProvider
public AbstractWebAnalyticsProvider()
-
-
Method Details
-
setPluginInfo
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
configure
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
getId
Description copied from interface:WebAnalyticsProviderGet the id of the provider- Specified by:
getIdin interfaceWebAnalyticsProvider- Returns:
- the id
-
getLabel
Description copied from interface:WebAnalyticsProviderGet the label of the provider- Specified by:
getLabelin interfaceWebAnalyticsProvider- Returns:
- the label
-
_encodeValue
Encode a value to use as an identifier component.- Parameters:
value- the value to encode.- Returns:
- the encoded value.
- Throws:
URISyntaxException- if an error occurs encoding the value.
-