Class ApplicationView

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.applayout.AppLayout
net.tangly.app.ApplicationView
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, com.vaadin.flow.router.RouterLayout, Serializable

public class ApplicationView extends com.vaadin.flow.component.applayout.AppLayout
The main view of the application is the entry point to the application. Each bounded domain with a user interface is accessible through a tab. Vaadin creates for each tab a new instance of the bounded domain user interface.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.flow.component.applayout.AppLayout

    com.vaadin.flow.component.applayout.AppLayout.AppLayoutI18n, com.vaadin.flow.component.applayout.AppLayout.Section
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ApplicationView(Tenant tenant, boolean hasAuthentication)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<String,net.tangly.ui.app.domain.BoundedDomainUi<?>>
     
    protected Optional<com.vaadin.flow.component.tabs.Tab>
    domainTab(String domain)
     
    protected void
    drawerMenu(net.tangly.core.domain.User user)
     
    Optional<net.tangly.ui.app.domain.BoundedDomainUi<?>>
     
    protected com.vaadin.flow.component.menubar.MenuBar
     
    protected void
    onAttach(@NotNull com.vaadin.flow.component.AttachEvent attachEvent)
     
    protected void
    onDetach(@NotNull com.vaadin.flow.component.DetachEvent detachEvent)
     
    void
    registerBoundedDomainUi(net.tangly.ui.app.domain.BoundedDomainUi<?> domain)
     
    protected final void
    selectBoundedDomainUi(com.vaadin.flow.component.tabs.Tabs.SelectedChangeEvent event)
     
    protected final void
    selectBoundedDomainUi(@NotNull String domainName)
     
    protected void
    selectBoundedDomainUi(@NotNull net.tangly.ui.app.domain.BoundedDomainUi<?> ui)
     
     
    static net.tangly.core.domain.User
     
    void
    userChanged(@NotNull Tenant tenant, @NotNull net.tangly.core.domain.User user)
    The method is called when a user successfully logs in.
    static String
     

    Methods inherited from class com.vaadin.flow.component.applayout.AppLayout

    addToDrawer, addToNavbar, addToNavbar, afterNavigation, getContent, getI18n, getPrimarySection, isDrawerOpened, isOverlay, remove, setContent, setDrawerOpened, setI18n, setPrimarySection, showRouterLayoutContent

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.router.RouterLayout

    removeRouterLayoutContent
  • Field Details

  • Constructor Details

    • ApplicationView

      public ApplicationView(Tenant tenant, boolean hasAuthentication)
  • Method Details

    • tenant

      public Tenant tenant()
    • userChanged

      public void userChanged(@NotNull @NotNull Tenant tenant, @NotNull @NotNull net.tangly.core.domain.User user)
      The method is called when a user successfully logs in. Update access to bounded domains based on the user's access rights. Propagate the user change to all bounded domains.
      Parameters:
      user - newly logged-in user
    • username

      public static String username()
    • user

      public static net.tangly.core.domain.User user()
    • onAttach

      protected void onAttach(@NotNull @NotNull com.vaadin.flow.component.AttachEvent attachEvent)
      Overrides:
      onAttach in class com.vaadin.flow.component.applayout.AppLayout
    • onDetach

      protected void onDetach(@NotNull @NotNull com.vaadin.flow.component.DetachEvent detachEvent)
      Overrides:
      onDetach in class com.vaadin.flow.component.Component
    • registerBoundedDomainUi

      public void registerBoundedDomainUi(net.tangly.ui.app.domain.BoundedDomainUi<?> domain)
    • getBoundedDomainUi

      public Optional<net.tangly.ui.app.domain.BoundedDomainUi<?>> getBoundedDomainUi(String name)
    • boundedDomainUis

      public Map<String,net.tangly.ui.app.domain.BoundedDomainUi<?>> boundedDomainUis()
    • selectBoundedDomainUi

      protected final void selectBoundedDomainUi(@NotNull @NotNull String domainName)
    • selectBoundedDomainUi

      protected final void selectBoundedDomainUi(com.vaadin.flow.component.tabs.Tabs.SelectedChangeEvent event)
    • selectBoundedDomainUi

      protected void selectBoundedDomainUi(@NotNull @NotNull net.tangly.ui.app.domain.BoundedDomainUi<?> ui)
    • drawerMenu

      protected void drawerMenu(net.tangly.core.domain.User user)
    • domainTab

      protected Optional<com.vaadin.flow.component.tabs.Tab> domainTab(String domain)