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:
SmallImageUI
which renders Small Image template
Interface Definition
Copied to your clipboardsealed interface AepUI<T : AepUITemplate, S : AepCardUIState> {fun getTemplate(): Tfun getState(): Sfun 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
Copied to your clipboardfun 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
Copied to your clipboardfun getState(): S
updateState
Updates the state of the UI component with a new state.
Parameters
- newState - The new state of type
S
to update within the UI component.
Syntax
Copied to your clipboardfun updateState(newState: S)
Implementing Classes
SmallImageUI
Implementation of the AepUI interface used in rendering a UI for a SmallImageTemplate.
Class Definition
Copied to your clipboardclass SmallImageUI(private val template: SmallImageTemplate,state: SmallImageCardUIState) : AepUI<SmallImageTemplate, SmallImageCardUIState>
Methods
getTemplate
Retrieves the template associated with the small image UI.
Returns
The small image template.
Syntax
Copied to your clipboardoverride fun getTemplate(): SmallImageTemplate
getState
Retrieves the current state of the small image UI.
Returns
The current SmallImageCardUIState
.
Syntax
Copied to your clipboardoverride fun getState(): SmallImageCardUIState
updateState
Updates the current state of the SmallImageUI
.
Parameters
- newState - The new state of type
SmallImageCardUIState
to update within the UI component.
Syntax
Copied to your clipboardoverride fun updateState(newState: SmallImageCardUIState)