Class ChangePasswordView
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.view.View<ViewLayout>
io.jmix.flowui.view.StandardView
io.jmix.securityflowui.view.changepassword.ChangePasswordView
- All Implemented Interfaces:
- com.vaadin.flow.component.AttachNotifier,- com.vaadin.flow.component.DetachNotifier,- com.vaadin.flow.component.HasElement,- com.vaadin.flow.component.HasStyle,- com.vaadin.flow.router.AfterNavigationObserver,- com.vaadin.flow.router.BeforeEnterObserver,- com.vaadin.flow.router.BeforeLeaveObserver,- com.vaadin.flow.router.HasDynamicTitle,- com.vaadin.flow.router.internal.AfterNavigationHandler,- com.vaadin.flow.router.internal.BeforeEnterHandler,- com.vaadin.flow.router.internal.BeforeLeaveHandler,- FragmentOwner,- Serializable
@ViewController("changePasswordView")
@ViewDescriptor("change-password-view.xml")
public class ChangePasswordView
extends StandardView
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class io.jmix.flowui.view.ViewView.AfterCloseEvent, View.BeforeCloseEvent, View.BeforeShowEvent, View.InitEvent, View.QueryParametersChangeEvent, View.ReadyEvent
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected com.vaadin.flow.component.textfield.PasswordFieldprotected com.vaadin.flow.component.textfield.PasswordFieldprotected MessageBundleprotected MetadataToolsprotected Notificationsprotected org.springframework.security.crypto.password.PasswordEncoderprotected com.vaadin.flow.component.textfield.PasswordFieldprotected PasswordValidationprotected org.springframework.security.core.userdetails.UserDetailsprotected UserManagerprotected Stringprotected UserRepositoryprotected ViewValidation
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected OperationResultchangePassword(String username, String password, String currentPassword) protected StringbooleanvoidonBeforeShow(View.BeforeShowEvent event) voidvoidvoidsetCurrentPasswordRequired(boolean required) Sets whether a user should enter the current password.voidsetUsername(String username) Sets username for which should be changed password.protected booleanvalidate()protected ValidationErrorsvalidatePassword(com.vaadin.flow.component.textfield.PasswordField passwordField, com.vaadin.flow.component.textfield.PasswordField confirmPasswordField, com.vaadin.flow.component.textfield.PasswordField currentPasswordField) Methods inherited from class io.jmix.flowui.view.StandardViewinitContentMethods inherited from class io.jmix.flowui.view.ViewaddAfterCloseListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, addQueryParametersChangeListener, addReadyListener, afterNavigation, beforeEnter, beforeLeave, close, close, closeWithDefaultAction, getApplicationContext, getId, getReturnParameters, getViewActions, getViewAttributes, getViewData, getViewFacets, getViewSupport, isPreventBrowserTabClosing, onAttach, onDetach, onDetachInternal, removeApplicationListeners, removeViewAttributes, setAfterNavigationHandler, setApplicationContext, setId, setMeterRegistry, setPreventBrowserTabClosing, setViewActions, setViewData, setViewFacets, unregisterBackNavigationMethods inherited from class com.vaadin.flow.component.CompositegetChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.ComponentaddListener, findAncestor, fireEvent, from, get, getEventBus, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setVisibleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifieraddAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifieraddDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyleaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
- 
Field Details- 
passwordField
- 
confirmPasswordField
- 
currentPasswordField
- 
messageBundle
- 
userManager
- 
notifications
- 
viewValidation
- 
passwordEncoder@Autowired protected org.springframework.security.crypto.password.PasswordEncoder passwordEncoder
- 
passwordValidation
- 
userRepository
- 
metadataTools
- 
username
- 
userprotected org.springframework.security.core.userdetails.UserDetails user
 
- 
- 
Constructor Details- 
ChangePasswordViewpublic ChangePasswordView()
 
- 
- 
Method Details- 
getUsername- Returns:
- username for which should be changed password
 
- 
setUsernameSets username for which should be changed password.- Parameters:
- username- username
 
- 
isCurrentPasswordRequiredpublic boolean isCurrentPasswordRequired()- Returns:
- trueif a user should enter the current password
 
- 
setCurrentPasswordRequiredpublic void setCurrentPasswordRequired(boolean required) Sets whether a user should enter the current password.Default value is false.- Parameters:
- required- required option
 
- 
onBeforeShow
- 
getPageTitle- Specified by:
- getPageTitlein interface- com.vaadin.flow.router.HasDynamicTitle
- Overrides:
- getPageTitlein class- View<ViewLayout>
 
- 
onSaveActionPerformed
- 
onCloseActionPerformed
- 
validateprotected boolean validate()
- 
validatePasswordprotected ValidationErrors validatePassword(com.vaadin.flow.component.textfield.PasswordField passwordField, com.vaadin.flow.component.textfield.PasswordField confirmPasswordField, com.vaadin.flow.component.textfield.PasswordField currentPasswordField) 
- 
changePasswordprotected OperationResult changePassword(String username, String password, @Nullable String currentPassword) 
- 
getPassword
 
-