Package com.dyuproject.demos.todolist

Examples of com.dyuproject.demos.todolist.Feedback


       
        String oldPassword = request.getParameter(Constants.OLD_PASSWORD);
        String newPassword = request.getParameter(Constants.NEW_PASSWORD);
        String confirmPassword = request.getParameter(Constants.CONFIRM_PASSWORD);

        Feedback feedback = null;
       
        if(oldPassword==null || newPassword==null || confirmPassword==null)
            feedback = Feedback.CHANGE_PASSWORD_REQUIRED;
        else if(oldPassword.equals(newPassword))
            feedback = Feedback.NO_CHANGES_MADE;
        else if(newPassword.equals(confirmPassword))
        {
            if(cred.getPassword().equals(oldPassword))
            {
                cred.setPassword(newPassword);
                if(CredentialDao.executeUpdate())
                {
                    request.setAttribute(Constants.MSG, Feedback.PASSWORD_CHANGED.getMsg());
                    dispatchToView(null, rc, getWebContext());
                    return;
                }
            }
            else
                feedback = Feedback.PASSWORD_INCORRECT;
        }
        else
            feedback = Feedback.PASSWORD_DID_NOT_MATCH;
           
       
        if(feedback==null)
            feedback = Feedback.COULD_NOT_UPDATE_ACCOUNT;
       
        request.setAttribute(Constants.MSG, feedback.getMsg());
        dispatchToFormChangePassword(rc, getWebContext());
    }
View Full Code Here

TOP

Related Classes of com.dyuproject.demos.todolist.Feedback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.