Examples of PersonBean


Examples of org.apache.commons.betwixt.PersonBean

    public TestSAXBeanWriter(String name) {
        super(name);
    }

    public void testWrite() throws Exception {
        PersonBean bean = new PersonBean(35, "John Smith");

        // writer bean into string
        StringWriter out = new StringWriter();
       
        //SimpleLog log = new SimpleLog("[TestWrite:SAXBeanWriter]");
View Full Code Here

Examples of org.apache.commons.betwixt.PersonBean

                endCalled = true;
            }
           
        }
       
        PersonBean bean = new PersonBean(35, "John Smith");
       
        TestDocHandler handler = new TestDocHandler();
        SAXBeanWriter writer = new SAXBeanWriter(handler);
        writer.setCallDocumentEvents(true);
        writer.write(bean);
View Full Code Here

Examples of org.apache.commons.betwixt.PersonBean

                    namesMatch = false;
                }
            }
        }
       
        PersonBean bean = new PersonBean(24, "vikki");
        TestNames testHandler = new TestNames();
        SAXBeanWriter writer = new SAXBeanWriter(testHandler);
        writer.write(bean);
       
        assertEquals("Local names match QNames", testHandler.namesMatch, true);
View Full Code Here

Examples of org.codehaus.jackson.map.TestNamingStrategy.PersonBean

    }
   
    public void testLowerCaseTranslations() throws Exception
    {
        // First serialize
        String json = mapper.writeValueAsString(new PersonBean("Joe", "Sixpack", 42));
        assertEquals("{\"first_name\":\"Joe\",\"last_name\":\"Sixpack\",\"age\":42}", json);
       
        // then deserialize
        PersonBean result = mapper.readValue(json, PersonBean.class);
        assertEquals("Joe", result.firstName);
        assertEquals("Sixpack", result.lastName);
        assertEquals(42, result.age);
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.person.PersonBean

        SecondCycleIndividualCandidacyProcess individualCandidacyProcess =
                (SecondCycleIndividualCandidacyProcess) request.getAttribute("individualCandidacyProcess");
        SecondCycleIndividualCandidacyProcessBean bean =
                new SecondCycleIndividualCandidacyProcessBean(individualCandidacyProcess);

        bean.setPersonBean(new PersonBean(individualCandidacyProcess.getPersonalDetails()));

        request.setAttribute("individualCandidacyProcessBean", bean);
        request.setAttribute("hasSelectedDegrees", !individualCandidacyProcess.getSelectedDegrees().isEmpty());
        request.setAttribute("isApplicationSubmissionPeriodValid",
                redefineApplicationSubmissionPeriodValid(individualCandidacyProcess));
View Full Code Here

Examples of org.fenixedu.academic.dto.person.PersonBean

            return mapping.findForward("open-candidacy-processes-not-found");
        }

        SecondCycleIndividualCandidacyProcessBean bean = new SecondCycleIndividualCandidacyProcessBean();
        bean.setPrecedentDegreeInformation(new PrecedentDegreeInformationBean());
        bean.setPersonBean(new PersonBean());
        bean.setCandidacyProcess(candidacyProcess);
        bean.setPublicCandidacyHashCode(candidacyHashCode);

        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
        bean.getPersonBean().setEmail(candidacyHashCode.getEmail());
View Full Code Here

Examples of org.fenixedu.academic.dto.person.PersonBean

        }

        if (request.getAttribute("individualCandidacyProcessBean") == null) {
            MobilityIndividualApplicationProcessBean bean =
                    new MobilityIndividualApplicationProcessBean(individualCandidacyProcess);
            bean.setPersonBean(new PersonBean(individualCandidacyProcess.getPersonalDetails()));
            request.setAttribute("individualCandidacyProcessBean", bean);
        }

        return mapping.findForward("show-candidacy-details");
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.person.PersonBean

        if (candidacyHashCode == null) {
            return mapping.findForward("open-candidacy-processes-not-found");
        }

        MobilityIndividualApplicationProcessBean bean = new MobilityIndividualApplicationProcessBean(candidacyProcess);
        bean.setPersonBean(new PersonBean());
        bean.getPersonBean().setIdDocumentType(IDDocumentType.FOREIGNER_IDENTITY_CARD);
        bean.setPublicCandidacyHashCode(candidacyHashCode);

        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
        bean.getPersonBean().setEmail(candidacyHashCode.getEmail());
View Full Code Here

Examples of org.fenixedu.academic.dto.person.PersonBean

            ActionForward actionForwardError = verifySubmissionPreconditions(mapping);
            if (actionForwardError != null) {
                return actionForwardError;
            }

            PersonBean personBean = bean.getPersonBean();
            final Set<Person> persons = new HashSet<Person>(Person.readByDocumentIdNumber(personBean.getDocumentIdNumber()));

            if (persons.size() > 1) {
                addActionMessage("individualCandidacyMessages", request, "mobility.error.person.with.same.identifier.exists");
                return prepareEditCandidacyProcess(mapping, form, request, response);
            } else if (persons.size() == 1
View Full Code Here

Examples of org.fenixedu.academic.dto.person.PersonBean

        if (!StringUtils.isEmpty(eIdentifier) && candidacyProcess.getProcessByEIdentifier(eIdentifier) != null) {
            return mapping.findForward("stork-candidacy-already-bounded");
        }

        MobilityIndividualApplicationProcessBean bean = new MobilityIndividualApplicationProcessBean(candidacyProcess);
        bean.setPersonBean(new PersonBean());

        setPersonalFieldsFromStork(attrManagement, eIdentifier, bean);

        request.setAttribute(getIndividualCandidacyProcessBeanName(), bean);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.