Package com.adito.security.forms

Examples of com.adito.security.forms.PersonalAnswersForm


    }

    public ActionForward onExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
     
        PersonalAnswersForm f = (PersonalAnswersForm) form;
        User user = LogonControllerFactory.getInstance().getUser(request);
       
      PersonalAnswer answer;
      for(Iterator it = f.getPersonalAnswers().iterator(); it.hasNext();) {
        answer = (PersonalAnswer) it.next();
            Property.setProperty(new UserAttributeKey(user, answer.getId()), answer.getAnswer(), getSessionInfo(request));
      }

        CoreUtil.removePageInterceptListener(request.getSession(), "changePersonalAnswers");
View Full Code Here


        });
    }

    public ActionForward onExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        PersonalAnswersForm f = (PersonalAnswersForm) form;
        if (CoreUtil.getPageInterceptListenerById(request.getSession(), "changePersonalAnswers") == null) {
            if (f.getReferer() == null) {
                f.setReferer(CoreUtil.getReferer(request));
            }
        }
        List<PersonalAnswer> personalAnswers = new ArrayList<PersonalAnswer>();
        User user = LogonControllerFactory.getInstance().getUser(request);
        AttributeDefinition def;
        for (int i = 0; i < PersonalQuestionsAuthenticationModule.SECURITY_QUESTIONS.length; i++) {
         
            String id = PersonalQuestionsAuthenticationModule.SECURITY_QUESTIONS[i];
            def = (AttributeDefinition)PropertyClassManager.getInstance().getPropertyClass(UserAttributes.NAME).getDefinition(id);
            String answer = Property.getProperty(new UserAttributeKey(user, def.getName()));
            personalAnswers.add(new PersonalAnswer(id, answer==null ? "" : answer, def.getLabel()));
        }
       
        f.initialize(personalAnswers);
        if (request.getSession().getAttribute(Constants.REQ_ATTR_PERSONAL_ANSWERS_CHANGE_REASON_MESSAGE) != null) {
            ActionMessages messages = new ActionMessages();
            messages.add(Globals.MESSAGE_KEY, (ActionMessage) request.getSession().getAttribute(
                Constants.REQ_ATTR_PERSONAL_ANSWERS_CHANGE_REASON_MESSAGE));
            saveMessages(request, messages);
View Full Code Here

TOP

Related Classes of com.adito.security.forms.PersonalAnswersForm

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.