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
Modifier and TypeFieldDescriptionprotected PasswordField
protected PasswordField
protected MessageBundle
protected Notifications
protected org.springframework.security.crypto.password.PasswordEncoder
protected PasswordField
protected ScreenValidation
protected org.springframework.security.core.userdetails.UserDetails
protected UserManager
protected String
protected UserRepository
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected OperationResult
changePassword
(String username, String password, String currentPassword) protected String
protected String
protected String
boolean
protected void
onAfterShow
(Screen.AfterShowEvent event) protected void
protected void
onOkBtnClick
(Button.ClickEvent event) protected boolean
validate()
protected ValidationErrors
validatePassword
(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 -
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:
true
if 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
-