AepUIContentProvider
Responsible for retrieving and refreshing data as required by the UI.
Classes implementing this interface will define a strategy to provide content for rendering the UI.
Interface Definition
data-slots=heading, code
data-repeat=1
data-languages=Kotlin
Kotlin
interface AepUIContentProvider {
@Deprecated("Use getUIContent instead", ReplaceWith("getUIContent"))
suspend fun getContent(): Flow<Result<List<AepUITemplate>>>
fun getUIContent(): Flow<Result<List<AepUITemplate>>>
suspend fun refreshContent()
}
Methods
getUIContent
Retrieves the content for the UI. Content is fetched lazily when the returned flow is collected.
Returns
The content for the UI as a Flow of Result containing a list of AepUITemplates.
Syntax
data-slots=heading, code
data-repeat=1
data-languages=Kotlin
Kotlin
fun getUIContent(): Flow<Result<List<AepUITemplate>>>
getContent (Deprecated)
data-variant=warning
data-slots=text
Deprecated — use getUIContent instead. This suspend overload eagerly fetches content before returning the flow and requires a coroutine call site to obtain the flow reference.
Syntax
data-slots=heading, code
data-repeat=1
data-languages=Kotlin
Kotlin
@Deprecated("Use getUIContent instead", ReplaceWith("getUIContent"))
suspend fun getContent(): Flow<Result<List<AepUITemplate>>>
refreshContent
Refreshes the content for the UI. Implementations should update the data into the flow returned by getUIContent.
Syntax
data-slots=heading, code
data-repeat=1
data-languages=Kotlin
Kotlin
suspend fun refreshContent()