DEF
- datasource definition type.@Multibinding public abstract class DatasourceBundle<DEF> extends Object
In a generic app that interacts with some arbitrary data source, one can inject
the instances that are provided by the related bundle. For instance, if an app is
bound to a JCR datasource (via BrowserDescriptor#getDatasource()
)
and the system provides the reference implementation of a datasource bundle related to the JCR,
then the developer can inject instances of e.g. Vaadin's DataProvider
by merely marking the c-tor argument with DatasourceComponent
annotation.
Constructor and Description |
---|
DatasourceBundle(Class<DEF> type) |
Modifier and Type | Method and Description |
---|---|
<T> Optional<T> |
lookup(Class<T> type,
DEF definition) |
protected <T> void |
register(Class<? super T> type,
DatasourceComponentFactory<DEF,T> factory) |
Class<DEF> |
supportedDataSourceType() |
Copyright © 2018 Magnolia International Ltd.. All rights reserved.