Package domain

Examples of domain.PersonalInfo


  protected ModelAndView processFinish(HttpServletRequest request,
      HttpServletResponse response, Object command, BindException be)
      throws Exception {
    Folder folder = (Folder) ((FolderForm) command).getFolder();
    PersonalInfo pi = folder.getPi();

    pi.setState(Folder.FOLDER_SAVED);

    /** Reversing the birth date */
    String[] birthOld = pi.getBirthdate().split("-");
    String birth = birthOld[2] + "-" + birthOld[1] + "-" + birthOld[0];
    pi.setBirthdate(birth);
   
   
   
   
    for (Iterator iter = folder.getPromodetails().iterator(); iter.hasNext();) {
View Full Code Here


    String path = request.getSession().getServletContext().getRealPath(
        "/"+"candidature.properties")
   
    WebgiUser wuser = (WebgiUser) command;
    PersonalInfo pi = pimng.findEP(wuser.getEmail(), wuser.getPassword());
    if (pi == null) {
      model.put("error", "Verifiez vos identifiants.");

      be.rejectValue("email", "email.invalid",
          "Identifiant(s) invalide(s)");
      return showForm(request, response, be);
    } else {

      if (pi.getState().equals(Folder.FOLDER_FINALIZED) || pi.getState().equals(Folder.FOLDER_INCOMPLETE) || pi.getState().equals(Folder.FOLDER_COMPLETE)) {
        String etat = "";
        if(pi.getState().equals(Folder.FOLDER_FINALIZED)){
          etat = "Le secretariat est en attente de votre dossier version papier. Envoyez ce dernier avant la date limite des inscriptions, autrement votre inscription ne sera pas traitee.";
        }else if(pi.getState().equals(Folder.FOLDER_INCOMPLETE)){
          etat = "Le secretariat a recu votre dossier version papier mais il manque certainnes pieces. Un mail vous a ete envoye avec le detail des pieces. Votre dossier sera traite que apres la reception des pieces manquantes.";
        }else{
          etat = "Le secretariat a recu votre dossier version papier. Il est en cours de traitement. Un mail et un courrier vous seront adresses des la prise de une decision.";
        }
        String pdf = pi.getId()+"_"+pi.getLastname()+"_"+pi.getFirstname()+".pdf";
        model.put("etat", etat);
        model.put("pdf",pdf);
        request.getSession(true);
        return new ModelAndView("state",model);
      }
     
     

      if (isClosed(path)){
        model.put("closed", true);
        return new ModelAndView("logout",model);
      }
   
      List choices = cmng.findStudentChoices(pi.getId());

      List promos = pmng.getPromos(pi.getId());

      List skills = skmng.findStudentSkills(pi.getId());

      Folder folder = new Folder(choices, skills);
      folder.initChoices(pi.getId());
      folder.initSkills(pi.getId());

      folder.setPi(pi);

      folder.setPromodetails(promos);
      folder.majPromodetailPositions();
View Full Code Here

  protected ModelAndView onSubmit(HttpServletRequest request,
      HttpServletResponse response, Object command, BindException be)
      throws Exception {
    Map model = new HashMap();
    String email = request.getParameter("email");
    PersonalInfo pi = pimng.findPassForEmail(email);

   
    if (!email.equals("")) {
      if (!email
          .matches("^\\w[_\\-\\.\\w]*\\@\\w[_\\-\\.\\w]*\\.(\\w){2,5}$")) {
        be.rejectValue("email", "email.invalid", "Email invalide");
        return showForm(request, response, be);
      }
    }else{
      ValidationUtils.rejectIfEmpty(be, "email", "email.required",
      "Email requis");
      return showForm(request, response, be);
    }

    if (pi == null) {
      be.rejectValue("email", "email.invalid", "Adresse inconnue");
      return showForm(request, response, be);
    } else {
      String path = request.getSession().getServletContext().getRealPath(
          "/");
      MailSenDer ms = new MailSenDer(path + "mail.properties");
      ms.senLostPass(email, pi.getLastname() + " " + pi.getFirstname(),
          pi.getPassword());
      model.put("email", email);
      return new ModelAndView("pass-sent", model);
    }

  }
View Full Code Here

          newAdmit.setState(Folder.FOLDER_ACCEPTED);
          remonte = foldermanager.storeAdvancement(pi_first, newAdmit, f);
          /* If correctly transfered from complementary to principal list */
          if(remonte != 0){
            /* Sending email to the new accepted */
            PersonalInfo personalInfo = foldermanager.findPersonalInfoById(pi_first);
            String responsableEmail = (String)foldermanager.findResponsableEmailByFormation(f.getId()).get(0);
            String path = request.getSession().getServletContext().getRealPath("/");
            MailSenDer md = new MailSenDer(path + "mail.properties");
            String mail = md.sendEvolutionComplementaryToPrincipalListMail(personalInfo.getEmail(),personalInfo.getLastname()+" "+personalInfo.getFirstname(), responsableEmail, f.getLabel());
            if(!mail.equals("")){
              envoieNonReussit.add(mail);
            }
          }
          remonte = 0;
View Full Code Here

  protected void postProcessPage(HttpServletRequest request, Object command,
      Errors errors, int page) throws Exception {

    FolderForm ff = (FolderForm) command;
    Folder folder = ff.getFolder();
    PersonalInfo pi = folder.getPi();
    Promodetail current = folder.getCurrentPromoDetail();
    String delete = request.getParameter("del");
    String action = request.getParameter("action");
    String todelete = request.getParameter("delCV");

    if (page == 0) {

      if (!pi.getEmail().equals("")) {

        if (!pimng.emailIsAvailable(pi.getEmail().trim())) {
          errors.setNestedPath("folder.pi");
          errors.rejectValue("email", "email.invalide",
              "Email existant");
          errors.setNestedPath("");
        }
View Full Code Here

   /**Teste de getByState*/
   public void testGetByState2(){
     
   String pass = "JSLEZNARNF";
   String email="email@email9.com";
   PersonalInfo pi = new PersonalInfo();
   pi.setLastname("LILO");
   pi.setFirstname("Bibo");
   pi.setNationality("ETRANGER");
   pi.setEmail(email);
   pi.setPhone("+3284242942");
   pi.setSex("M");
   pi.setBirthdate("1979-11-13");
   pi.setPassword(pass);
   pi.setState(Folder.FOLDER_FINALIZED);
     
   String pass2 = "JEKEZIBDUE";
   String email2="email@email10.com";
   PersonalInfo pi2 = new PersonalInfo();
   pi2.setLastname("BOBU");
   pi2.setFirstname("Mire");
   pi2.setNationality("FRANCAIS");
   pi2.setEmail(email2);
   pi2.setPhone("+324393829038");
   pi2.setSex("M");
   pi2.setBirthdate("1984-02-14");
   pi2.setPassword(pass2);
   pi2.setState(Folder.FOLDER_FINALIZED);
     
   String pass3 = "JEKEZIBDUE";
   String email3="email@email11.com";
   PersonalInfo pi3 = new PersonalInfo();
   pi3.setLastname("MALLO");
   pi3.setFirstname("Kito");
   pi3.setNationality("ETRANGER");
   pi3.setEmail(email3);
   pi3.setPhone("+3243934738943");
   pi3.setSex("M");
   pi3.setBirthdate("1987-03-15");
   pi3.setPassword(pass3);
   pi3.setState(Folder.FOLDER_SAVED);
     
 
     
     
   /*on store les pis*/
 
View Full Code Here

   /**test de update*/
   public void testUpdate1(){
     
   String pass = "JSLEZNARNF";
   String email="email@email12.com";
   PersonalInfo pi = new PersonalInfo();
   pi.setLastname("KAKU");
   pi.setFirstname("Lion");
   pi.setNationality("ETRANGER");
   pi.setEmail(email);
   pi.setPhone("+328443902232");
   pi.setSex("M");
   pi.setBirthdate("1979-09-24");
   pi.setPassword(pass);
   pi.setState(Folder.FOLDER_FINALIZED);
     
   /*on store les pis*/
   pidao.storePersonalInfo(pi);
     
   /*on recupere le pi et on change le prenom*/
   PersonalInfo pi2 = pidao.getById(pi.getId());
   pi2.setFirstname("Mars");
     
   /*on met a jour avec la methode store*/
   pidao.storePersonalInfo(pi2);
     
   PersonalInfo pi3 = pidao.getById(pi2.getId());
     
   assertTrue(pi3.getFirstname().equals(pi2.getFirstname()) &&
   pi3.getNationality().equals(pi.getNationality()));
   
     
   }
View Full Code Here

   /**test de update*/
   public void testUpdate2(){
     
   String pass = "JSLEBONDNF";
   String email="email@email13.com";
   PersonalInfo pi = new PersonalInfo();
   pi.setLastname("KAKI");
   pi.setFirstname("Twix");
   pi.setNationality("ETRANGER");
   pi.setEmail(email);
   pi.setPhone("+3248390432");
   pi.setSex("M");
   pi.setBirthdate("1979-05-02");
   pi.setPassword(pass);
   pi.setState(Folder.FOLDER_SAVED);
     
   /*on store les pis*/
   pidao.storePersonalInfo(pi);
     
   /*On met a jour l'etat du pi*/
   pidao.updateState(pi.getId(), Folder.FOLDER_FINALIZED);
     
   /*on recupere le pi et on change le prenom*/
   PersonalInfo pi2 = pidao.getById(pi.getId());
     
     
   assertFalse(pi2.getState().equals(Folder.FOLDER_SAVED));
   
     
   }
View Full Code Here

//    }
//  }

  /** Teste la recuperation de l'id */
  public void testID() {
    PersonalInfo pi = new PersonalInfo();
    pi.setLastname("MAHOP");
    pi.setFirstname("Georges");
    pi.setNationality("ETRANGER");
    pi.setEmail("email@email.com");
    pi.setPhone("+329220652");
    pi.setSex("M");
    pi.setBirthdate("1984-08-25");
    pi.setPassword("lililili");

    /* insertion de l'objet personalinfo */
    pidao.storePersonalInfo(pi);

    /* L'id doit etre initialis� */
     assertTrue(pi.getId() != null);
    // dstmanager.rollback();
  }
View Full Code Here

  }
   
   /**Teste la methode getById*/
   public void testGetById(){
 
   PersonalInfo pi = new PersonalInfo();
   pi.setLastname("HAUS");
   pi.setFirstname("MARIE");
   pi.setNationality("ETRANGER");
   pi.setEmail("email@email2.com");
   pi.setPhone("+3292200798");
   pi.setSex("F");
   pi.setBirthdate("1984-06-27");
   pi.setPassword("LOLOPOPOLO");
 
   /*insertion de l'objet personalinfo*/
   pidao.storePersonalInfo(pi);
     
   PersonalInfo pi2 = pidao.getById(pi.getId());
     
   assertTrue(pi.getLastname().equals(pi2.getLastname()) &&
   pi.getEmail().equals(pi2.getEmail()));
 
   }
View Full Code Here

TOP

Related Classes of domain.PersonalInfo

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.