ViewDataController

ViewDataController is responsible for managing the data related to views. It extends DataController and uses a specific strategy to handle data operations.

This controller maintains both the list of AppData objects and the list of ViewData, which represent the underlying data for the views. It provides methods to add, remove, and update these list. Additionally, it supports ordering of the ViewData items.

This also provides method to listen to changes of the ViewData list.

Parameters

strategy

The concrete Strategy used by this controller for the creation and management of different UI ViewData objects.

See also

Constructors

Link copied to clipboard
constructor(strategy: Strategy)

Properties

Link copied to clipboard

The immutable copy of list of AppData objects backed by _appDataList

Link copied to clipboard

The order of the ViewData list. When set, the list will be re-submitted with the new order.

Functions

Link copied to clipboard

Adds a list of AppData to the current list, filtering out duplicates.

Link copied to clipboard
fun getAppData(appInfo: AppInfo): AppData?

Retrieves the AppData associated with the given AppInfo.

Link copied to clipboard
fun getViewData(appInfo: AppInfo): ViewData?

Returns the ViewData associated with the given AppInfo.

Link copied to clipboard
fun removeAppData(element: AppData)

Removes a single AppData element from the current list.

Link copied to clipboard

Removes a list of AppData from the controller.

Link copied to clipboard
fun setAppDataList(mutableAppDataList: MutableList<AppData>)

Sets the list of app data.