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
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.component.CompositeComponent
CompositeComponent.CreateEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserSubstitution
protected Dialogs
protected Icons
protected Messages
protected MetadataTools
protected UserSubstitutionManager
protected UiComponents
protected static final String
protected HasValue<org.springframework.security.core.userdetails.UserDetails>
protected Formatter<? super org.springframework.security.core.userdetails.UserDetails>
protected UserRepository
Fields inherited from class io.jmix.ui.component.CompositeComponent
applicationContext, frame, id, prefixId, root
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.mainwindow.UserIndicator
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected CssLayout
protected HasValue<org.springframework.security.core.userdetails.UserDetails>
createUserIndicator
(org.springframework.security.core.userdetails.UserDetails user) protected HasValue<org.springframework.security.core.userdetails.UserDetails>
createUserSelectionField
(List<org.springframework.security.core.userdetails.UserDetails> currentAndSubstitutedUsers) protected String
generateUserCaption
(org.springframework.security.core.userdetails.UserDetails user) Formatter<org.springframework.security.core.userdetails.UserDetails>
protected void
initRootComponent
(CssLayout root) protected void
onCreate
(CompositeComponent.CreateEvent createEvent) protected void
void
Informs this component that the current user may be changed and refresh is needed.protected void
revertSelection
(org.springframework.security.core.userdetails.UserDetails oldUser) void
setCurrentUserSubstitution
(CurrentUserSubstitution currentUserSubstitution) void
setDialogs
(Dialogs dialogs) void
setFormatter
(Formatter<? super org.springframework.security.core.userdetails.UserDetails> formatter) void
Set component height inComponent.getHeightSizeUnit()
void
void
setMessages
(Messages messages) void
setMetadataTools
(MetadataTools metadataTools) void
setSubstitutionManager
(UserSubstitutionManager substitutionManager) void
setUiComponents
(UiComponents uiComponents) void
setUserRepository
(UserRepository userRepository) void
Set component width inComponent.getWidthSizeUnit()
}protected void
substituteUser
(HasValue.ValueChangeEvent<org.springframework.security.core.userdetails.UserDetails> valueChangedEvent) Methods inherited from class io.jmix.ui.component.CompositeComponent
addAttachListener, addCreateListener, addDetachListener, addStyleName, assignDebugId, attached, detached, disableEventListeners, enableEventListeners, getAlignment, getComposition, getCompositionOrNull, getDebugId, getEventHub, getFrame, getFullId, getHeight, getHeightSizeUnit, getId, getInnerComponent, getInnerComponentOptional, getParent, getPrefixId, getStyleName, getUiEventListeners, getWidth, getWidthSizeUnit, hasSubscriptions, isAttached, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, publish, removeStyleName, setAlignment, setApplicationContext, setComposition, setDebugId, setEnabled, setFrame, setHtmlSanitizerEnabled, setId, setParent, setResponsive, setStyleName, setUiEventListeners, setVisible, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, updateComponentIds, updateIdIfNeeded, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
-
Field Details
-
USER_INDICATOR_STYLENAME
- See Also:
-
metadataTools
-
uiComponents
-
messages
-
icons
-
substitutionManager
-
dialogs
-
currentUserSubstitution
-
userRepository
-
userComponent
-
userNameFormatter
protected Formatter<? super org.springframework.security.core.userdetails.UserDetails> userNameFormatter
-
-
Constructor Details
-
UserIndicatorImpl
public UserIndicatorImpl()
-
-
Method Details
-
onCreate
-
createRootComponent
-
initRootComponent
-
setMetadataTools
-
setUiComponents
-
setMessages
-
setIcons
-
setCurrentUserSubstitution
-
setSubstitutionManager
@Autowired(required=false) public void setSubstitutionManager(UserSubstitutionManager substitutionManager) -
setUserRepository
-
setDialogs
-
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 interfaceUserIndicator
-
createUserSelectionField
-
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
Description copied from interface:Component
Set component width inComponent.getWidthSizeUnit()
}- Specified by:
setWidth
in interfaceComponent
- Overrides:
setWidth
in classCompositeComponent<CssLayout>
-
setHeight
Description copied from interface:Component
Set component height inComponent.getHeightSizeUnit()
- Specified by:
setHeight
in interfaceComponent
- Overrides:
setHeight
in classCompositeComponent<CssLayout>
-
adjustWidth
protected void adjustWidth() -
adjustHeight
protected void adjustHeight() -
getFormatter
@Nullable public Formatter<org.springframework.security.core.userdetails.UserDetails> getFormatter()- Specified by:
getFormatter
in interfaceHasFormatter<org.springframework.security.core.userdetails.UserDetails>
-
setFormatter
public void setFormatter(@Nullable Formatter<? super org.springframework.security.core.userdetails.UserDetails> formatter) - Specified by:
setFormatter
in interfaceHasFormatter<org.springframework.security.core.userdetails.UserDetails>
-
onUserSubstitutionsChanged
-