leon.app.behavior
Class LyPasswordBehavior
java.lang.Object
leon.app.behavior.LyBehavior
leon.app.behavior.LyActionBehavior
leon.app.behavior.LyPasswordBehavior
- All Implemented Interfaces:
- LyActionBehaviorInterface, LyBehaviorInterface, LyPasswordBehaviorInterface, LyUserInputBehaviorInterface, LyGetSessionInterface
public class LyPasswordBehavior
- extends LyActionBehavior
- implements LyPasswordBehaviorInterface, LyUserInputBehaviorInterface
Default behavior to handle changePassowrds request.
The default implementation checks current Password and consistency between the new
password and the password confirmation field. This implementation does not make any checking on
password content (number of letters, number inside the paswword String): may be overriden to add
application rules.
- See Also:
LyPasswordController
,
LyPasswordBehaviorInterface
Field Summary |
static java.lang.String |
__VERSION
File version |
Methods inherited from class leon.app.behavior.LyActionBehavior |
endAction, getClientContext, getContextTitle, getHelpFile, getImage, getImageTooltip, getKeyValue, getMenuItemImage, getTitle, reset, startAction |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface leon.app.behaviorinterface.LyActionBehaviorInterface |
endAction, getClientContext, getContextTitle, getHelpFile, getImage, getImageTooltip, getKeyValue, getMenuItemImage, getTitle, reset, startAction |
__VERSION
public static final java.lang.String __VERSION
- File version
- See Also:
- Constant Field Values
LyPasswordBehavior
public LyPasswordBehavior()
initializePassword
public void initializePassword(LyPasswordController passwordController)
- Password initialization of the manipulated classInfo and passwordFieldInfo.
The default implementation does nothing.
- Specified by:
initializePassword
in interface LyPasswordBehaviorInterface
- Parameters:
passwordController
- current controller
completeInitializePassword
public void completeInitializePassword(LyPasswordController passwordController)
- Complete password initialization with default values or extra fields adding for input.
The default implementation does nothing.
- Specified by:
completeInitializePassword
in interface LyPasswordBehaviorInterface
- Parameters:
passwordController
- current controller
changePassword
public boolean changePassword(LyPasswordController passwordController,
java.lang.String currentPassword,
java.lang.String newPassword,
java.lang.String confirmPassword,
LyParameterValues values)
- Method invoked to change the given current password with the given new password value.
Specific implementation may add extra rules here.
The default implementation gets the current user from the controller and the given
values then checks that the user exists, that the given current password is the good one and
that the given new password equals the given confirm password. If all those conditions are
OK, the apply changes and returns true, else return false.
- Specified by:
changePassword
in interface LyPasswordBehaviorInterface
- Parameters:
passwordController
- current controllercurrentPassword
- current password for validation.newPassword
- new password value typed in by the userconfirmPassword
- confirm password request: should equals newPasswordvalues
- user input values of the current, new and confirmed passwords
- Returns:
- true if action completed successfully, false if password is unchanged
userInputDemand
public void userInputDemand(LyController controller,
LyDemand demand)
- Method invoked when the user validates the content of its inputs.
The default implementation hides the controller view
and frees
it, after successfully checking the password
if he validated
the input or directly if he canceled it.
- Specified by:
userInputDemand
in interface LyUserInputBehaviorInterface
- Parameters:
controller
- the current LyUserInputController instancedemand
- demand parameters sent by the view component.
Website: W4 S.A., contact us: support@w4global.com