AepUI

The AepUI interface represents a UI component that can be rendered using the Adobe Experience Platform compose UI library. The Experience Platform compose UI library currently supports rendering the following UI template:

Interface Definition

data-slots=heading, code
data-repeat=1
data-languages=Kotlin

Kotlin

sealed interface AepUI<T : AepUITemplate, S : AepCardUIState> {
    fun getTemplate(): T
    fun getState(): S
    fun updateState(newState: S)
}

Methods

getTemplate

Retrieves the template associated with this UI component.

Returns

A template of type T which is an implementation of the AepUITemplate interface.

Syntax

data-slots=heading, code
data-repeat=1
data-languages=Kotlin

Kotlin

fun getTemplate(): T

getState

Retrieves the current state of the UI component.

Returns

A state of type S which is a subclass of the AepCardUIState class.

Syntax

data-slots=heading, code
data-repeat=1
data-languages=Kotlin

Kotlin

fun getState(): S

updateState

Updates the state of the UI component with a new state.

Parameters

Syntax

data-slots=heading, code
data-repeat=1
data-languages=Kotlin

Kotlin

fun updateState(newState: S)

Implementing Classes

ImageOnlyUI

Implementation of the AepUI interface used in rendering a UI for a ImageOnlyTemplate.

Class Definition

data-slots=heading, code
data-repeat=1
data-languages=Kotlin

Kotlin

class ImageOnlyUI(
    private val template: ImageOnlyTemplate,
    state: ImageOnlyCardUIState
) : AepUI<ImageOnlyTemplate, ImageOnlyCardUIState>

LargeImageUI

Implementation of the AepUI interface used in rendering a UI for a LargeImageTemplate.

Class Definition

data-slots=heading, code
data-repeat=1
data-languages=Kotlin

Kotlin

class LargeImageUI(
    private val template: LargeImageTemplate,
    state: LargeImageCardUIState
) : AepUI<LargeImageTemplate, LargeImageCardUIState>

SmallImageUI

Implementation of the AepUI interface used in rendering a UI for a SmallImageTemplate.

Class Definition

data-slots=heading, code
data-repeat=1
data-languages=Kotlin

Kotlin

class SmallImageUI(
    private val template: SmallImageTemplate,
    state: SmallImageCardUIState
) : AepUI<SmallImageTemplate, SmallImageCardUIState>