public class AppShellRegistry extends Object implements Serializable
AppShellConfigurator
annotations.Modifier and Type | Class and Description |
---|---|
static class |
AppShellRegistry.AppShellRegistryWrapper
A wrapper class for storing the
AppShellRegistry instance in the
servlet context. |
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_HEADER_NO_APP_CONFIGURATOR |
static String |
ERROR_HEADER_NO_SHELL |
static String |
ERROR_HEADER_OFFENDING_CONFIGURATOR |
static String |
ERROR_HEADER_OFFENDING_PWA |
Modifier and Type | Method and Description |
---|---|
static AppShellRegistry |
getInstance(VaadinContext context)
Returns the instance of the registry, or create a new one if it does not
exist yet.
|
Class<? extends AppShellConfigurator> |
getShell()
Returns the
AppShellConfigurator class in the application. |
boolean |
isShell(Class<?> clz)
Deprecated.
use
AppShellPredicate to test whether the class is an
AppShellConfigurator or not |
void |
modifyIndexHtml(org.jsoup.nodes.Document document,
VaadinRequest request)
Modifies the `index.html` document based on the
AppShellConfigurator annotations or
AppShellConfigurator.configurePage(AppShellSettings) method. |
void |
modifyPushConfiguration(PushConfiguration pushConfiguration)
Modifies PushConfiguration instance based on the
Push annotation
on AppShellConfigurator . |
void |
reset()
Reset the registry configuration so as it's possible to perform a new
configuration and validation.
|
void |
setShell(Class<? extends AppShellConfigurator> shell)
Sets the
AppShellConfigurator class in the application. |
String |
toString() |
String |
validateClass(Class<?> clz)
Checks whether a class have annotations that should only be in
AppShellConfigurator classes. |
public static final String ERROR_HEADER_NO_SHELL
public static final String ERROR_HEADER_OFFENDING_PWA
public static final String ERROR_HEADER_NO_APP_CONFIGURATOR
public static final String ERROR_HEADER_OFFENDING_CONFIGURATOR
public static AppShellRegistry getInstance(VaadinContext context)
context
- servlet contextpublic void reset()
public void setShell(Class<? extends AppShellConfigurator> shell)
AppShellConfigurator
class in the application. Pass a
null to reset the previous one when reusing the instance.shell
- the class implementing AppShellConfigurator.public Class<? extends AppShellConfigurator> getShell()
AppShellConfigurator
class in the application.@Deprecated public boolean isShell(Class<?> clz)
AppShellPredicate
to test whether the class is an
AppShellConfigurator
or notAppShellConfigurator
.clz
- the class to check.AppShellConfigurator
.public String validateClass(Class<?> clz)
AppShellConfigurator
classes.clz
- the class to check.public void modifyIndexHtml(org.jsoup.nodes.Document document, VaadinRequest request)
AppShellConfigurator
annotations or
AppShellConfigurator.configurePage(AppShellSettings)
method.document
- a JSoup document for the index.html pagerequest
- The request to handlepublic void modifyPushConfiguration(PushConfiguration pushConfiguration)
Push
annotation
on AppShellConfigurator
.pushConfiguration
- the PushConfigration instance to modifyCopyright © 2021. All rights reserved.