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
  • Field Details

    • messageBundle

      @Autowired protected MessageBundle messageBundle
    • userManager

      @Autowired protected UserManager userManager
    • notifications

      @Autowired protected Notifications notifications
    • screenValidation

      @Autowired protected ScreenValidation screenValidation
    • passwordEncoder

      @Autowired protected org.springframework.security.crypto.password.PasswordEncoder passwordEncoder
    • passwordValidation

      @Autowired protected PasswordValidation passwordValidation
    • userRepository

      @Autowired protected UserRepository userRepository
    • passwordField

      @Autowired protected PasswordField passwordField
    • confirmPasswordField

      @Autowired protected PasswordField confirmPasswordField
    • currentPasswordField

      @Autowired protected PasswordField currentPasswordField
    • username

      protected String username
    • user

      protected org.springframework.security.core.userdetails.UserDetails user
  • Constructor Details

    • ChangePasswordDialog

      public ChangePasswordDialog()
  • Method Details

    • getUsername

      public String getUsername()
      Returns:
      username for which should be changed password
    • withUsername

      public ChangePasswordDialog withUsername(String username)
      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

      public ChangePasswordDialog withCurrentPasswordRequired(boolean required)
      Sets whether a user should enter the current password.

      Default value is false.

      Parameters:
      required - required option
      Returns:
      current instance of dialog
    • onAfterShow

      @Subscribe protected void onAfterShow(Screen.AfterShowEvent event)
    • onOkBtnClick

      @Subscribe("okBtn") protected void onOkBtnClick(Button.ClickEvent event)
    • onCancelBtnClick

      @Subscribe("cancelBtn") protected void onCancelBtnClick(Button.ClickEvent event)
    • 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

      @Nullable protected String getPassword()
    • getConfirmPassword

      @Nullable protected String getConfirmPassword()
    • getCurrentPassword

      @Nullable protected String getCurrentPassword()