1 /*******************************************************************************
2 * Copyright � Igor Barma, Alexandre Desoubeaux, Christian Martel, Eric Brun, Mathieu Amblard, Gwenael Gevet, Pierre Guillot, 2012
3 * Copyright Alexandre Desoubeaux, Christian Martel, Cedric Lecarpentier, Alexandre Lefevre, Marc Salvat 2014-2016
4 * Copyright Alexandre Desoubeaux, Christian Martel, Cedric Lecarpentier, Marc Salvat, Marc Suarez, Harifetra Ramamonjy 2017
6 * This file is part of the work and learning management system Pentila Nero.
8 * Pentila Nero is free software. You can redistribute it and/or modify since
9 * you respect the terms of either (at least one of the both license) :
10 * - under the terms of the GNU Affero General Public License as
11 * published by the Free Software Foundation, either version 3 of the
12 * License, or (at your option) any later version.
13 * - the CeCILL-C as published by CeCILL-C; either version 1 of the
14 * License, or any later version
15 * - the GNU Lesser General Public License as published by the
16 * Free Software Foundation, either version 3 of the license,
17 * or (at your option) any later version.
19 * There are special exceptions to the terms and conditions of the
20 * licenses as they are applied to this software. View the full text of
21 * the exception in file LICENSE-PROJECT.txt in the directory of this software
24 * Pentila Nero is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * Licenses for more details.
29 * You should have received a copy of the GNU Affero General Public License
30 * and the CeCILL-C and the GNU Lesser General Public License along with
31 * Pentila Nero. If not, see :
32 * <http://www.gnu.org/licenses/> and
33 * <http://www.cecill.info/licences.fr.html>.
34 ******************************************************************************/
35 package com.pentila.entSavoie.utils;
37 import java.util.ArrayList;
38 import java.util.List;
40 public class UserInformationsUtil {
43 Scholarship found on national database :
45 http://infocentre.pleiade.education.fr/bcn/workspace/viewTable/n/N_REGIME_ELEVE
46 REGIME_ELEVE, LIBELLE_COURT, LIBELLE_LONG, DATE_OUVERTURE, DATE_FERMETURE, DATE_INTERVENTION, NUMERO_COMPTE, GESTION_DIFFUSION, ID, CREATED_AT, UPDATED_AT, N_COMMENTAIRE
47 0, EXTERN, EXTERNE LIBRE, 25/01/1993, , 30/05/2006, BCNSPN5, 02, 1, , ,
48 1, EX.SUR, EXTERNE SURVEILLE, 25/01/1993, , 03/05/1996, BCNAG, 02, 2, , ,
49 2, DP DAN, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT, 25/01/1993, , 13/05/1998, BCNSPN, 02, 3, , ,
50 3, INTERN, INTERNE DANS L'ETABLISSEMENT, 25/01/1993, , 30/05/2006, BCNSPN5, 02, 4, , ,
51 4, IN.EX., INTERNE EXTERNE, 25/01/1993, , 03/05/1996, BCNAG, 02, 5, , ,
52 5, IN.HEB., INTERNE HEBERGE, 25/01/1993, , 20/05/1998, BCNSPN, 02, 6, , ,
53 6, DP HOR, DEMI-PENSIONNAIRE HORS L'ETABLISSEMENT, 25/01/1993, , 13/05/1998, BCNSPN, 02, 7, , ,
55 http://infocentre.pleiade.education.fr/bcn/workspace/viewTable/n/N_REGIME_ELEVE2
56 REGIME_ELEVE2, REGIME_ELEVE, LIBELLE_COURT, LIBELLE_LONG, DATE_OUVERTURE, DATE_FERMETURE, DATE_INTERVENTION, NUMERO_COMPTE, GESTION_DIFFUSION, ID, CREATED_AT, UPDATED_AT, N_COMMENTAIRE
57 21, 2, DP 1 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 1, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 1, , ,
58 22, 2, DP 2 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 2, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 2, , ,
59 23, 2, DP 3 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 3, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 3, , ,
60 24, 2, DP 4 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 4, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 4, , ,
61 25, 2, DP 5 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 5, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 5, , ,
62 26, 2, DP 6 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 6, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 6, , ,
63 29, 2, TICKET, DEMI-PENSIONNAIRE AU TICKET, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 7, , ,
64 31, 3, INT 1J, INTERNE 1 JOUR, 25/01/1993, , 25/04/2006, BCNAG, 02, 8, , ,
65 32, 3, INT 2J, INTERNE 2 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 9, , ,
66 33, 3, INT 3J, INTERNE 3 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 10, , ,
67 34, 3, INT 4J, INTERNE 4 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 11, , ,
68 35, 3, INT 5J, INTERNE 5 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 12, , ,
69 36, 3, INT 6J, INTERNE 6 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 13, , ,
70 38, 3, 1/2 INT, DEMI INTERNE, 25/01/1993, , 25/04/2006, BCNAG, 02, 14, , ,
71 39, 3, INT WE, INTERNE WEEK END, 25/01/1993, , 25/04/2006, BCNAG, 02, 15, , ,
74 public static List<String> getSemiPensionScholarshipLabels() {
75 List<String> semiScholarshipLabels = new ArrayList<String>();
76 semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT");
77 semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 1");
78 semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 2");
79 semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 3");
80 semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 4");
81 semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 5");
82 semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 6");
83 semiScholarshipLabels.add("DEMI-PENSIONNAIRE AU TICKET");
85 return semiScholarshipLabels;
88 public static List<String> getExternalScholarshipLabels() {
89 List<String> externalScholarshipLabels = new ArrayList<String>();
90 externalScholarshipLabels.add("EXTERNE LIBRE");
91 externalScholarshipLabels.add("EXTERNE SURVEILLE");
93 return externalScholarshipLabels;
96 public static List<String> getInternalScholarshipLabels() {
97 List<String> internalScholarshipLabels = new ArrayList<String>();
98 internalScholarshipLabels.add("INTERNE DANS L'ETABLISSEMENT");
99 internalScholarshipLabels.add("INTERNE EXTERNE");
100 internalScholarshipLabels.add("INTERNE HEBERGE");
101 internalScholarshipLabels.add("INTERNE 1 JOUR");
102 internalScholarshipLabels.add("INTERNE 2 JOURS");
103 internalScholarshipLabels.add("INTERNE 3 JOURS");
104 internalScholarshipLabels.add("INTERNE 4 JOURS");
105 internalScholarshipLabels.add("INTERNE 5 JOURS");
106 internalScholarshipLabels.add("INTERNE 6 JOURS");
107 internalScholarshipLabels.add("DEMI INTERNE");
108 internalScholarshipLabels.add("INTERNE WEEK END");
110 return internalScholarshipLabels;
113 public static boolean isSemiPensionScholarship(String userScholarship) {
114 if (getSemiPensionScholarshipLabels().contains(userScholarship)) {
121 public static boolean isExternalScholarship(String userScholarship) {
122 if (getExternalScholarshipLabels().contains(userScholarship)) {
128 public static boolean isInternalScholarship(String userScholarship) {
129 if (getInternalScholarshipLabels().contains(userScholarship)) {