Class JmixUserIndicator

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
io.jmix.flowui.kit.component.main.UserIndicator<org.springframework.security.core.userdetails.UserDetails>
io.jmix.flowui.component.main.JmixUserIndicator
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, HasTitle, SupportsFormatter<org.springframework.security.core.userdetails.UserDetails>, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class JmixUserIndicator extends UserIndicator<org.springframework.security.core.userdetails.UserDetails> implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Actions
     
    protected org.springframework.context.ApplicationContext
     
     
    protected Dialogs
     
    protected Icons
     
    protected Messages
     
    protected MetadataTools
     
     
    protected UiComponents
     
    protected UserRepository
     

    Fields inherited from class io.jmix.flowui.kit.component.main.UserIndicator

    USER_INDICATOR_CLASS_NAME, USER_INDICATOR_LABEL_CLASS_NAME, userComponent, userFormatter
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected void
     
    protected com.vaadin.flow.component.Component
    createUserSelectionField(List<org.springframework.security.core.userdetails.UserDetails> currentAndSubstitutedUsers)
     
    protected String
    generateUserTitle(org.springframework.security.core.userdetails.UserDetails user)
     
    protected void
    onApplicationEvent(org.springframework.context.ApplicationEvent event)
     
    protected void
    onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
     
    protected void
    onDetach(com.vaadin.flow.component.DetachEvent detachEvent)
     
    protected void
     
    void
    Updates user information displayed by the component.
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     
    protected void
    substituteUser(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<org.springframework.security.core.userdetails.UserDetails>,org.springframework.security.core.userdetails.UserDetails> event)
     
     
    protected void
    updateUserIndicatorLabel(org.springframework.security.core.userdetails.UserDetails user)
     

    Methods inherited from class io.jmix.flowui.kit.component.main.UserIndicator

    createUserIndicator, getFormatter, initContent, setFormatter

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

    getChildren, getContent, getElement

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

    addListener, bindVisible, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, 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.HasEnabled

    bindEnabled, isEnabled, setEnabled

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

    bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

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

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

    Methods inherited from interface io.jmix.flowui.kit.component.HasTitle

    getTitle, setTitle
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • currentUserSubstitution

      protected CurrentUserSubstitution currentUserSubstitution
    • substitutionManager

      protected UserSubstitutionManager substitutionManager
    • metadataTools

      protected MetadataTools metadataTools
    • uiComponents

      protected UiComponents uiComponents
    • dialogs

      protected Dialogs dialogs
    • messages

      protected Messages messages
    • actions

      protected Actions actions
    • userRepository

      protected UserRepository userRepository
    • icons

      protected Icons icons
  • Constructor Details

    • JmixUserIndicator

      public JmixUserIndicator()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • autowireDependencies

      protected void autowireDependencies()
    • onAttach

      protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
      Overrides:
      onAttach in class com.vaadin.flow.component.Component
    • onDetach

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

      public void refreshUser()
      Description copied from class: UserIndicator
      Updates user information displayed by the component.
      Overrides:
      refreshUser in class UserIndicator<org.springframework.security.core.userdetails.UserDetails>
    • createUserSelectionField

      protected com.vaadin.flow.component.Component createUserSelectionField(List<org.springframework.security.core.userdetails.UserDetails> currentAndSubstitutedUsers)
    • substituteUser

      protected void substituteUser(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<org.springframework.security.core.userdetails.UserDetails>,org.springframework.security.core.userdetails.UserDetails> event)
    • updateUserIndicatorLabel

      protected void updateUserIndicatorLabel(org.springframework.security.core.userdetails.UserDetails user)
      Overrides:
      updateUserIndicatorLabel in class UserIndicator<org.springframework.security.core.userdetails.UserDetails>
    • generateUserTitle

      protected String generateUserTitle(org.springframework.security.core.userdetails.UserDetails user)
      Overrides:
      generateUserTitle in class UserIndicator<org.springframework.security.core.userdetails.UserDetails>
    • onApplicationEvent

      protected void onApplicationEvent(org.springframework.context.ApplicationEvent event)
    • onUserSubstitutionsChanged

      protected void onUserSubstitutionsChanged(UiUserSubstitutionsChangedEvent event)
    • uiEventsManager

      protected Optional<UiEventsManager> uiEventsManager()