GetSchemaResponse
public final class GetSchemaResponse
The response class of getSchemaAsync
Summary
Nested types |
|---|
public final class GetSchemaResponse.BuilderBuilder for |
Public methods |
|
|---|---|
@NonNull 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 |
@NonNull Map<String, Set<Set<Integer>>> |
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)Returns a mapping of schema types to the set of |
@NonNull 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. |
@NonNull Map<String, 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 |
@NonNull Map<String, 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. |
@NonNull Set<AppSearchSchema> |
Return the schemas most recently successfully provided to |
@NonNull Map<String, Set<PropertyPath>> |
Returns a map containing all schema types that have been configured for account wipeout, mapped to the specific property paths within those schemas that hold the account identifiers. |
@IntRange(from = 0) int |
Returns the overall database schema version. |
Public methods
getPubliclyVisibleSchemas
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.ADD_PERMISSIONS_AND_GET_VISIBILITY)
public @NonNull Map<String, PackageIdentifier> getPubliclyVisibleSchemas()
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)
public @NonNull Map<String, Set<Set<Integer>>> getRequiredPermissionsForSchemaTypeVisibility()
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 { % verbatim %}{ {permissionA, PermissionB},
{ PermissionC, PermissionD}, {PermissionE}}{ % endverbatim %}.
- 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 | |
|---|---|
@NonNull Map<String, Set<Set<Integer>>> |
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)
public @NonNull Set<String> getSchemaTypesNotDisplayedBySystem()
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)
public @NonNull Map<String, Set<SchemaVisibilityConfig>> getSchemaTypesVisibleToConfigs()
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)
public @NonNull Map<String, Set<PackageIdentifier>> getSchemaTypesVisibleToPackages()
Returns a mapping of schema types to the set of packages that have access to that schema type.
| Throws | |
|---|---|
java.lang.UnsupportedOperationException |
if |
getSchemas
public @NonNull Set<AppSearchSchema> getSchemas()
Return the schemas most recently successfully provided to setSchemaAsync.
getSchemasWipeoutAccountPropertyPaths
@ExperimentalAppSearchApi
public @NonNull Map<String, Set<PropertyPath>> getSchemasWipeoutAccountPropertyPaths()
Returns a map containing all schema types that have been configured for account wipeout, mapped to the specific property paths within those schemas that hold the account identifiers.
This method performs a deep copy to ensure the returned map and its contained sets are immutable from external modifications.
| Returns | |
|---|---|
@NonNull Map<String, Set<PropertyPath>> |
A map where keys are schema type names, and values are sets of |
getVersion
public @IntRange(from = 0) int getVersion()
Returns the overall database schema version.
If the database is empty, 0 will be returned.