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 Summary
Nested classes/interfaces inherited from class io.jmix.ui.screen.Screen
Screen.AfterCloseEvent, Screen.AfterDetachEvent, Screen.AfterInitEvent, Screen.AfterShowEvent, Screen.BeforeCloseEvent, Screen.BeforeShowEvent, Screen.InitEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PasswordFieldprotected PasswordFieldprotected MessageBundleprotected Notificationsprotected org.springframework.security.crypto.password.PasswordEncoderprotected PasswordFieldprotected PasswordValidationprotected ScreenValidationprotected org.springframework.security.core.userdetails.UserDetailsprotected UserManagerprotected Stringprotected UserRepositoryFields inherited from interface io.jmix.ui.screen.FrameOwner
NO_OPTIONS, WINDOW_CLOSE_ACTION, WINDOW_COMMIT_AND_CLOSE_ACTION, WINDOW_DISCARD_AND_CLOSE_ACTION -
Constructor Summary
Constructors -
Method Summary
Modifier 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.Screen
addAfterCloseListener, 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 -
passwordValidation
-
userRepository
-
passwordField
-
confirmPasswordField
-
currentPasswordField
-
username
-
user
protected org.springframework.security.core.userdetails.UserDetails user
-
-
Constructor Details
-
ChangePasswordDialog
public ChangePasswordDialog()
-
-
Method Details
-
getUsername
- Returns:
- username for which should be changed password
-
withUsername
Sets username for which should be changed password.- Parameters:
username- username- Returns:
- current instance of dialog
-
isCurrentPasswordRequired
public boolean isCurrentPasswordRequired()- Returns:
trueif a user should enter the current password
-
withCurrentPasswordRequired
Sets whether a user should enter the current password.Default value is
false.- Parameters:
required- required option- Returns:
- current instance of dialog
-
onAfterShow
-
onOkBtnClick
-
onCancelBtnClick
-
validate
protected boolean validate() -
validatePassword
protected ValidationErrors validatePassword(PasswordField passwordField, PasswordField confirmPasswordField, PasswordField currentPasswordField) -
changePassword
protected OperationResult changePassword(String username, String password, @Nullable String currentPassword) -
getPassword
-
getConfirmPassword
-
getCurrentPassword
-