//inappmessaging/com.rakuten.tech.mobile.inappmessaging.runtime.data.models.appevents/BaseEvent

BaseEvent

[androidJvm]
abstract class BaseEvent(@NotNulleventType: EventType, @NotNulleventName: String, @NotNullisPersistent: Boolean) : Event

BaseEvent will be the base class of all local events objects, including CustomEvent. During initialization, constructor parameters will be checked for validity if there are reasons to believe that parameter could be invalid.

Constructor will automatically store eventType, eventName, and timestamp at the moment of object creation.

Event name can't be empty or null, else IllegalArgumentException will be thrown. Also, logEvent name will be stored in upper case form.

Constructors

BaseEvent [androidJvm]
fun BaseEvent(@NotNulleventType: EventType, @NotNulleventName: String, @NotNullisPersistent: Boolean)

Types

Name Summary
Companion [androidJvm]
object Companion

Functions

Name Summary
getAttributeMap [androidJvm]
@NotNull
open override fun getAttributeMap(): Map<String, Attribute?>
This method is intended to be used by child classes which doesn’t override this method. Returns an empty map.
getEventName [androidJvm]
open override fun getEventName(): String
This method returns the event name.
getEventType [androidJvm]
@NotNull
open override fun getEventType(): Int
This method returns the event type id.
getRatEventMap [androidJvm]
@NotNull
open override fun getRatEventMap(): Map<String, Any>
A map will be created containing event’s base attributes like event name, and timestamp.
getTimestamp [androidJvm]
@NotNull
open override fun getTimestamp(): Long
This method returns the timestamp.
isPersistentType [androidJvm]
@NotNull
open override fun isPersistentType(): Boolean
This method returns event is persistent type (can be used by campaigns multiple times). If persistent type, event will not be removed in LocalEventRepository when used by a campaign.
setShouldNotClear [androidJvm]
open override fun setShouldNotClear(shouldNotClear: Boolean)
Set to true if the event was logged when user information was updated, or before/during ping request..
shouldNotClear [androidJvm]
open override fun shouldNotClear(): Boolean
This method returns true if the event was logged when user info was updated, or before/during ping request.

Inheritors

Name
AppStartEvent
CustomEvent
LoginSuccessfulEvent
PurchaseSuccessfulEvent