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
Modifier and TypeFieldDescriptionprotected String
The provider idprotected I18nizableText
The provider labelprotected String
The plugin namestatic final String
Token to replace in the url by a random id value -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_encodeValue
(String value) Encode a value to use as an identifier component.void
configure
(Configuration configuration) getId()
Get the id of the providergetLabel()
Get the label of the providervoid
setPluginInfo
(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, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:PluginAware
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.- Specified by:
setPluginInfo
in 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:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getId
Description copied from interface:WebAnalyticsProvider
Get the id of the provider- Specified by:
getId
in interfaceWebAnalyticsProvider
- Returns:
- the id
-
getLabel
Description copied from interface:WebAnalyticsProvider
Get the label of the provider- Specified by:
getLabel
in 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.
-