Class UserIndicatorImpl

java.lang.Object
io.jmix.ui.component.CompositeComponent<CssLayout>
io.jmix.ui.component.mainwindow.impl.UserIndicatorImpl
All Implemented Interfaces:
AttachNotifier, Component, Component.BelongToFrame, HasDebugId, HasFormatter<org.springframework.security.core.userdetails.UserDetails>, HasHtmlSanitizer, UserIndicator

public class UserIndicatorImpl extends CompositeComponent<CssLayout> implements UserIndicator
  • Field Details

    • USER_INDICATOR_STYLENAME

      protected static final String USER_INDICATOR_STYLENAME
      See Also:
    • metadataTools

      protected MetadataTools metadataTools
    • uiComponents

      protected UiComponents uiComponents
    • messages

      protected Messages messages
    • icons

      protected Icons icons
    • substitutionManager

      protected UserSubstitutionManager substitutionManager
    • dialogs

      protected Dialogs dialogs
    • currentUserSubstitution

      protected CurrentUserSubstitution currentUserSubstitution
    • userComponent

      protected HasValue<org.springframework.security.core.userdetails.UserDetails> userComponent
    • userNameFormatter

      protected Formatter<? super org.springframework.security.core.userdetails.UserDetails> userNameFormatter
  • Constructor Details

    • UserIndicatorImpl

      public UserIndicatorImpl()
  • Method Details

    • onCreate

      protected void onCreate(CompositeComponent.CreateEvent createEvent)
    • createRootComponent

      protected CssLayout createRootComponent()
    • initRootComponent

      protected void initRootComponent(CssLayout root)
    • setMetadataTools

      @Autowired public void setMetadataTools(MetadataTools metadataTools)
    • setUiComponents

      @Autowired public void setUiComponents(UiComponents uiComponents)
    • setMessages

      @Autowired public void setMessages(Messages messages)
    • setIcons

      @Autowired public void setIcons(Icons icons)
    • setCurrentUserSubstitution

      @Autowired public void setCurrentUserSubstitution(CurrentUserSubstitution currentUserSubstitution)
    • setSubstitutionManager

      @Autowired(required=false) public void setSubstitutionManager(UserSubstitutionManager substitutionManager)
    • setDialogs

      @Autowired public void setDialogs(Dialogs dialogs)
    • refreshUser

      public void refreshUser()
      Description copied from interface: UserIndicator
      Informs this component that the current user may be changed and refresh is needed.
      Specified by:
      refreshUser in interface UserIndicator
    • createUserSelectionField

      protected HasValue<org.springframework.security.core.userdetails.UserDetails> createUserSelectionField(List<org.springframework.security.core.userdetails.UserDetails> currentAndSubstitutedUsers)
    • substituteUser

      protected void substituteUser(HasValue.ValueChangeEvent<org.springframework.security.core.userdetails.UserDetails> valueChangedEvent)
    • createUserIndicator

      protected HasValue<org.springframework.security.core.userdetails.UserDetails> createUserIndicator(org.springframework.security.core.userdetails.UserDetails user)
    • revertSelection

      protected void revertSelection(org.springframework.security.core.userdetails.UserDetails oldUser)
    • generateUserCaption

      protected String generateUserCaption(org.springframework.security.core.userdetails.UserDetails user)
    • setWidth

      public void setWidth(@Nullable String width)
      Description copied from interface: Component
      Set component width in Component.getWidthSizeUnit()}
      Specified by:
      setWidth in interface Component
      Overrides:
      setWidth in class CompositeComponent<CssLayout>
    • setHeight

      public void setHeight(@Nullable String height)
      Description copied from interface: Component
      Set component height in Component.getHeightSizeUnit()
      Specified by:
      setHeight in interface Component
      Overrides:
      setHeight in class CompositeComponent<CssLayout>
    • adjustWidth

      protected void adjustWidth()
    • adjustHeight

      protected void adjustHeight()
    • getFormatter

      @Nullable public Formatter<org.springframework.security.core.userdetails.UserDetails> getFormatter()
      Specified by:
      getFormatter in interface HasFormatter<org.springframework.security.core.userdetails.UserDetails>
    • setFormatter

      public void setFormatter(@Nullable Formatter<? super org.springframework.security.core.userdetails.UserDetails> formatter)
      Specified by:
      setFormatter in interface HasFormatter<org.springframework.security.core.userdetails.UserDetails>
    • onUserSubstitutionsChanged

      @EventListener protected void onUserSubstitutionsChanged(UiUserSubstitutionsChangedEvent event)