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 |
static String |
ERROR_HEADER_OFFENDING_CONFIGURATOR |
Constructor and Description |
---|
AppShellRegistry() |
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. |
String |
getTitle()
Return the text content of the title tag in the application shell.
|
boolean |
isShell(Class<?> clz)
Checks whether the class is extending
AppShellConfigurator . |
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
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 extending VaadinAppShell class.public Class<? extends AppShellConfigurator> getShell()
AppShellConfigurator
class in the application.public boolean isShell(Class<?> clz)
AppShellConfigurator
.clz
- the class to check.AppShellConfigurator
.public String getTitle()
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 © 2020. All rights reserved.