Package domain

Examples of domain.Formation


    } else if (page == 2) {
      List formations = fmng.getAllFormations();
      model.put("formations", formations);

      List formationsWithNone = fmng.getAllFormations();
      Formation f = new Formation();
      f.setLabel("");
      formationsWithNone.add(0, f);
      model.put("formationsWithNone", formationsWithNone);
    } else if (page == 3) {
      Calendar c = Calendar.getInstance();
      int year = c.get(Calendar.YEAR);
View Full Code Here


      boolean send = true;
     
      for (Iterator iterAdvancements = advancementsInterviews.iterator(); iterAdvancements
          .hasNext();) {
        Advancement advancement = (Advancement) iterAdvancements.next();
        Formation f = (Formation)advancement.getAdvancement().keySet().iterator().next();
        Etat interview = advancement.getAdvancement().get(f);
        boolean convoq = mdInterview.sendInterviewMail(advancement, p, interview);
        send = send && convoq;
        if(!convoq){
          message += advancement.getPi().getEmail()+" ";
View Full Code Here

          List choices = f.getChoices();

          if (choices.size() == 1) {

            Choice c2 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(1, c2);

            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          } else if (choices.size() == 2) {
            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          }
        }

        model.put("folders", finalizedByCandidate);
        link = "wait";

      /* The page of a secretary displaying folders with a paper version received but the version is incomplete, there are some attached documents missing */
      } else if (action.equals("incomplete")) {

        page.add("Secr�tariat : Liste des dossiers papiers incomplets.");
        model.put("page", page);

        /*
         * Liste des dossier ayant recu une version papier mais
         * incomplete
         */
        List<Folder> incomplete = foldermanager.findPersonalInfoByState(Folder.FOLDER_INCOMPLETE);

        for (Folder f : incomplete) {
          List choices = f.getChoices();

          if (choices.size() == 1) {

            Choice c2 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(1, c2);

            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          } else if (choices.size() == 2) {
            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          }
        }

        model.put("folders", incomplete);
        link = "incomplete";

      /* The page of a secretary displaying folders with a paper version received */
      } else if (action.equals("complete")) {

        page.add("Secr�tariat : Liste des dossiers papiers complets.");
        model.put("page", page);

        /* Liste des dossier ayant recu une version papier complete */
        List<Folder> complete = foldermanager.findPersonalInfoByState(Folder.FOLDER_COMPLETE);

        for (Folder f : complete) {
          List choices = f.getChoices();

          if (choices.size() == 1) {

            Choice c2 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(1, c2);

            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          } else if (choices.size() == 2) {
            Choice c3 = new Choice(-1, new Formation(-1, "AUCUN"));
            choices.add(2, c3);

          }
        }

        model.put("folders", complete);
        link = "complete";

      /* The action of a secretary to marque a folder complete */
      } else if (action.endsWith("completed")) {
        id = Integer.parseInt(sId);
        Folder folder = foldermanager.findFolderById(id);
       
        int update = this.foldermanager.updatePersonalInfoState(id, Folder.FOLDER_COMPLETE);
        /*Si update non reussit*/
        if(update==0){
          page.add("Echec");
          message = "Le dossier de " + folder.getPi().getLastname() +" "+folder.getPi().getFirstname()+ " n\'a pas �t� transf�r� aux responsables.";
        }else{
          String path = request.getSession().getServletContext().getRealPath("/");
          MailSenDer msd = new MailSenDer(path + "mail.properties");
          boolean send = msd.sendAccuseDossierPapier(folder.getPi().getEmail(), folder.getPi().getLastname()
              + " " + folder.getPi().getFirstname());
          if(send){
            page.add("Confirmation");
            message = "Le dossier de " + folder.getPi().getLastname() +" "+folder.getPi().getFirstname()+ " a �t� transf�r� aux responsables. Le candidat a �t� notifi�. Vous le trouverez dans la liste des dossiers complets.";
          }else{
            page.add("Confirmation et Echec");
            message = "Le dossier de " + folder.getPi().getLastname() +" "+folder.getPi().getFirstname()+ " a �t� transf�r� aux responsables. Mais le candidat n'a pas �t� notifi�. Vous le trouverez dans la liste des dossiers complets.";
          }
          link = "complete";
        }
        model.put("page", page);
        model.put("message", message);

      /* The action of a secretary to notify a person of the state incomplete of his folder */
      } else if (action.endsWith("notify")) {
        String idtonotif = request.getParameter("id");
       
        page.add("Choisissez les pieces manquantes");

        model.put("idFolderToNotify", idtonotif);
        model.put("page", page);

        return new ModelAndView("secretary-notify", model);

        /* The page of a secretary displaying folders which are accepted for a formation */
      } else if (action.equals("admis")) {

        page.add("Listes principales des candidats");
        model.put("page", page);
       
        List formations = foldermanager.getAllFormations();
        model.put("formations", formations);
       
        for (Iterator iterFormations = formations.iterator(); iterFormations
            .hasNext();) {
         
          Formation formation = (Formation) iterFormations.next();
          List admis = foldermanager.findByStateAndFormation(Folder.FOLDER_ACCEPTED, formation);
          model.put(formation.getLabel(), admis);
          filename="ListePrincipale"+formation.getLabel();
          model.put(filename, filename);
         
        }
        model.put("title", "Action");
        link = "linkAccepted";
        //filename = "Admis";

        /* The page of a secretary displaying folders which are accepted on a complementary liste for a formation */
      }else if (action.equals("complement")) {
       
        page.add("Listes complementaire de candidats");
        model.put("page", page);
       
        List formations = foldermanager.getAllFormations();
        model.put("formations", formations);
       
        for (Iterator iterFormations = formations.iterator(); iterFormations
            .hasNext();) {
         
          Formation formation = (Formation) iterFormations.next();
          List admis = foldermanager.findByStateAndFormation(Folder.FOLDER_COMPLEMENTARY, formation);
          model.put(formation.getLabel(), admis);
          filename="ListeComplementaire"+formation.getLabel();
          model.put(filename, filename);
         
        }
        model.put("title", "Position");
        link = "linkComplementary";
        //filename = "Admis";

        /* The page of notification of all candidates */
      }else if(action.equals("finalmail")){
       
        page.add("Notification finale des candidats par mail");
        model.put("page", page);
        model.put("confirmfinalmail", "confirmfinalmail");
       
        return new ModelAndView("secretary-notify", model);
       
      /* The page of a secretary displaying the processus of change of the password */
      } else if (action.equals("changepass")) {
       
        page.add("Changement du mot de passe");
        model.put("page", page);
        model.put("personnel", p);
        return new ModelAndView("secretary-notify", model);
     
      /* The page of a secretary displaying a detail of a folder */
      } else if (action.equals("edit")) {
        id = new Integer(sId);
        Folder folder = foldermanager.findFolderById(id);
        page.add("Secr�tariat : D�tails pour "
            + folder.getPi().getLastname() + " "
            + folder.getPi().getFirstname());
        model.put("page", page);
        model.put("folder", folder);
       
        /* The action of a secretary which refuses a candidat from a principal list
         * and accepts the first on a complementary list */
      } else if(action.equals("desiste")){
        id = new Integer(sId);
        Advancement desiste = foldermanager.findAdvancementByPersonalInfoIdAndState(id,Folder.FOLDER_ACCEPTED);
        if(desiste!=null){
          page.add("Veuillez choisir la formation pour le d�sistement");
          message = "Vous pouvez d�sister le candidat de plusieurs formations. Attention, le candidat sera refus� pour les formations choisies.";
          model.put("page", page);
          model.put("message", message);
         
          List formations = new ArrayList();
          for (Iterator iterFormations = desiste.getAdvancement().keySet().iterator(); iterFormations.hasNext();) {
            Formation formation = (Formation) iterFormations.next();
            formations.add(formation);
          }
         
          model.put("formationsdesistement", formations);
         
View Full Code Here

      /* For every formation that we want to remove */
      for (int i = 0; i < formations.length; i++) {
       
        String labelidf = formations[i];
        String[] lesdeux = labelidf.split("_");
        Formation f = new Formation();
        f.setId(Integer.parseInt(lesdeux[1]));
        f.setLabel(lesdeux[0]);
       
        Etat e = new Etat();
        e.setState(Folder.FOLDER_REFUSED);
        beforeRefuse = refuse;
       
        /* Refusing the candidate*/
        refuse += foldermanager.storeAdvancement(id, e, f);
        /*If correctly refused*/
        if(beforeRefuse!=refuse){
          /*Moving the first on the complementary list to the principal list */
          int pi_first = foldermanager.findPersonalInfoByFormationAndComplementaryPosition(f.getId());
         
          Etat newAdmit = new Etat();
          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

    } else if (page == 1) {
      List formations = fmng.getAllFormations();
      model.put("formations", formations);

      List formationsWithNone = fmng.getAllFormations();
      Formation f = new Formation();
      f.setLabel("");
      formationsWithNone.add(0, f);
      model.put("formationsWithNone", formationsWithNone);

    } else if (page == 2) {
View Full Code Here

TOP

Related Classes of domain.Formation

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.