Search in sources :

Example 1 with Mail

use of fr.univlorraine.ecandidat.entities.ecandidat.Mail in project esup-ecandidat by EsupPortail.

the class NomenclatureController method majMail.

/**
 * Mise à jour d'un mail
 * @param  mail
 * @param  content
 * @return         le mail maj
 */
private Mail majMail(Mail mail, String sujet, String content) {
    final Mail mailLoad = mailRepository.findByCodMail(mail.getCodMail());
    if (sujet == null || sujet.equals("")) {
        sujet = mail.getLibMail();
    }
    if (content == null || content.equals("")) {
        content = mail.getLibMail();
    }
    if (mailLoad == null) {
        final TypeTraduction typeTradSujet = typeTraductionRepository.findOne(NomenclatureUtils.TYP_TRAD_MAIL_SUJET);
        final I18n i18nSujetMail = i18nRepository.saveAndFlush(new I18n(typeTradSujet));
        i18nTraductionRepository.saveAndFlush(new I18nTraduction(sujet, i18nSujetMail, cacheController.getLangueDefault()));
        mail.setI18nSujetMail(i18nSujetMail);
        final TypeTraduction typeTradCorps = typeTraductionRepository.findOne(NomenclatureUtils.TYP_TRAD_MAIL_CORPS);
        final I18n i18nCorpsMail = i18nRepository.saveAndFlush(new I18n(typeTradCorps));
        i18nTraductionRepository.saveAndFlush(new I18nTraduction(content, i18nCorpsMail, cacheController.getLangueDefault()));
        mail.setI18nCorpsMail(i18nCorpsMail);
        mail = mailRepository.saveAndFlush(mail);
        return mail;
    } else if (mailLoad.getTemIsModeleMail() && mail.getTemIsModeleMail() && !mailLoad.getLibMail().equals(mail.getLibMail())) {
        mailLoad.setLibMail(mail.getLibMail());
        return mailRepository.saveAndFlush(mailLoad);
    }
    return mailLoad;
}
Also used : Mail(fr.univlorraine.ecandidat.entities.ecandidat.Mail) TypeTraduction(fr.univlorraine.ecandidat.entities.ecandidat.TypeTraduction) I18nTraduction(fr.univlorraine.ecandidat.entities.ecandidat.I18nTraduction) I18n(fr.univlorraine.ecandidat.entities.ecandidat.I18n)

Example 2 with Mail

use of fr.univlorraine.ecandidat.entities.ecandidat.Mail in project esup-ecandidat by EsupPortail.

the class MailController method sendMailByCod.

/**
 * Envoie un mail grace a son code
 * @param cod
 * @param bean
 */
public void sendMailByCod(final String mailAdr, final String cod, final MailBean bean, final Candidature candidature, final String locale) {
    final Mail mail = getMailByCod(cod);
    sendMail(mailAdr, mail, bean, candidature, locale, null);
}
Also used : Mail(fr.univlorraine.ecandidat.entities.ecandidat.Mail)

Example 3 with Mail

use of fr.univlorraine.ecandidat.entities.ecandidat.Mail in project esup-ecandidat by EsupPortail.

the class MailController method editNewMail.

/**
 * Ouvre une fenêtre d'édition d'un nouveau mail.
 */
public void editNewMail(final CentreCandidature ctrCand) {
    final Mail mail = new Mail(userController.getCurrentUserLogin());
    mail.setTesMail(true);
    mail.setCentreCandidature(ctrCand);
    mail.setTypeAvis(tableRefController.getTypeAvisFavorable());
    mail.setI18nCorpsMail(new I18n(i18nController.getTypeTraduction(NomenclatureUtils.TYP_TRAD_MAIL_CORPS)));
    mail.setI18nSujetMail(new I18n(i18nController.getTypeTraduction(NomenclatureUtils.TYP_TRAD_MAIL_SUJET)));
    UI.getCurrent().addWindow(new MailWindow(mail));
}
Also used : Mail(fr.univlorraine.ecandidat.entities.ecandidat.Mail) MailWindow(fr.univlorraine.ecandidat.views.windows.MailWindow) I18n(fr.univlorraine.ecandidat.entities.ecandidat.I18n)

Example 4 with Mail

use of fr.univlorraine.ecandidat.entities.ecandidat.Mail in project esup-ecandidat by EsupPortail.

the class NomenclatureController method cleanNomenclature.

/**
 * Methode permettant de supprimer des élements déja insérés
 */
public void cleanNomenclature() {
    final Version versionNomenclature = versionRepository.findOne(NomenclatureUtils.VERSION_NOMENCLATURE_COD);
    if (versionNomenclature == null) {
        return;
    }
    /* Definition locale */
    final String localFrString = "fr";
    final Locale localFr = new Locale(localFrString);
    final RealeaseVersion vNomenclature = new RealeaseVersion(versionNomenclature.getValVersion());
    // si inferieur a 2.2.0.6
    if (vNomenclature.isLessThan(new RealeaseVersion(NomenclatureUtils.VERSION_NOMENCLATURE_MAJ_2_2_0_6))) {
        /* Suppression du mail de proposition */
        Mail mailLoad = mailRepository.findByCodMail("PROP_CANDIDATURE");
        if (mailLoad != null) {
            mailRepository.delete(mailLoad);
        }
        /* Suppression des codes par domaine : CPT_MIN_ et CANDIDATURE_ */
        mailLoad = mailRepository.findByCodMail("MOD_MAIL_CPT_MIN");
        if (mailLoad != null) {
            mailLoad.setCodMail(NomenclatureUtils.MAIL_CPT_MIN_MOD_MAIL);
            mailRepository.saveAndFlush(mailLoad);
        }
        mailLoad = mailRepository.findByCodMail("ID_OUBLIE");
        if (mailLoad != null) {
            mailLoad.setCodMail(NomenclatureUtils.MAIL_CPT_MIN_ID_OUBLIE);
            mailRepository.saveAndFlush(mailLoad);
        }
        mailLoad = mailRepository.findByCodMail("COMMISSION_PROP");
        if (mailLoad != null) {
            mailLoad.setCodMail("CANDIDATURE_COMMISSION_PROP");
            mailRepository.saveAndFlush(mailLoad);
        }
        mailLoad = mailRepository.findByCodMail("COMMISSION_ANNUL");
        if (mailLoad != null) {
            mailLoad.setCodMail("CANDIDATURE_COMMISSION_ANNUL");
            mailRepository.saveAndFlush(mailLoad);
        }
        mailLoad = mailRepository.findByCodMail("ANNUL_CANDIDATURE");
        if (mailLoad != null) {
            mailLoad.setCodMail(NomenclatureUtils.MAIL_CANDIDATURE_ANNULATION);
            mailRepository.saveAndFlush(mailLoad);
        }
        mailLoad = mailRepository.findByCodMail("CONFIRM_CANDIDATURE");
        if (mailLoad != null) {
            mailLoad.setCodMail(NomenclatureUtils.MAIL_CANDIDATURE_CONFIRM);
            mailRepository.saveAndFlush(mailLoad);
        }
        mailLoad = mailRepository.findByCodMail("DESIST_CANDIDATURE");
        if (mailLoad != null) {
            mailLoad.setCodMail(NomenclatureUtils.MAIL_CANDIDATURE_DESIST);
            mailRepository.saveAndFlush(mailLoad);
        }
        mailLoad = mailRepository.findByCodMail("CANDIDATURE_COMMISSION_PROP");
        if (mailLoad != null) {
            mailLoad.setCodMail(NomenclatureUtils.MAIL_COMMISSION_ALERT_PROPOSITION);
            mailRepository.saveAndFlush(mailLoad);
        }
        mailLoad = mailRepository.findByCodMail("CANDIDATURE_COMMISSION_ANNUL");
        if (mailLoad != null) {
            mailLoad.setCodMail(NomenclatureUtils.MAIL_COMMISSION_ALERT_ANNULATION);
            mailRepository.saveAndFlush(mailLoad);
        }
        mailLoad = mailRepository.findByCodMail("CANDIDATURE_COMMISSION_TRANS");
        if (mailLoad != null) {
            mailLoad.setCodMail(NomenclatureUtils.MAIL_COMMISSION_ALERT_TRANSMISSION);
            mailRepository.saveAndFlush(mailLoad);
        }
        final Parametre paramLoad = parametreRepository.findByCodParam("NB_VOEUX_CTR_MAX");
        if (paramLoad != null) {
            parametreRepository.delete(paramLoad);
        }
        /* Actualisation du code du batch LS */
        final Batch batchLS = batchRepository.findOne("BATCH_SYNC_LIMESURVEY");
        if (batchLS != null) {
            final List<BatchHisto> listeHisto = batchLS.getBatchHistos();
            batchLS.setCodBatch(NomenclatureUtils.BATCH_SYNCHRO_LIMESURVEY);
            final Batch batchLSNew = batchRepository.save(batchLS);
            listeHisto.forEach(e -> {
                final BatchHisto newBatchHisto = e.clone(batchLSNew);
                batchHistoRepository.saveAndFlush(newBatchHisto);
                batchHistoRepository.delete(e);
            });
            batchRepository.delete("BATCH_SYNC_LIMESURVEY");
        }
        /* Correction des accents sur preselection */
        final String oldLower = applicationContext.getMessage("nomenclature.correction.preselection.lower.old", null, localFr);
        final String newLower = applicationContext.getMessage("nomenclature.correction.preselection.lower.new", null, localFr);
        final String oldUpper = applicationContext.getMessage("nomenclature.correction.preselection.upper.old", null, localFr);
        final String newUpper = applicationContext.getMessage("nomenclature.correction.preselection.upper.new", null, localFr);
        // corrige les mails lib + traduction sujet et corps
        final List<Mail> listeMail = mailRepository.findAll();
        listeMail.forEach(mail -> {
            if (mail.getLibMail() != null) {
                Boolean find = false;
                if (mail.getLibMail().contains(oldLower)) {
                    mail.setLibMail(mail.getLibMail().replaceAll(oldLower, newLower));
                    find = true;
                }
                if (mail.getLibMail().contains(oldUpper)) {
                    mail.setLibMail(mail.getLibMail().replaceAll(oldUpper, newUpper));
                    find = true;
                }
                if (find) {
                    mailRepository.save(mail);
                }
                correctionI18n(mail.getI18nCorpsMail(), localFrString, oldLower, newLower);
                correctionI18n(mail.getI18nCorpsMail(), localFrString, oldUpper, newUpper);
                correctionI18n(mail.getI18nSujetMail(), localFrString, oldLower, newLower);
                correctionI18n(mail.getI18nSujetMail(), localFrString, oldUpper, newUpper);
            }
        });
        // corrige les types de decision
        final List<TypeDecision> listeTypeDecision = typeDecisionRepository.findAll();
        listeTypeDecision.forEach(typeDec -> {
            Boolean find = false;
            if (typeDec.getLibTypDec().contains(oldLower)) {
                typeDec.setLibTypDec(typeDec.getLibTypDec().replaceAll(oldLower, newLower));
                find = true;
            }
            if (typeDec.getLibTypDec().contains(oldUpper)) {
                typeDec.setLibTypDec(typeDec.getLibTypDec().replaceAll(oldUpper, newUpper));
                find = true;
            }
            if (find) {
                typeDecisionRepository.save(typeDec);
            }
            correctionI18n(typeDec.getI18nLibTypDec(), localFrString, oldLower, newLower);
            correctionI18n(typeDec.getI18nLibTypDec(), localFrString, oldUpper, newUpper);
        });
    }
    /* Ajout du libellé de la campagne */
    if (vNomenclature.isLessThan(new RealeaseVersion(NomenclatureUtils.VERSION_NOMENCLATURE_MAJ_2_2_0_13))) {
        final List<Campagne> listeCampagne = campagneRepository.findAll();
        listeCampagne.forEach(campagne -> {
            if (campagne.getI18nLibCamp() == null) {
                final TypeTraduction typeTrad = typeTraductionRepository.saveAndFlush(new TypeTraduction(NomenclatureUtils.TYP_TRAD_CAMP_LIB, applicationContext.getMessage("nomenclature.typtrad.campLib", null, new Locale("fr")), 500));
                final I18n i18n = i18nRepository.saveAndFlush(new I18n(typeTrad));
                final I18nTraduction trad = new I18nTraduction(campagne.getLibCamp(), i18n, cacheController.getLangueDefault());
                i18nTraductionRepository.saveAndFlush(trad);
                campagne.setI18nLibCamp(i18n);
                campagneRepository.saveAndFlush(campagne);
            }
        });
    }
    /* On supprime les entrées dans la table de reload car les codes ne sont plus bons */
    if (vNomenclature.isLessThan(new RealeaseVersion(NomenclatureUtils.VERSION_NOMENCLATURE_MAJ_2_2_0_14))) {
        loadBalancingReloadRepository.deleteAllInBatch();
    }
    /* Correction libellé mail oubli */
    if (vNomenclature.isLessThan(new RealeaseVersion(NomenclatureUtils.VERSION_NOMENCLATURE_MAJ_2_2_3_0))) {
        /* Modif libellé du mail d'oubli */
        final Mail mailLoad = mailRepository.findByCodMail(NomenclatureUtils.MAIL_CPT_MIN_ID_OUBLIE);
        if (mailLoad != null) {
            mailLoad.setLibMail(applicationContext.getMessage("nomenclature.mail.idOublie", null, localFr));
            mailRepository.save(mailLoad);
        }
    }
    if (vNomenclature.isLessThan(new RealeaseVersion(NomenclatureUtils.VERSION_NOMENCLATURE_MAJ_2_2_5_1))) {
        /* Ajout de l'info comp de la formation aux i18n */
        final TypeTraduction typeTradForm = typeTraductionRepository.saveAndFlush(new TypeTraduction(NomenclatureUtils.TYP_TRAD_FORM_INFO_COMP, applicationContext.getMessage("nomenclature.typtrad.formInfoComp", null, new Locale("fr")), 5000));
        final List<Formation> listeFormation = formationRepository.findAll();
        listeFormation.forEach(formation -> {
            if (formation.getI18nInfoCompForm() == null && formation.getInfoCompForm() != null) {
                final I18n i18n = i18nRepository.saveAndFlush(new I18n(typeTradForm));
                final I18nTraduction trad = new I18nTraduction(formation.getInfoCompForm(), i18n, cacheController.getLangueDefault());
                i18nTraductionRepository.saveAndFlush(trad);
                formation.setI18nInfoCompForm(i18n);
                formationRepository.saveAndFlush(formation);
            }
        });
        /* Ajout du commentaire retour de la commission aux i18n */
        final TypeTraduction typeTradComm = typeTraductionRepository.saveAndFlush(new TypeTraduction(NomenclatureUtils.TYP_TRAD_COMM_COMMENT_RETOUR, applicationContext.getMessage("nomenclature.typtrad.commCommentRetour", null, new Locale("fr")), 5000));
        final List<Commission> listeCommission = commissionRepository.findAll();
        listeCommission.forEach(commission -> {
            if (commission.getI18nCommentRetourComm() == null && commission.getCommentRetourComm() != null) {
                final I18n i18n = i18nRepository.saveAndFlush(new I18n(typeTradComm));
                final I18nTraduction trad = new I18nTraduction(commission.getCommentRetourComm(), i18n, cacheController.getLangueDefault());
                i18nTraductionRepository.saveAndFlush(trad);
                commission.setI18nCommentRetourComm(i18n);
                commissionRepository.saveAndFlush(commission);
            }
        });
    }
    if (vNomenclature.isLessThan(new RealeaseVersion(NomenclatureUtils.VERSION_NOMENCLATURE_MAJ_2_2_9_1))) {
        // on renomme le parametre COD_SANS_BAC
        final Parametre paramCodSansBac = parametreRepository.findByCodParam("COD_SANS_BAC");
        if (paramCodSansBac != null) {
            final Parametre newParamCodSansBac = new Parametre(NomenclatureUtils.COD_PARAM_SCOL_SISCOL_COD_SANS_BAC, applicationContext.getMessage("parametrage.codParam.siScolCodSansBac", null, localFr), paramCodSansBac.getValParam(), NomenclatureUtils.TYP_PARAM_STRING + "(4)", true, true);
            parametreRepository.save(newParamCodSansBac);
            parametreRepository.delete(paramCodSansBac);
        }
    }
    if (vNomenclature.isLessThan(new RealeaseVersion(NomenclatureUtils.VERSION_NOMENCLATURE_MAJ_2_3_0_0))) {
        // on renomme les codes des paramètres
        /* Paramètres OPI */
        renameCodParam("PREFIXE_OPI", NomenclatureUtils.COD_PARAM_OPI_PREFIXE, localFr);
        renameCodParam("IS_UTILISE_OPI", NomenclatureUtils.COD_PARAM_OPI_IS_UTILISE, localFr);
        renameCodParam("IS_UTILISE_OPI_ADR", NomenclatureUtils.COD_PARAM_OPI_IS_UTILISE_ADR, localFr);
        renameCodParam("NB_OPI_BATCH_MAX", NomenclatureUtils.COD_PARAM_OPI_NB_BATCH_MAX, localFr);
        renameCodParam("IS_UTILISE_OPI_PJ", NomenclatureUtils.COD_PARAM_OPI_IS_UTILISE_PJ, localFr);
        renameCodParam("IS_OPI_IMMEDIAT", NomenclatureUtils.COD_PARAM_OPI_IS_IMMEDIAT, localFr);
        /* Paramètres SVA */
        renameCodParam("ALERT_SVA_DAT", NomenclatureUtils.COD_PARAM_SVA_ALERT_DAT, localFr);
        renameCodParam("ALERT_SVA_DEFINITIF", NomenclatureUtils.COD_PARAM_SVA_ALERT_DEFINITIF, localFr);
        /* Paramètres Compte candidat */
        renameCodParam("PREFIXE_NUM_DOSS_CPT", NomenclatureUtils.COD_PARAM_CANDIDAT_PREFIXE_NUM_DOSS, localFr);
        renameCodParam("NB_JOUR_KEEP_CPT_MIN", NomenclatureUtils.COD_PARAM_CANDIDAT_NB_JOUR_KEEP_CPT_MIN, localFr);
        renameCodParam("IS_INE_OBLI_FR", NomenclatureUtils.COD_PARAM_CANDIDAT_IS_INE_OBLI_FR, localFr);
        renameCodParam("IS_GET_CURSUS_INTERNE", NomenclatureUtils.COD_PARAM_CANDIDAT_IS_GET_CURSUS_INTERNE, localFr);
        renameCodParam("IS_UTILISE_SYNCHRO_INE", NomenclatureUtils.COD_PARAM_CANDIDAT_IS_UTILISE_SYNCHRO_INE, localFr);
        /* Paramètres Candidature */
        renameCodParam("NB_VOEUX_MAX", NomenclatureUtils.COD_PARAM_CANDIDATURE_NB_VOEUX_MAX, localFr);
        renameCodParam("NB_VOEUX_MAX_IS_ETAB", NomenclatureUtils.COD_PARAM_CANDIDATURE_NB_VOEUX_MAX_IS_ETAB, localFr);
        /* Paramètres techniques */
        renameCodParam("FILE_MAX_SIZE", NomenclatureUtils.COD_PARAM_TECH_FILE_MAX_SIZE, localFr);
        renameCodParam("IS_MAINTENANCE", NomenclatureUtils.COD_PARAM_TECH_IS_MAINTENANCE, localFr);
        renameCodParam("IS_UTILISE_DEMAT", NomenclatureUtils.COD_PARAM_TECH_IS_UTILISE_DEMAT, localFr);
        renameCodParam("NB_JOUR_KEEP_HISTO_BATCH", NomenclatureUtils.COD_PARAM_TECH_NB_JOUR_KEEP_HISTO_BATCH, localFr);
        renameCodParam("IS_DEMAT_MAINTENANCE", NomenclatureUtils.COD_PARAM_TECH_IS_DEMAT_MAINTENANCE, localFr);
        /* Paramètres gestionnaire */
        renameCodParam("IS_UTILISE_BLOCAGE_AVIS_MASSE", NomenclatureUtils.COD_PARAM_GEST_IS_UTILISE_BLOCAGE_MASSE, localFr);
        renameCodParam("IS_LETTRE_ADM_APRES_ACCEPT", "GEST_IS_LETTRE_ADM_APRES_ACCEPT", localFr);
        /* Paramètres scol */
        renameCodParam("NB_JOUR_ARCHIVAGE", NomenclatureUtils.COD_PARAM_SCOL_NB_JOUR_ARCHIVAGE, localFr);
        renameCodParam("IS_APPEL", NomenclatureUtils.COD_PARAM_SCOL_IS_APPEL, localFr);
        renameCodParam("GESTION_CANDIDAT_COMM", NomenclatureUtils.COD_PARAM_SCOL_GESTION_CANDIDAT_COMM, localFr);
        renameCodParam("GESTION_CANDIDAT_CTR_CAND", NomenclatureUtils.COD_PARAM_SCOL_GESTION_CANDIDAT_CTR_CAND, localFr);
        renameCodParam("SISCOL_COD_SANS_BAC", NomenclatureUtils.COD_PARAM_SCOL_SISCOL_COD_SANS_BAC, localFr);
        renameCodParam("IS_FORM_COD_APO_OBLI", NomenclatureUtils.COD_PARAM_SCOL_IS_COD_APO_OBLI, localFr);
        /* Paramètres téléchargement multiple */
        renameCodParam("NB_DOSSIER_TELECHARGEMENT_MAX", NomenclatureUtils.COD_PARAM_DOWNLOAD_MULTIPLE_NB_MAX, localFr);
    }
    if (vNomenclature.isLessThan(new RealeaseVersion(NomenclatureUtils.VERSION_NOMENCLATURE_MAJ_2_3_0_5))) {
        // on renomme les codes des paramètres
        renameCodParam("GEST_IS_LETTRE_ADM_APRES_ACCEPT", NomenclatureUtils.COD_PARAM_DOWNLOAD_IS_LETTRE_ADM_APRES_CONFIRM, localFr);
    }
    if (vNomenclature.isLessThan(new RealeaseVersion(NomenclatureUtils.VERSION_NOMENCLATURE_MAJ_2_3_0_6))) {
        // on renomme les codes des paramètres
        renameCodParam("IS_STATUT_ATT_WHEN_CHANGE_TT", NomenclatureUtils.COD_PARAM_SCOL_IS_STATUT_ATT_WHEN_CHANGE_TT, localFr);
    }
}
Also used : Locale(java.util.Locale) TypeDecision(fr.univlorraine.ecandidat.entities.ecandidat.TypeDecision) Commission(fr.univlorraine.ecandidat.entities.ecandidat.Commission) Mail(fr.univlorraine.ecandidat.entities.ecandidat.Mail) Version(fr.univlorraine.ecandidat.entities.ecandidat.Version) RealeaseVersion(fr.univlorraine.ecandidat.utils.migration.RealeaseVersion) SchemaVersion(fr.univlorraine.ecandidat.entities.ecandidat.SchemaVersion) Batch(fr.univlorraine.ecandidat.entities.ecandidat.Batch) TypeTraduction(fr.univlorraine.ecandidat.entities.ecandidat.TypeTraduction) I18nTraduction(fr.univlorraine.ecandidat.entities.ecandidat.I18nTraduction) RealeaseVersion(fr.univlorraine.ecandidat.utils.migration.RealeaseVersion) BatchHisto(fr.univlorraine.ecandidat.entities.ecandidat.BatchHisto) Campagne(fr.univlorraine.ecandidat.entities.ecandidat.Campagne) Formation(fr.univlorraine.ecandidat.entities.ecandidat.Formation) Parametre(fr.univlorraine.ecandidat.entities.ecandidat.Parametre) I18n(fr.univlorraine.ecandidat.entities.ecandidat.I18n)

Example 5 with Mail

use of fr.univlorraine.ecandidat.entities.ecandidat.Mail in project esup-ecandidat by EsupPortail.

the class NomenclatureController method nomenclatureMails.

/**
 * Met à jours tous les mails
 */
private void nomenclatureMails(final Locale locale) {
    /* Les mail de statut de dossier */
    majMail(new Mail(NomenclatureUtils.MAIL_STATUT_AT, applicationContext.getMessage("nomenclature.mail.statut.attente", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.statut.attente.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.statut.attente.content", null, locale));
    majMail(new Mail(NomenclatureUtils.MAIL_STATUT_RE, applicationContext.getMessage("nomenclature.mail.statut.recept", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.statut.recept.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.statut.recept.content", null, locale));
    majMail(new Mail(NomenclatureUtils.MAIL_STATUT_IN, applicationContext.getMessage("nomenclature.mail.statut.incomplet", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.statut.incomplet.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.statut.incomplet.content", null, locale));
    majMail(new Mail(NomenclatureUtils.MAIL_STATUT_CO, applicationContext.getMessage("nomenclature.mail.statut.complet", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.statut.complet.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.statut.complet.content", null, locale));
    /* Mail compte a minima */
    majMail(new Mail(NomenclatureUtils.MAIL_CPT_MIN, applicationContext.getMessage("nomenclature.mail.cptMin", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.cptMin.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.cptMin.content", null, locale));
    /* Mail id oublie */
    majMail(new Mail(NomenclatureUtils.MAIL_CPT_MIN_ID_OUBLIE, applicationContext.getMessage("nomenclature.mail.idOublie", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.idOublie.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.idOublie.content", null, locale));
    /* Mail modif du mail du cptMin */
    majMail(new Mail(NomenclatureUtils.MAIL_CPT_MIN_MOD_MAIL, applicationContext.getMessage("nomenclature.mail.modifmail", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.modifmail.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.modifmail.content", null, locale));
    /* Mail de candidature */
    majMail(new Mail(NomenclatureUtils.MAIL_CANDIDATURE, applicationContext.getMessage("nomenclature.mail.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.candidature.content", null, locale));
    /* Mail proposition */
    // majMail(new Mail(NomenclatureUtils.MAIL_PROP_CANDIDATURE,applicationContext.getMessage("nomenclature.mail.prop.candidature", null,
    // locale),true,true,NomenclatureUtils.USER_NOMENCLATURE,NomenclatureUtils.USER_NOMENCLATURE,null),applicationContext.getMessage("nomenclature.mail.prop.candidature.sujet", null,
    // locale),applicationContext.getMessage("nomenclature.mail.prop.candidature.content", null, locale));
    /* Mail proposition */
    majMail(new Mail(NomenclatureUtils.MAIL_COMMISSION_ALERT_PROPOSITION, applicationContext.getMessage("nomenclature.mail.commission.prop.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.commission.prop.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.commission.prop.candidature.content", null, locale));
    /* Mail d'annulation de candidature */
    majMail(new Mail(NomenclatureUtils.MAIL_CANDIDATURE_ANNULATION, applicationContext.getMessage("nomenclature.mail.annul.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.annul.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.annul.candidature.content", null, locale));
    /* Mail d'annulation de candidature pour la commission */
    majMail(new Mail(NomenclatureUtils.MAIL_COMMISSION_ALERT_ANNULATION, applicationContext.getMessage("nomenclature.mail.commission.annul.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.commission.annul.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.commission.annul.candidature.content", null, locale));
    /* Mail de notification pour la commission lorsqu'un dossier a été transmis */
    majMail(new Mail(NomenclatureUtils.MAIL_COMMISSION_ALERT_TRANSMISSION, applicationContext.getMessage("nomenclature.mail.commission.trans.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.commission.trans.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.commission.trans.candidature.content", null, locale));
    /* Mail de confirmation de candidature */
    majMail(new Mail(NomenclatureUtils.MAIL_CANDIDATURE_CONFIRM, applicationContext.getMessage("nomenclature.mail.confirm.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.confirm.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.confirm.candidature.content", null, locale));
    /* Mail de desistement de candidature */
    majMail(new Mail(NomenclatureUtils.MAIL_CANDIDATURE_DESIST, applicationContext.getMessage("nomenclature.mail.desist.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.desist.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.desist.candidature.content", null, locale));
    /* Mail de desistement de candidature */
    majMail(new Mail(NomenclatureUtils.MAIL_CANDIDATURE_DESIST_AUTO, applicationContext.getMessage("nomenclature.mail.desistAuto.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.desistAuto.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.desistAuto.candidature.content", null, locale));
    /* Mail de modification de code OPI */
    majMail(new Mail(NomenclatureUtils.MAIL_CANDIDATURE_MODIF_COD_OPI, applicationContext.getMessage("nomenclature.mail.modif.opi", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.modif.opi.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.modif.opi.content", null, locale));
    /* Mail type de traitement AD */
    majMail(new Mail(NomenclatureUtils.MAIL_TYPE_TRAIT_AD, applicationContext.getMessage("nomenclature.mail.typetrait.ad", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.typetrait.ad.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.typetrait.ad.content", null, locale));
    /* Mail type de traitement AC */
    majMail(new Mail(NomenclatureUtils.MAIL_TYPE_TRAIT_AC, applicationContext.getMessage("nomenclature.mail.typetrait.ac", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.typetrait.ac.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.typetrait.ac.content", null, locale));
    /* Mail type de traitement AC */
    majMail(new Mail(NomenclatureUtils.MAIL_TYPE_TRAIT_ATT, applicationContext.getMessage("nomenclature.mail.typetrait.att", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.typetrait.att.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.typetrait.att.content", null, locale));
    /* Mail suppression compte */
    majMail(new Mail(NomenclatureUtils.MAIL_CPT_MIN_DELETE, applicationContext.getMessage("nomenclature.mail.cptMin.delete", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.cptMin.delete.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.cptMin.delete.content", null, locale));
    /* Mail relance formulaire */
    majMail(new Mail(NomenclatureUtils.MAIL_CANDIDATURE_RELANCE_FORMULAIRE, applicationContext.getMessage("nomenclature.mail.relance.form", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.relance.form.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.relance.form.content", null, locale));
    /* Mail relance formulaire */
    majMail(new Mail(NomenclatureUtils.MAIL_CANDIDATURE_RELANCE_FAVO, applicationContext.getMessage("nomenclature.mail.relance.favo", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.relance.favo.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.relance.favo.content", null, locale));
    /* Mail d'alerte de desistement de candidature pour la commission */
    majMail(new Mail(NomenclatureUtils.MAIL_COMMISSION_ALERT_DESISTEMENT, applicationContext.getMessage("nomenclature.mail.commission.desist.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.commission.desist.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.commission.desist.candidature.content", null, locale));
    /* Mail d'alerte de passage en liste principale pour la commission */
    majMail(new Mail(NomenclatureUtils.MAIL_COMMISSION_ALERT_LISTE_PRINC, applicationContext.getMessage("nomenclature.mail.commission.listprinc.candidature", null, locale), true, true, NomenclatureUtils.USER_NOMENCLATURE, NomenclatureUtils.USER_NOMENCLATURE, null), applicationContext.getMessage("nomenclature.mail.commission.listprinc.candidature.sujet", null, locale), applicationContext.getMessage("nomenclature.mail.commission.listprinc.candidature.content", null, locale));
}
Also used : Mail(fr.univlorraine.ecandidat.entities.ecandidat.Mail)

Aggregations

Mail (fr.univlorraine.ecandidat.entities.ecandidat.Mail)6 I18n (fr.univlorraine.ecandidat.entities.ecandidat.I18n)3 I18nTraduction (fr.univlorraine.ecandidat.entities.ecandidat.I18nTraduction)2 TypeDecision (fr.univlorraine.ecandidat.entities.ecandidat.TypeDecision)2 TypeTraduction (fr.univlorraine.ecandidat.entities.ecandidat.TypeTraduction)2 Batch (fr.univlorraine.ecandidat.entities.ecandidat.Batch)1 BatchHisto (fr.univlorraine.ecandidat.entities.ecandidat.BatchHisto)1 Campagne (fr.univlorraine.ecandidat.entities.ecandidat.Campagne)1 Commission (fr.univlorraine.ecandidat.entities.ecandidat.Commission)1 Formation (fr.univlorraine.ecandidat.entities.ecandidat.Formation)1 Parametre (fr.univlorraine.ecandidat.entities.ecandidat.Parametre)1 SchemaVersion (fr.univlorraine.ecandidat.entities.ecandidat.SchemaVersion)1 TypeAvis (fr.univlorraine.ecandidat.entities.ecandidat.TypeAvis)1 Version (fr.univlorraine.ecandidat.entities.ecandidat.Version)1 RealeaseVersion (fr.univlorraine.ecandidat.utils.migration.RealeaseVersion)1 MailWindow (fr.univlorraine.ecandidat.views.windows.MailWindow)1 Locale (java.util.Locale)1