android-components / mozilla.components.feature.sitepermissions / SitePermissionsStorage


class SitePermissionsStorage (source)

A storage implementation to save SitePermissions.


Name Summary
Permission enum class Permission


Name Summary
<init> SitePermissionsStorage(context: <ERROR CLASS>, dataCleanable: DataCleanable? = null)
A storage implementation to save SitePermissions.


Name Summary
findAllSitePermissionsGroupedByPermission fun findAllSitePermissionsGroupedByPermission(): Map<Permission, List<SitePermissions>>
Finds all SitePermissions grouped by Permission.
findSitePermissionsBy fun findSitePermissionsBy(origin: String): SitePermissions?
Finds all SitePermissions that match the origin.
getSitePermissionsPaged fun getSitePermissionsPaged(): Factory<Int, SitePermissions>
Returns all saved SitePermissions instances as a DataSource.Factory.
remove fun remove(sitePermissions: SitePermissions): Unit
Deletes all sitePermissions that match the sitePermissions provided as a parameter.
removeAll fun removeAll(): Unit
Deletes all sitePermissions sitePermissions.
save fun save(sitePermissions: SitePermissions): Unit
Persists the sitePermissions provided as a parameter.
update fun update(sitePermissions: SitePermissions): Unit
Replaces an existing SitePermissions with the values of sitePermissions provided as a parameter.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.