Class ChangePasswordDialog
java.lang.Object
io.jmix.ui.screen.Screen
io.jmix.securityui.screen.changepassword.ChangePasswordDialog
- All Implemented Interfaces:
- FrameOwner
@UiController("ChangePasswordDialog")
@UiDescriptor("change-password-dialog.xml")
public class ChangePasswordDialog
extends Screen
- 
Nested Class SummaryNested classes/interfaces inherited from class io.jmix.ui.screen.ScreenScreen.AfterCloseEvent, Screen.AfterDetachEvent, Screen.AfterInitEvent, Screen.AfterShowEvent, Screen.BeforeCloseEvent, Screen.BeforeShowEvent, Screen.InitEvent
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected PasswordFieldprotected PasswordFieldprotected MessageBundleprotected Notificationsprotected org.springframework.security.crypto.password.PasswordEncoderprotected PasswordFieldprotected ScreenValidationprotected org.springframework.security.core.userdetails.UserDetailsprotected UserManagerprotected Stringprotected UserRepositoryFields inherited from interface io.jmix.ui.screen.FrameOwnerNO_OPTIONS, WINDOW_CLOSE_ACTION, WINDOW_COMMIT_AND_CLOSE_ACTION, WINDOW_DISCARD_AND_CLOSE_ACTION
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected OperationResultchangePassword(String username, String password, String currentPassword) protected Stringprotected Stringprotected Stringbooleanprotected voidonAfterShow(Screen.AfterShowEvent event) protected voidprotected voidonOkBtnClick(Button.ClickEvent event) protected booleanvalidate()protected ValidationErrorsvalidatePassword(PasswordField passwordField, PasswordField confirmPasswordField, PasswordField currentPasswordField) withCurrentPasswordRequired(boolean required) Sets whether a user should enter the current password.withUsername(String username) Sets username for which should be changed password.Methods inherited from class io.jmix.ui.screen.ScreenaddAfterCloseListener, addAfterDetachListener, addAfterInitListener, addAfterShowListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, addUrlParamsChangeListener, close, close, closeWithDefaultAction, fireEvent, getApplicationContext, getEventHub, getExtensions, getId, getScreenData, getUiEventListeners, getWindow, isMultipleOpen, isSameScreen, setApplicationContext, setExtensions, setId, setScreenData, setUiEventListeners, setWindow, show
- 
Field Details- 
messageBundle
- 
userManager
- 
notifications
- 
screenValidation
- 
passwordEncoder@Autowired protected org.springframework.security.crypto.password.PasswordEncoder passwordEncoder
- 
userRepository
- 
passwordField
- 
confirmPasswordField
- 
currentPasswordField
- 
username
- 
userprotected org.springframework.security.core.userdetails.UserDetails user
 
- 
- 
Constructor Details- 
ChangePasswordDialogpublic ChangePasswordDialog()
 
- 
- 
Method Details- 
getUsername- Returns:
- username for which should be changed password
 
- 
withUsernameSets username for which should be changed password.- Parameters:
- username- username
- Returns:
- current instance of dialog
 
- 
isCurrentPasswordRequiredpublic boolean isCurrentPasswordRequired()- Returns:
- trueif a user should enter the current password
 
- 
withCurrentPasswordRequiredSets whether a user should enter the current password.Default value is false.- Parameters:
- required- required option
- Returns:
- current instance of dialog
 
- 
onAfterShow
- 
onOkBtnClick
- 
onCancelBtnClick
- 
validateprotected boolean validate()
- 
validatePasswordprotected ValidationErrors validatePassword(PasswordField passwordField, PasswordField confirmPasswordField, PasswordField currentPasswordField) 
- 
changePasswordprotected OperationResult changePassword(String username, String password, @Nullable String currentPassword) 
- 
getPassword
- 
getConfirmPassword
- 
getCurrentPassword
 
-