protected static class BootstrapHandler.BootstrapContext extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
BootstrapContext(VaadinRequest request,
VaadinResponse response,
VaadinSession session,
UI ui,
Function<VaadinRequest,String> contextCallback)
Creates a new context instance using the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAppId()
Gets the application id.
|
elemental.json.JsonObject |
getApplicationParameters()
Gets the application parameters specified by the BootstrapHandler.
|
<T extends Annotation> |
getPageConfigurationAnnotation(Class<T> annotationType)
Gets an annotation from the topmost class in the current navigation
target hierarchy.
|
<T extends Annotation> |
getPageConfigurationAnnotations(Class<T> annotationType)
Gets a a list of annotations from the topmost class in the current
navigation target hierarchy.
|
PushMode |
getPushMode()
Gets the push mode to use.
|
protected Optional<PwaRegistry> |
getPwaRegistry()
Gets a pwa registry instance.
|
VaadinRequest |
getRequest()
Gets the Vaadin/HTTP request.
|
VaadinResponse |
getResponse()
Gets the Vaadin/HTTP response.
|
VaadinSession |
getSession()
Gets the Vaadin session.
|
protected Optional<ThemeDefinition> |
getTheme()
Gets the
ThemeDefinition associated with the
pageConfigurationHolder of this context, if any. |
UI |
getUI()
Gets the UI.
|
BootstrapHandler.BootstrapUriResolver |
getUriResolver()
Gets the URI resolver to use for bootstrap resources.
|
boolean |
isInitTheme()
Should custom theme be initialized.
|
boolean |
isProductionMode()
Checks if the application is running in production mode.
|
void |
setInitTheme(boolean initTheme)
Set if custom theme should be initialized.
|
protected BootstrapContext(VaadinRequest request, VaadinResponse response, VaadinSession session, UI ui, Function<VaadinRequest,String> contextCallback)
request - the request objectresponse - the response objectsession - the current sessionui - the UI objectpublic VaadinResponse getResponse()
public VaadinRequest getRequest()
public VaadinSession getSession()
public boolean isInitTheme()
public void setInitTheme(boolean initTheme)
initTheme - enable or disable theme initialisationpublic UI getUI()
public PushMode getPushMode()
public String getAppId()
VaadinService.getMainDivId(VaadinSession, VaadinRequest)public elemental.json.JsonObject getApplicationParameters()
public BootstrapHandler.BootstrapUriResolver getUriResolver()
public boolean isProductionMode()
true if in production mode, false
otherwise.public <T extends Annotation> Optional<T> getPageConfigurationAnnotation(Class<T> annotationType)
T - the type of the annotationannotationType - the type of the annotation to getpublic <T extends Annotation> List<T> getPageConfigurationAnnotations(Class<T> annotationType)
T - the type of the annotationsannotationType - the type of the annotation to getprotected Optional<ThemeDefinition> getTheme()
ThemeDefinition associated with the
pageConfigurationHolder of this context, if any.nullUI.getThemeFor(Class, String)protected Optional<PwaRegistry> getPwaRegistry()
Copyright © 2021. All rights reserved.