public interface UiContextReference extends Serializable
Used by SessionStore
as the key of a BeanStore
containing
scoped objects (see method
).
Helps to resolve the Guice Binding Annotation
corresponding
to the UI context, which provides access to context-specific type bindings
(orchestrated by e.g. UiContextApplyingProvider
).
Also provides a list of the keys that are more 'general' than the current.
UiContextApplyingProvider
,
CurrentUiContextReference
,
SessionStore
,
UiScopes
Modifier and Type | Interface and Description |
---|---|
static class |
UiContextReference.AppContextReference
App specific UI context reference.
|
static class |
UiContextReference.DatasourceComponentContextReference
Datasource-specific component reference implementation.
|
static class |
UiContextReference.SubAppContextReference
Sub-app specific UI context reference.
|
static class |
UiContextReference.UiContextReferenceImpl
Base
UiContextReference implementation. |
static class |
UiContextReference.ViewContextReference
View-specific UI context reference implementation.
|
Modifier and Type | Method and Description |
---|---|
String |
asString()
Get String representation of UI context ref; useful
when the reference needs to be used as a key in a hash map
(e.g.
|
static UiContextReference |
genericAppContextReference() |
static UiContextReference |
genericSubAppContextReference() |
static UiContextReference |
genericViewContextReference() |
UiContextAnnotation |
getAnnotation()
Get
UiContextAnnotation which corresponds to
this UI context reference. |
default Optional<UiContextReference> |
getDirectParentReference() |
default List<UiContextReference> |
getParentReferences()
Get all the ('broader') references that can be resolved from
the current one.
|
static UiContextReference |
ofApp(AppContext appContext)
Creates a UI context reference bound to a concrete instance of an app.
|
static UiContextReference |
ofCurrentUi() |
static UiContextReference |
ofDatasourceComponent(String datasourceId) |
static UiContextReference |
ofM5Admincentral() |
static UiContextReference |
ofSubApp(SubAppContext subAppContext)
Creates a UI context reference bound to a concrete instance of a sub-app.
|
static UiContextReference |
ofUi(com.vaadin.ui.UI ui) |
static UiContextReference |
ofView(String viewId,
UiContextReference parentKey) |
String asString()
BeanStore
).UiContextAnnotation getAnnotation()
UiContextAnnotation
which corresponds to
this UI context reference. Such annotation is also a
BindingAnnotation
used by Guice.default List<UiContextReference> getParentReferences()
default Optional<UiContextReference> getDirectParentReference()
static UiContextReference ofUi(com.vaadin.ui.UI ui)
static UiContextReference ofM5Admincentral()
static UiContextReference ofCurrentUi()
static UiContextReference ofApp(AppContext appContext)
appContext
- concrete instance of a app contextstatic UiContextReference ofSubApp(SubAppContext subAppContext)
subAppContext
- concrete instance of a sub-app contextstatic UiContextReference ofView(String viewId, UiContextReference parentKey)
static UiContextReference ofDatasourceComponent(String datasourceId)
static UiContextReference genericSubAppContextReference()
static UiContextReference genericAppContextReference()
static UiContextReference genericViewContextReference()
Copyright © 2020 Magnolia International Ltd.. All rights reserved.