LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.app.behavior
Class LyPasswordBehavior

java.lang.Object
  extended by leon.app.behavior.LyBehavior
      extended by leon.app.behavior.LyActionBehavior
          extended by 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
 
Constructor Summary
LyPasswordBehavior()
           
 
Method Summary
 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.
 void completeInitializePassword(LyPasswordController passwordController)
          Complete password initialization with default values or extra fields adding for input.
 void initializePassword(LyPasswordController passwordController)
          Password initialization of the manipulated classInfo and passwordFieldInfo.
 void userInputDemand(LyController controller, LyDemand demand)
          Method invoked when the user validates the content of its inputs.
 
Methods inherited from class leon.app.behavior.LyActionBehavior
endAction, getClientContext, getContextTitle, getHelpFile, getImage, getImageTooltip, getKeyValue, getMenuItemImage, getTitle, reset, startAction
 
Methods inherited from class leon.app.behavior.LyBehavior
free, getSession, handleDemand, init
 
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
 
Methods inherited from interface leon.app.behaviorinterface.LyBehaviorInterface
free, handleDemand, init
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LyPasswordBehavior

public LyPasswordBehavior()
Method Detail

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 controller
currentPassword - current password for validation.
newPassword - new password value typed in by the user
confirmPassword - confirm password request: should equals newPassword
values - 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 instance
demand - demand parameters sent by the view component.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com