Class AppShellRegistry

java.lang.Object
com.vaadin.flow.server.AppShellRegistry
All Implemented Interfaces:
Serializable

public class AppShellRegistry extends Object implements Serializable
The registry class for AppShellConfigurator annotations.
Since:
3.0
See Also:
  • Field Details

  • Method Details

    • getInstance

      public static AppShellRegistry getInstance(VaadinContext context)
      Returns the instance of the registry, or create a new one if it does not exist yet.
      Parameters:
      context - servlet context
      Returns:
      the registry instance
    • reset

      public void reset()
      Reset the registry configuration so as it's possible to perform a new configuration and validation.
    • setShell

      public void setShell(Class<? extends AppShellConfigurator> shell)
      Sets the AppShellConfigurator class in the application. Pass a null to reset the previous one when reusing the instance.
      Parameters:
      shell - the class implementing AppShellConfigurator.
    • getShell

      public Class<? extends AppShellConfigurator> getShell()
      Returns the AppShellConfigurator class in the application.
      Returns:
      the app shell class
    • validateClass

      public String validateClass(Class<?> clz)
      Checks whether a class have annotations that should only be in AppShellConfigurator classes.
      Parameters:
      clz - the class to check.
      Returns:
      a string with the error lines if the class has offending annotations
    • modifyIndexHtml

      public void modifyIndexHtml(org.jsoup.nodes.Document document, VaadinRequest request)
      Modifies the `index.html` document based on the AppShellConfigurator annotations or AppShellConfigurator.configurePage(AppShellSettings) method.
      Parameters:
      document - a JSoup document for the index.html page
      request - The request to handle
    • modifyPushConfiguration

      public void modifyPushConfiguration(PushConfiguration pushConfiguration)
      Modifies PushConfiguration instance based on the Push annotation on AppShellConfigurator.
      Parameters:
      pushConfiguration - the PushConfigration instance to modify
    • toString

      public String toString()
      Overrides:
      toString in class Object