GetSchemaResponse

public final class GetSchemaResponse extends Object
implements Parcelable

The response class of AppSearchClient.getSchema(String)

Nested Class Summary

class GetSchemaResponse.Builder Builder for GetSchemaResponse objects. 

Inherited Constant Summary

Field Summary

public static final Creator<GetSchemaResponse> CREATOR

Public Method Summary

Map<StringPackageIdentifier>
getPubliclyVisibleSchemas()
Returns a mapping of publicly visible schemas to the PackageIdentifier specifying the package the schemas are from.
Map<StringSet<Set<Integer>>>
getRequiredPermissionsForSchemaTypeVisibility()
Returns a mapping of schema types to the set of Manifest.permission combination sets that querier must hold to access that schema type.
Set<String>
getSchemaTypesNotDisplayedBySystem()
Returns all the schema types that are opted out of being displayed and visible on any system UI surface.
Map<StringSet<SchemaVisibilityConfig>>
getSchemaTypesVisibleToConfigs()
Returns a mapping of schema types to the set of SchemaVisibilityConfig that have access to that schema type.
Map<StringSet<PackageIdentifier>>
getSchemaTypesVisibleToPackages()
Returns a mapping of schema types to the set of packages that have access to that schema type.
Set<AppSearchSchema>
getSchemas()
Return the schemas most recently successfully provided to AppSearchClient.setSchema(SetSchemaRequest, String).
int
getVersion()
Returns the overall database schema version.
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Fields

public static final Creator<GetSchemaResponse> CREATOR

Public Methods

public Map<StringPackageIdentifier> 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.

public Map<StringSet<Set<Integer>>> getRequiredPermissionsForSchemaTypeVisibility ()

Returns a mapping of schema types to the set of 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

public Set<String> getSchemaTypesNotDisplayedBySystem ()

Returns all the schema types that are opted out of being displayed and visible on any system UI surface.

public Map<StringSet<SchemaVisibilityConfig>> getSchemaTypesVisibleToConfigs ()

Returns a mapping of schema types to the set of SchemaVisibilityConfig that have access to that schema type.

public Map<StringSet<PackageIdentifier>> getSchemaTypesVisibleToPackages ()

Returns a mapping of schema types to the set of packages that have access to that schema type.

public Set<AppSearchSchema> getSchemas ()

Return the schemas most recently successfully provided to AppSearchClient.setSchema(SetSchemaRequest, String).

public int getVersion ()

Returns the overall database schema version.

If the database is empty, 0 will be returned.

public void writeToParcel (Parcel dest, int flags)