Package domain

Examples of domain.Personnel


   
    HttpSession session = request.getSession(false);
    if(session == null){
      return new ModelAndView("logout-personnel");
    }
    Personnel p = (Responsable)session.getAttribute("responsable");
   
    if(p==null)
      return new ModelAndView("logout-personnel");
   
    String link = null;
   
    String message = null;
   
    ModelAndView mav = null;
   
    Map model = new HashMap();
   
    String filename=null;
    String action = request.getParameter("action");
    String sId = request.getParameter("id");
    int id ;
   
    List page = new ArrayList();
   
    if (action == null) {
      page.add("Accueil "+p.getFormation().getLabel());
      model.put("page", page);
     
      Integer admis = foldermanager.getAdvancementdao().getCountAdvancementByStateAndFormation(Folder.FOLDER_ACCEPTED, p.getFormation().getId());
      model.put("countadmis", admis);

      Integer complementary = foldermanager.getAdvancementdao().getCountAdvancementByStateAndFormation(Folder.FOLDER_COMPLEMENTARY, p.getFormation().getId());
      model.put("countcomplementary", complementary);

      Integer interviews = foldermanager.getAdvancementdao().getCountAdvancementByStateAndFormation(Folder.FOLDER_INTERVIEW, p.getFormation().getId());
      model.put("countinterview", interviews);
     
      Integer refused = foldermanager.getAdvancementdao().getCountAdvancementByStateAndFormation(Folder.FOLDER_REFUSED, p.getFormation().getId());
      model.put("countrefused", refused);
     
      mav = new ModelAndView("responsable",model);
   
    }else if(action.equals("logout")){
     
      return new ModelAndView("logout-personnel");
    } else {

      if (action.equals("choix1")){
        page.add(p.getFormation().getLabel()+" : Liste des premiers choix.");
        model.put("page", page);
        List choix1 = foldermanager.findPersonalInfoByChoice(p.getFormation().getId(), 1);
        model.put("folders", choix1);
        link = "linkNotTreated";
       
      }else if(action.equals("choix2")){
        page.add(p.getFormation().getLabel()+" : Liste des seconds choix.");
        model.put("page", page);
        List choix2 = foldermanager.findPersonalInfoByChoice(p.getFormation().getId(), 2);
        model.put("folders", choix2);
        link = "linkNotTreated";
       
      }else if(action.equals("choix3")){
        page.add(p.getFormation().getLabel()+" : Liste des troisiemes choix.");
        model.put("page", page);
        List choix3 = foldermanager.findPersonalInfoByChoice(p.getFormation().getId(), 3);
        model.put("folders", choix3);
        link = "linkNotTreated";
       
      }else if(action.equals("admis")){
        page.add(p.getFormation().getLabel()+" : Liste des �tudiants admis");
        model.put("page", page);
        List admis = foldermanager.findByStateAndFormation(Folder.FOLDER_ACCEPTED, p.getFormation());//findPersonalInfoByChoice(1, 1);
        link = "linkAccepted";
        filename="Admis";
        model.put("admis", admis);
       
      }else if(action.equals("interview")){
        page.add(p.getFormation().getLabel()+" : Liste des �tudiants en entretient.");
        model.put("page", page);
        List interviews = foldermanager.findByStateAndFormation(Folder.FOLDER_INTERVIEW, p.getFormation());//findPersonalInfoByChoice(1, 1);
        model.put("entretiens", interviews);
        link = "linkInterview";
        filename="Entretiens";
      }else if(action.equals("attente")){
        page.add(p.getFormation().getLabel()+" : Liste des �tudiants sur liste compl�mentaire.");
        model.put("page", page);
        List attente = foldermanager.findByStateAndFormation(Folder.FOLDER_COMPLEMENTARY, p.getFormation());//findPersonalInfoByChoice(1, 1);
        model.put("complementary", attente);
        link = "linkComplement";
        filename="ListeComplementaire";
      }else if(action.equals("refused")){
        page.add(p.getFormation().getLabel()+" : Liste des �tudiants refus�s.");
        model.put("page", page);
        List refused = foldermanager.findByStateAndFormation(Folder.FOLDER_REFUSED, p.getFormation());//findPersonalInfoByChoice(1, 1);
        model.put("refused", refused);
        link = "linkRefused";
        filename="Refuses";
      }else if (action.equals("edit")){
        id = new Integer(sId);
        Folder folder = foldermanager.findFolderById(id);
        page.add(p.getFormation().getLabel()+" : D�tails pour "+folder.getPi().getLastname()+" "+folder.getPi().getFirstname());
        model.put("page",page);
        model.put("folder", folder);
      }else if (action.equals("admit")){
        id = new Integer(sId);
        Etat etat = new Etat();
        etat.setState(Folder.FOLDER_ACCEPTED);
        this.foldermanager.storeAdvancement(id,etat, p.getFormation());
      //  foldermanager.updatePersonalInfoState(id, Folder.FOLDER_TREATED);
        message = "Le dossier numero "+id+" a ete admit en liste principale.";
        page.add("Confirmation");
        model.put("page",page);
      }else if (action.equals("complement")){
        id = new Integer(sId);
        Etat etat = new Etat();
        etat.setState(Folder.FOLDER_COMPLEMENTARY);
//         A MODIFIER
        //etat.setComplemantary_pos(1);
        this.foldermanager.storeAdvancement(id, etat, p.getFormation());
      //  foldermanager.updatePersonalInfoState(id, Folder.FOLDER_TREATED);
        page.add("Confirmation");
        model.put("page",page);
        message = "Le dossier numero "+id+" a ete admit en liste complementaire.";
      }else if (action.equals("tointerview")){
        id = new Integer(sId);
        Etat etat = new Etat();
        etat.setState(Folder.FOLDER_INTERVIEW);
        // A MODIFIER
        etat.setInterview("demain");
        this.foldermanager.storeAdvancement(id, etat, p.getFormation());
      //  foldermanager.updatePersonalInfoState(id, Folder.FOLDER_TREATED);
        page.add("Confirmation");
        model.put("page",page);
        message = "Le dossier num�rot� "+id+" a ete convoquee en entretien.";
      }else if (action.equals("refuse")){
        id = new Integer(sId);
        Etat etat = new Etat();
        etat.setState(Folder.FOLDER_REFUSED);
        this.foldermanager.storeAdvancement(id, etat, p.getFormation());
      //  foldermanager.updatePersonalInfoState(id, Folder.FOLDER_TREATED);
        page.add("Confirmation");
        model.put("page",page);
        message = "Le dossier numero "+id+" a ete refuse.";
     
      /* 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);
        model.put("changepass", "changepass");
        return new ModelAndView("responsable", model);
      }else if(action.equals("retirer")){
        id = new Integer(sId);
        int res = foldermanager.removeAdvancement(id, p.getFormation().getId());
        if(res == 1){
          page.add("Confirmation");
          model.put("page",page);
          message = "Le dossier numero "+id+" a ete retire de la liste principale.";
        }else{
View Full Code Here


    HttpSession session = request.getSession(false);
    if (session == null) {
      return new ModelAndView("logout-personnel");
    }
   
    Personnel p = (Responsable) session.getAttribute("responsable");

    if (p == null)
      return new ModelAndView("logout-personnel");



    String message = null;

    List page = new ArrayList();

    Map model = new HashMap();

    String changepass = request.getParameter("changepass");
    String complementaryButon = request.getParameter("complementaryButon");
    String interviewButon = request.getParameter("interviewButon");
    String convocationButon = request.getParameter("convocationButon");
   
    if (changepass != null) {
      System.out.println("On entre dans le changement du mot de passe");
      String newpass1 = request.getParameter("newpass1");
      String newpass2 = request.getParameter("newpass2");
      Personnel personnel = (Responsable) session.getAttribute("responsable");
      if (newpass1.equals(newpass2)) {
        personnel.setPassword(newpass1);
        boolean update = foldermanager
            .updatePersonnelPassword(personnel);
        if (update) {
          message = "Le mot de passe a �t� chang�";
          page.add("Confirmation");
View Full Code Here

   
    /* If session expired -> login */
    if (session == null) {
      return new ModelAndView("logout-personnel");
    }
    Personnel p = (Secretary) session.getAttribute("secretary");

    if (p == null)
      return new ModelAndView("logout-personnel");

    /* le nom de methode dans le decorator qui va afficher les actions possibles sur une ligne d'un display tag*/
 
View Full Code Here

   
    HttpSession session = request.getSession(false);
    if (session == null) {
      return new ModelAndView("logout-personnel");
    }
    Personnel p = (Secretary) session.getAttribute("secretary");

    if (p == null)
      return new ModelAndView("logout-personnel");

   
    String link = null;

    String message = null;

    ModelAndView mav = null;
    List page = new ArrayList();

    Map model = new HashMap();
    /* Recuperation de toutes les checkbox portant le nom piece */
    String[] pieces = RequestUtils.getStringParameters(request, "piece");
   
    /* L'id recupere du formulaire */
    String sId = request.getParameter("id");

    /* Recuperation de differents boutons */
    String changepass = request.getParameter("changepass");
   
    String finalmail = request.getParameter("sendFinalMailButon");
   
    String desistement = request.getParameter("desisterformationsbuton");
   
    /* Recuperation de toutes les checkbox portant le nom formation */
    String[] formations = RequestUtils.getStringParameters(request, "formation");
   
   
    /* Si c'est le bouton changepass qui a ete enclanche */
    if (changepass != null) {
     
      String newpass1 = request.getParameter("newpass1");
      String newpass2 = request.getParameter("newpass2");
     
      /* Les deux nouveaux mot de passes sont egaux? */
      if (newpass1.equals(newpass2)) {
        p.setPassword(newpass1);
        /* On update le mot de passe dans la base de donnes */
        boolean update = foldermanager.updatePersonnelPassword(p);
        if (update) {
          message = "Le mot de passe a �t� chang�";
          page.add("Confirmation");
View Full Code Here

    if(login == null || password == null || login.equals("") || password.equals("")){
      be.rejectValue("login", "login.valide","Tous les champs sont obligatoires");
      return showForm(request,response,be);
    }
   
    Personnel pers = this.pmng.findByLoginAndPassword(login, password);
    if(pers == null){
      be.rejectValue("login", "login.valide","Identifiant(s) invalide(s)");
      return showForm(request,response,be);
    }else if (pers.getClass().isAssignableFrom(Responsable.class)){
      session.setAttribute("responsable", pers);
    }else if(pers.getClass().isAssignableFrom(Secretary.class)){
      session.setAttribute("secretary", pers);
    }
    //System.out.println(password);
    mav = new ModelAndView("login-ok");
    return mav;
View Full Code Here

TOP

Related Classes of domain.Personnel

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.