Class DeveloperMetadataFinder

  • DeveloperMetadataFinder allows you to search for developer metadata within a spreadsheet by key, value, ID, location type, or visibility.

  • Use createDeveloperMetadataFinder() on a Range, Sheet, or Spreadsheet object to initiate a search.

  • find() executes the search and returns an array of matching DeveloperMetadata objects.

  • You can refine searches using methods like withId(), withKey(), withValue(), withLocationType(), and withVisibility().

  • onIntersectingLocations() configures the search to consider intersecting locations that have metadata, but is only applicable for range-scoped searches.

DeveloperMetadataFinder

Search for developer metadata in a spreadsheet. To create new developer metadata finder use Range.createDeveloperMetadataFinder() , Sheet.createDeveloperMetadataFinder() , or Spreadsheet.createDeveloperMetadataFinder() .

Methods

MethodReturn typeBrief description
find() DeveloperMetadata[] Executes this search and returns the matching metadata.
onIntersectingLocations() DeveloperMetadataFinder Configures the search to consider intersecting locations that have metadata.
withId(id) DeveloperMetadataFinder Limits this search to consider only metadata that match the specified ID.
withKey(key) DeveloperMetadataFinder Limits this search to consider only metadata that match the specified key.
withLocationType(locationType) DeveloperMetadataFinder Limits this search to consider only metadata that match the specified location type.
withValue(value) DeveloperMetadataFinder Limits this search to consider only metadata that match the specified value.
withVisibility(visibility) DeveloperMetadataFinder Limits this search to consider only metadata that match the specified visibility.

Detailed documentation

find()

Executes this search and returns the matching metadata.

Return

DeveloperMetadata[] — The developer metadata that match the search criteria.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

onIntersectingLocations()

Configures the search to consider intersecting locations that have metadata. This option is only valid for range-scoped searches.

Return

DeveloperMetadataFinder — The developer metadata finder, for chaining.


withId(id)

Limits this search to consider only metadata that match the specified ID.

Parameters

NameTypeDescription
idIntegerThe ID to match when searching for metadata.

Return

DeveloperMetadataFinder — The developer metadata finder, for chaining.


withKey(key)

Limits this search to consider only metadata that match the specified key.

Parameters

NameTypeDescription
keyStringThe key to match when searching for metadata.

Return

DeveloperMetadataFinder — The developer metadata finder, for chaining.


withLocationType(locationType)

Limits this search to consider only metadata that match the specified location type.

Parameters

NameTypeDescription
locationTypeDeveloperMetadataLocationType The location type to match when searching for metadata.

Return

DeveloperMetadataFinder — The developer metadata finder, for chaining.


withValue(value)

Limits this search to consider only metadata that match the specified value.

Parameters

NameTypeDescription
valueStringThe value to match when searching for metadata.

Return

DeveloperMetadataFinder — The developer metadata finder, for chaining.


withVisibility(visibility)

Limits this search to consider only metadata that match the specified visibility.

Parameters

NameTypeDescription
visibilityDeveloperMetadataVisibility The visibility to match when searching for metadata.

Return

DeveloperMetadataFinder — The developer metadata finder, for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年12月03日 UTC.