public interface Populatable
Modifier and Type | Method and Description |
---|---|
void |
addComponentFor(DataSource<?> source)
Adds a component for a data source.
|
default void |
addComponentIfPossible(DataSource<?> source)
If possible, adds a component for a data source.
|
default void |
addComponentIfPossible(SourceTypes sourceTypes,
java.lang.String sourceId)
If possible, adds a component for a data source.
|
boolean |
hasComponentFor(java.lang.String sourceId)
Checks if this contains a component corresponding to a data source.
|
boolean |
supports(java.lang.String sourceId)
Checks if the given data source is supported, ie it matches some criteria; for example, a widget that populates
with data under a certain path should check if the source's ID starts with that path.
|
boolean supports(java.lang.String sourceId)
true
.sourceId
- the ID of the source to checkboolean hasComponentFor(java.lang.String sourceId)
sourceId
- the ID of the source to check components forvoid addComponentFor(DataSource<?> source)
source
- the source to add a component fordefault void addComponentIfPossible(DataSource<?> source)
source
- the source to check/add a component fordefault void addComponentIfPossible(SourceTypes sourceTypes, java.lang.String sourceId)
sourceTypes
- the source type registry to use to create a new source to populatesourceId
- the ID of the source for the component to add