Package com._1c.g5.aef2.scenes
Interface IComponentSearchProvider
-
public interface IComponentSearchProvider
A contract for providers used by a scene to search components by queries.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IComponentSearchProvider.IComponentQueryMatcher
A contract for objects that can match a component against a specific query and generate queries for components.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Stream<IComponent<?>>
find(IComponent<?> rootComponent, Object query)
Searches for components using a query in the component tree defined by a root component.static IComponentSearchProvider
firstChild(IComponentSearchProvider.IComponentQueryMatcher matcher)
Returns a search provider that hierarchically traverses the component tree until it finds a component which satisfies a given matcher.Object
getQuery(IComponent<?> rootComponent, IComponent<?> component)
Returns a query object representing a given component.
-
-
-
Method Detail
-
firstChild
static IComponentSearchProvider firstChild(IComponentSearchProvider.IComponentQueryMatcher matcher)
Returns a search provider that hierarchically traverses the component tree until it finds a component which satisfies a given matcher.- Parameters:
matcher
- The matcher that will be applied to components- Returns:
- The search provider
-
find
Stream<IComponent<?>> find(IComponent<?> rootComponent, Object query)
Searches for components using a query in the component tree defined by a root component.- Parameters:
query
- An object representing a query (or an identifier, that depends on implementation) to be searched- Returns:
- a stream with components, never
null
, may be empty if nothing was found
-
getQuery
Object getQuery(IComponent<?> rootComponent, IComponent<?> component)
Returns a query object representing a given component. It is expected that the provider will then be able to find this component using the query relative torootComponent
.- Parameters:
rootComponent
- The parent of the component relative to which the query will be obtainedcomponent
- The component for which the query will be obtained- Returns:
- The query
-
-