Search in sources :

Example 1 with Batch

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

the class AdminBatchView method init.

/**
 * Initialise la vue
 */
@PostConstruct
public void init() {
    /* Style */
    setSizeFull();
    setMargin(true);
    setSpacing(true);
    /* Layout Titre */
    /* Titre */
    Label titleParam = new Label(applicationContext.getMessage("batch.title", null, UI.getCurrent().getLocale()));
    titleParam.addStyleName(StyleConstants.VIEW_TITLE);
    addComponent(titleParam);
    /* Boutons */
    HorizontalLayout buttonsLayout = new HorizontalLayout();
    buttonsLayout.setWidth(100, Unit.PERCENTAGE);
    buttonsLayout.setSpacing(true);
    addComponent(buttonsLayout);
    HorizontalLayout leftButtonsLayout = new HorizontalLayout();
    leftButtonsLayout.setSpacing(true);
    buttonsLayout.addComponent(leftButtonsLayout);
    buttonsLayout.setComponentAlignment(leftButtonsLayout, Alignment.MIDDLE_LEFT);
    btnRefresh.setCaption(applicationContext.getMessage("btnRefresh", null, UI.getCurrent().getLocale()));
    btnRefresh.addClickListener(e -> {
        container.removeAllItems();
        container.addAll(batchController.getBatchs());
    });
    leftButtonsLayout.addComponent(btnRefresh);
    btnEdit.setCaption(applicationContext.getMessage("btnEdit", null, UI.getCurrent().getLocale()));
    btnEdit.setEnabled(false);
    btnEdit.addClickListener(e -> {
        if (batchTable.getValue() instanceof Batch) {
            batchController.editBatch((Batch) batchTable.getValue());
        }
    });
    leftButtonsLayout.addComponent(btnEdit);
    btnHisto.setCaption(applicationContext.getMessage("batch.btnHisto", null, UI.getCurrent().getLocale()));
    btnHisto.setEnabled(false);
    btnHisto.addClickListener(e -> {
        if (batchTable.getValue() instanceof Batch) {
            batchController.showBatchHisto((Batch) batchTable.getValue());
        }
    });
    buttonsLayout.addComponent(btnHisto);
    buttonsLayout.setComponentAlignment(btnHisto, Alignment.MIDDLE_CENTER);
    btnLaunch.setCaption(applicationContext.getMessage("batch.btnLaunch", null, UI.getCurrent().getLocale()));
    btnLaunch.setEnabled(false);
    btnLaunch.addClickListener(e -> {
        if (batchTable.getValue() instanceof Batch) {
            if (batchTable.getValue() != null) {
                if (((Batch) batchTable.getValue()).getTemIsLaunchImediaBatch()) {
                    batchController.cancelRunImmediatly((Batch) batchTable.getValue());
                } else {
                    batchController.runImmediatly((Batch) batchTable.getValue());
                }
            }
        }
    });
    buttonsLayout.addComponent(btnLaunch);
    buttonsLayout.setComponentAlignment(btnLaunch, Alignment.MIDDLE_RIGHT);
    /* Table des batchs */
    batchTable.addBooleanColumn(Batch_.tesBatch.getName());
    batchTable.addBooleanColumn(Batch_.temIsLaunchImediaBatch.getName());
    batchTable.addGeneratedColumn(COLONNE_NAME_PROG, new ColumnGenerator() {

        @Override
        public Object generateCell(final Table source, final Object itemId, final Object columnId) {
            final Batch batch = (Batch) itemId;
            return new Label(getLabelProgramme(batch));
        }
    });
    batchTable.addGeneratedColumn(COLONNE_NAME_HISTO, new ColumnGenerator() {

        @Override
        public Object generateCell(final Table source, final Object itemId, final Object columnId) {
            final Batch batch = (Batch) itemId;
            if (batch.getLastBatchHisto() != null) {
                return new Label(getLabelBatchHisto(batch.getLastBatchHisto()), ContentMode.HTML);
            }
            return null;
        }
    });
    batchTable.setSizeFull();
    batchTable.setVisibleColumns((Object[]) BATCH_FIELDS_ORDER);
    for (String fieldName : BATCH_FIELDS_ORDER) {
        batchTable.setColumnHeader(fieldName, applicationContext.getMessage("batch.table." + fieldName, null, UI.getCurrent().getLocale()));
    }
    batchTable.setSortContainerPropertyId(Batch_.codBatch.getName());
    batchTable.setColumnCollapsingAllowed(true);
    batchTable.setColumnReorderingAllowed(true);
    batchTable.setSelectable(true);
    batchTable.setImmediate(true);
    batchTable.addItemSetChangeListener(e -> batchTable.sanitizeSelection());
    batchTable.addValueChangeListener(e -> {
        /* Les boutons d'édition, de programme et de lancement de batch sont actifs seulement si un batch est sélectionnée. */
        boolean batchIsSelected = batchTable.getValue() instanceof Batch;
        btnEdit.setEnabled(batchIsSelected);
        btnHisto.setEnabled(batchIsSelected);
        btnLaunch.setEnabled(batchIsSelected);
        if (batchTable.getValue() != null) {
            if (((Batch) batchTable.getValue()).getTemIsLaunchImediaBatch()) {
                btnLaunch.setCaption(applicationContext.getMessage("batch.btnLaunch.cancel", null, UI.getCurrent().getLocale()));
            } else {
                btnLaunch.setCaption(applicationContext.getMessage("batch.btnLaunch", null, UI.getCurrent().getLocale()));
            }
        }
    });
    batchTable.addItemClickListener(e -> {
        if (e.isDoubleClick()) {
            batchTable.select(e.getItemId());
            btnEdit.click();
        }
    });
    addComponent(batchTable);
    setExpandRatio(batchTable, 1);
    /* Le panel d'info en dessous */
    addComponent(new BatchRunLayout());
    /* Inscrit la vue aux mises à jour de batchs */
    batchEntityPusher.registerEntityPushListener(this);
}
Also used : BatchRunLayout(fr.univlorraine.ecandidat.vaadin.components.BatchRunLayout) Table(com.vaadin.ui.Table) ColumnGenerator(com.vaadin.ui.Table.ColumnGenerator) Batch(fr.univlorraine.ecandidat.entities.ecandidat.Batch) Label(com.vaadin.ui.Label) HorizontalLayout(com.vaadin.ui.HorizontalLayout) PostConstruct(javax.annotation.PostConstruct)

Example 2 with Batch

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

the class BatchController method checkBatchRun.

/**
 * Vérifie si un batch doit etre lancé depuis la dernière date de verification
 */
@Scheduled(fixedDelayString = "${batch.fixedRate}")
public void checkBatchRun() {
    if (!loadBalancingController.isLoadBalancingCandidatMode()) {
        final List<BatchRun> liste = batchRunRepository.findAll();
        if (liste != null && liste.size() == 1) {
            final BatchRun lastBatchRun = liste.get(0);
            final List<Batch> listeBatch = batchRepository.findByTesBatch(true);
            logger.trace("Vérification lancement lastChek = " + lastBatchRun.getDatLastCheckRun() + " - Now = " + LocalDateTime.now());
            /* Suppression du dernier batch run */
            nettoyageBatchRun();
            listeBatch.forEach(batch -> {
                final BatchHisto histo = batchHistoRepository.findByBatchCodBatchAndStateBatchHisto(batch.getCodBatch(), ConstanteUtils.BATCH_RUNNING);
                if (histo == null && isNeededToLaunch(batch, lastBatchRun.getDatLastCheckRun())) {
                    logger.debug("Le batch " + batch.getCodBatch() + " doit être lancé");
                    runJob(batch);
                }
            });
        } else {
            nettoyageBatchRun();
        }
    }
}
Also used : Batch(fr.univlorraine.ecandidat.entities.ecandidat.Batch) BatchHisto(fr.univlorraine.ecandidat.entities.ecandidat.BatchHisto) BatchRun(fr.univlorraine.ecandidat.entities.ecandidat.BatchRun) Scheduled(org.springframework.scheduling.annotation.Scheduled)

Example 3 with Batch

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

the class NomenclatureController method majBatch.

/**
 * Mise à jour d'un batch
 * @param batch
 */
private void majBatch(Batch batch) {
    final Batch batchLoad = batchRepository.findOne(batch.getCodBatch());
    if (batchLoad == null) {
        batch = batchRepository.saveAndFlush(batch);
    } else {
        batchLoad.setLibBatch(batch.getLibBatch());
        batchRepository.saveAndFlush(batchLoad);
    }
}
Also used : Batch(fr.univlorraine.ecandidat.entities.ecandidat.Batch)

Example 4 with Batch

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

the class NomenclatureController method nomenclatureBatchs.

/**
 * Met à jours les batchs
 * @param locale
 */
private void nomenclatureBatchs(final Locale locale) {
    /* Batch */
    majBatch(new Batch(NomenclatureUtils.BATCH_SI_SCOL, applicationContext.getMessage("nomenclature.batch.apo.libelle", null, locale), 23, 00));
    majBatch(new Batch(NomenclatureUtils.BATCH_APP_EN_MAINT, applicationContext.getMessage("nomenclature.batch.maintenance", null, locale), 22, 55));
    majBatch(new Batch(NomenclatureUtils.BATCH_APP_EN_SERVICE, applicationContext.getMessage("nomenclature.batch.enservice", null, locale), 23, 30));
    majBatch(new Batch(NomenclatureUtils.BATCH_NETTOYAGE_CPT, applicationContext.getMessage("nomenclature.batch.cptmin", null, locale), 22, 30));
    majBatch(new Batch(NomenclatureUtils.BATCH_NETTOYAGE, applicationContext.getMessage("nomenclature.batch.netoyage.libelle", null, locale), true, true, true, true, true, true, true, 22, 00));
    majBatch(new Batch(NomenclatureUtils.BATCH_ARCHIVAGE, applicationContext.getMessage("nomenclature.batch.archivage", null, locale), 22, 30));
    majBatch(new Batch(NomenclatureUtils.BATCH_SYNCHRO_LIMESURVEY, applicationContext.getMessage("nomenclature.batch.limesurvey", null, locale), 22, 30));
    majBatch(new Batch(NomenclatureUtils.BATCH_DESTRUCT_DOSSIER, applicationContext.getMessage("nomenclature.batch.destruct", null, locale), 22, 30));
    majBatch(new Batch(NomenclatureUtils.BATCH_ASYNC_OPI, applicationContext.getMessage("nomenclature.batch.async.opi", null, locale), 22, 30));
    majBatch(new Batch(NomenclatureUtils.BATCH_ASYNC_OPI_PJ, applicationContext.getMessage("nomenclature.batch.async.opi.pj", null, locale), 22, 45));
    majBatch(new Batch(NomenclatureUtils.BATCH_DESTRUCT_HISTO, applicationContext.getMessage("nomenclature.batch.keep.histo", null, locale), true, true, true, true, true, true, true, 23, 00));
    majBatch(new Batch(NomenclatureUtils.BATCH_DESIST_AUTO, applicationContext.getMessage("nomenclature.batch.desist.auto", null, locale), true, true, true, true, true, true, true, 23, 15));
    majBatch(new Batch(NomenclatureUtils.BATCH_RELANCE_FAVO, applicationContext.getMessage("nomenclature.batch.relance.favo", null, locale), true, true, true, true, true, true, true, 23, 30));
    majBatch(new Batch(NomenclatureUtils.BATCH_CALCUL_RANG_LC, applicationContext.getMessage("nomenclature.batch.calcul.rang.lc", null, locale), true, true, true, true, true, true, true, 23, 45));
    if (demoController.getDemoMode()) {
        majBatch(new Batch(NomenclatureUtils.BATCH_DEMO, applicationContext.getMessage("nomenclature.batch.demo.libelle", null, locale), true, true, true, true, true, true, true, 23, 55));
    }
}
Also used : Batch(fr.univlorraine.ecandidat.entities.ecandidat.Batch)

Example 5 with Batch

use of fr.univlorraine.ecandidat.entities.ecandidat.Batch 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)

Aggregations

Batch (fr.univlorraine.ecandidat.entities.ecandidat.Batch)5 BatchHisto (fr.univlorraine.ecandidat.entities.ecandidat.BatchHisto)2 HorizontalLayout (com.vaadin.ui.HorizontalLayout)1 Label (com.vaadin.ui.Label)1 Table (com.vaadin.ui.Table)1 ColumnGenerator (com.vaadin.ui.Table.ColumnGenerator)1 BatchRun (fr.univlorraine.ecandidat.entities.ecandidat.BatchRun)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 I18n (fr.univlorraine.ecandidat.entities.ecandidat.I18n)1 I18nTraduction (fr.univlorraine.ecandidat.entities.ecandidat.I18nTraduction)1 Mail (fr.univlorraine.ecandidat.entities.ecandidat.Mail)1 Parametre (fr.univlorraine.ecandidat.entities.ecandidat.Parametre)1 SchemaVersion (fr.univlorraine.ecandidat.entities.ecandidat.SchemaVersion)1 TypeDecision (fr.univlorraine.ecandidat.entities.ecandidat.TypeDecision)1 TypeTraduction (fr.univlorraine.ecandidat.entities.ecandidat.TypeTraduction)1 Version (fr.univlorraine.ecandidat.entities.ecandidat.Version)1 RealeaseVersion (fr.univlorraine.ecandidat.utils.migration.RealeaseVersion)1 BatchRunLayout (fr.univlorraine.ecandidat.vaadin.components.BatchRunLayout)1