Package com.dyuproject.demos.deprecated.todolist

Examples of com.dyuproject.demos.deprecated.todolist.Feedback


    {
        String id = request.getParameter(Constants.ID);
        String oldPassword = request.getParameter(Constants.OLD_PASSWORD);
        String newPassword = request.getParameter(Constants.NEW_PASSWORD);
       
        Feedback feedback = null;
       
        if(oldPassword==null || newPassword==null)
        {
            feedback = Feedback.REQUIRED_PARAMS_CHANGE_PASSWORD;
        }
        else if(oldPassword.equals(newPassword))
        {
            feedback = Feedback.PASSWORD_DID_NOT_MATCH;
        }
        User user = id!=null ? _userDao.get(Long.valueOf(id)) : null;
        if(user==null)
        {
            feedback = Feedback.USER_NOT_FOUND;
        }
       
        if(Constants.XML.equals(mime))
        {
            writeXML(feedback==null ? user : feedback, request, response);
        }
        else if(Constants.JSON.equals(mime))
        {
            writeJSON(feedback==null ? user : feedback, request, response);
        }
        else
        {
            if(feedback==null)
                feedback = Feedback.PASSWORD_CHANGED;
            request.setAttribute(Constants.MSG, feedback.getMsg());
            dispatchToView(user, request, response);
        }       
       
    }
View Full Code Here

TOP

Related Classes of com.dyuproject.demos.deprecated.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.