GetSchemaResponse
class GetSchemaResponse
The response class of getSchemaAsync
Summary
Nested types |
|---|
|
Builder for |
Public functions |
|
|---|---|
(Mutable)Map<String!, PackageIdentifier!> |
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)Returns a mapping of publicly visible schemas to the |
(Mutable)Map<String!, (Mutable)Set<(Mutable)Set<Int!>!>!> |
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)Returns a mapping of schema types to the set of |
(Mutable)Set<String!> |
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)Returns all the schema types that are opted out of being displayed and visible on any system UI surface. |
(Mutable)Map<String!, (Mutable)Set<SchemaVisibilityConfig!>!> |
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)Returns a mapping of schema types to the set of |
(Mutable)Map<String!, (Mutable)Set<PackageIdentifier!>!> |
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)Returns a mapping of schema types to the set of packages that have access to that schema type. |
(Mutable)Set<AppSearchSchema!> |
Return the schemas most recently successfully provided to |
@IntRange(from = 0) Int |
Returns the overall database schema version. |
Public functions
getPubliclyVisibleSchemas
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
fun getPubliclyVisibleSchemas(): (Mutable)Map<String!, PackageIdentifier!>
Returns a mapping of publicly visible schemas to the PackageIdentifier specifying the package the schemas are from.
If no schemas have been set as publicly visible, an empty set will be returned.
| Throws | |
|---|---|
java.lang.UnsupportedOperationException |
if |
getRequiredPermissionsForSchemaTypeVisibility
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
fun getRequiredPermissionsForSchemaTypeVisibility(): (Mutable)Map<String!, (Mutable)Set<(Mutable)Set<Int!>!>!>
Returns a mapping of schema types to the set of android.Manifest.permission combination sets that querier must hold to access that schema type.
The querier could read the GenericDocument objects under the schemaType if they holds ALL required permissions of ANY of the individual value sets.
For example, if the Map contains {{permissionA, PermissionB},
{ PermissionC, PermissionD}, {PermissionE}}.
- A querier holding both PermissionA and PermissionB has access.
- A querier holding both PermissionC and PermissionD has access.
- A querier holding only PermissionE has access.
- A querier holding both PermissionA and PermissionE has access.
- A querier holding only PermissionA doesn't have access.
- A querier holding only PermissionA and PermissionC doesn't have access.
| Returns | |
|---|---|
(Mutable)Map<String!, (Mutable)Set<(Mutable)Set<Int!>!>!> |
The map contains schema type and all combinations of required permission for querier to access it. The supported Permission are |
| Throws | |
|---|---|
java.lang.UnsupportedOperationException |
if |
getSchemaTypesNotDisplayedBySystem
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
fun getSchemaTypesNotDisplayedBySystem(): (Mutable)Set<String!>
Returns all the schema types that are opted out of being displayed and visible on any system UI surface.
| Throws | |
|---|---|
java.lang.UnsupportedOperationException |
if |
getSchemaTypesVisibleToConfigs
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
fun getSchemaTypesVisibleToConfigs(): (Mutable)Map<String!, (Mutable)Set<SchemaVisibilityConfig!>!>
Returns a mapping of schema types to the set of SchemaVisibilityConfig that have access to that schema type.
| See also | |
|---|---|
addSchemaTypeVisibleToConfig |
getSchemaTypesVisibleToPackages
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
fun getSchemaTypesVisibleToPackages(): (Mutable)Map<String!, (Mutable)Set<PackageIdentifier!>!>
Returns a mapping of schema types to the set of packages that have access to that schema type.
| Throws | |
|---|---|
java.lang.UnsupportedOperationException |
if |
getSchemas
fun getSchemas(): (Mutable)Set<AppSearchSchema!>
Return the schemas most recently successfully provided to setSchemaAsync.
getVersion
fun getVersion(): @IntRange(from = 0) Int
Returns the overall database schema version.
If the database is empty, 0 will be returned.