--- /dev/null
+/*******************************************************************************
+ * Copyright � Igor Barma, Alexandre Desoubeaux, Christian Martel, Eric Brun, Mathieu Amblard, Gwenael Gevet, Pierre Guillot, 2012
+ * Copyright Alexandre Desoubeaux, Christian Martel, Cedric Lecarpentier, Alexandre Lefevre, Marc Salvat 2014-2016
+ * Copyright Alexandre Desoubeaux, Christian Martel, Cedric Lecarpentier, Marc Salvat, Marc Suarez, Harifetra Ramamonjy 2017
+ *
+ * This file is part of the work and learning management system Pentila Nero.
+ *
+ * Pentila Nero is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ * - the GNU Lesser General Public License as published by the
+ * Free Software Foundation, either version 3 of the license,
+ * or (at your option) any later version.
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE-PROJECT.txt in the directory of this software
+ * distribution.
+ *
+ * Pentila Nero is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * and the CeCILL-C and the GNU Lesser General Public License along with
+ * Pentila Nero. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ ******************************************************************************/
+package com.pentila.entSavoie.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class UserInformationsUtil {
+
+ /*
+ Scholarship found on national database :
+
+ http://infocentre.pleiade.education.fr/bcn/workspace/viewTable/n/N_REGIME_ELEVE
+ REGIME_ELEVE, LIBELLE_COURT, LIBELLE_LONG, DATE_OUVERTURE, DATE_FERMETURE, DATE_INTERVENTION, NUMERO_COMPTE, GESTION_DIFFUSION, ID, CREATED_AT, UPDATED_AT, N_COMMENTAIRE
+ 0, EXTERN, EXTERNE LIBRE, 25/01/1993, , 30/05/2006, BCNSPN5, 02, 1, , ,
+ 1, EX.SUR, EXTERNE SURVEILLE, 25/01/1993, , 03/05/1996, BCNAG, 02, 2, , ,
+ 2, DP DAN, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT, 25/01/1993, , 13/05/1998, BCNSPN, 02, 3, , ,
+ 3, INTERN, INTERNE DANS L'ETABLISSEMENT, 25/01/1993, , 30/05/2006, BCNSPN5, 02, 4, , ,
+ 4, IN.EX., INTERNE EXTERNE, 25/01/1993, , 03/05/1996, BCNAG, 02, 5, , ,
+ 5, IN.HEB., INTERNE HEBERGE, 25/01/1993, , 20/05/1998, BCNSPN, 02, 6, , ,
+ 6, DP HOR, DEMI-PENSIONNAIRE HORS L'ETABLISSEMENT, 25/01/1993, , 13/05/1998, BCNSPN, 02, 7, , ,
+
+ http://infocentre.pleiade.education.fr/bcn/workspace/viewTable/n/N_REGIME_ELEVE2
+ 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
+ 21, 2, DP 1 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 1, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 1, , ,
+ 22, 2, DP 2 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 2, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 2, , ,
+ 23, 2, DP 3 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 3, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 3, , ,
+ 24, 2, DP 4 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 4, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 4, , ,
+ 25, 2, DP 5 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 5, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 5, , ,
+ 26, 2, DP 6 J, DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 6, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 6, , ,
+ 29, 2, TICKET, DEMI-PENSIONNAIRE AU TICKET, 25/01/1993, , 23/10/2007, BCNSPN5, 02, 7, , ,
+ 31, 3, INT 1J, INTERNE 1 JOUR, 25/01/1993, , 25/04/2006, BCNAG, 02, 8, , ,
+ 32, 3, INT 2J, INTERNE 2 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 9, , ,
+ 33, 3, INT 3J, INTERNE 3 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 10, , ,
+ 34, 3, INT 4J, INTERNE 4 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 11, , ,
+ 35, 3, INT 5J, INTERNE 5 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 12, , ,
+ 36, 3, INT 6J, INTERNE 6 JOURS, 25/01/1993, , 25/04/2006, BCNAG, 02, 13, , ,
+ 38, 3, 1/2 INT, DEMI INTERNE, 25/01/1993, , 25/04/2006, BCNAG, 02, 14, , ,
+ 39, 3, INT WE, INTERNE WEEK END, 25/01/1993, , 25/04/2006, BCNAG, 02, 15, , ,
+ */
+
+ public static List<String> getSemiPensionScholarshipLabels() {
+ List<String> semiScholarshipLabels = new ArrayList<String>();
+ semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT");
+ semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 1");
+ semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 2");
+ semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 3");
+ semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 4");
+ semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 5");
+ semiScholarshipLabels.add("DEMI-PENSIONNAIRE DANS L'ETABLISSEMENT 6");
+ semiScholarshipLabels.add("DEMI-PENSIONNAIRE AU TICKET");
+
+ return semiScholarshipLabels;
+ }
+
+ public static List<String> getExternalScholarshipLabels() {
+ List<String> externalScholarshipLabels = new ArrayList<String>();
+ externalScholarshipLabels.add("EXTERNE LIBRE");
+ externalScholarshipLabels.add("EXTERNE SURVEILLE");
+
+ return externalScholarshipLabels;
+ }
+
+ public static List<String> getInternalScholarshipLabels() {
+ List<String> internalScholarshipLabels = new ArrayList<String>();
+ internalScholarshipLabels.add("INTERNE DANS L'ETABLISSEMENT");
+ internalScholarshipLabels.add("INTERNE EXTERNE");
+ internalScholarshipLabels.add("INTERNE HEBERGE");
+ internalScholarshipLabels.add("INTERNE 1 JOUR");
+ internalScholarshipLabels.add("INTERNE 2 JOURS");
+ internalScholarshipLabels.add("INTERNE 3 JOURS");
+ internalScholarshipLabels.add("INTERNE 4 JOURS");
+ internalScholarshipLabels.add("INTERNE 5 JOURS");
+ internalScholarshipLabels.add("INTERNE 6 JOURS");
+ internalScholarshipLabels.add("DEMI INTERNE");
+ internalScholarshipLabels.add("INTERNE WEEK END");
+
+ return internalScholarshipLabels;
+ }
+
+ public static boolean isSemiPensionScholarship(String userScholarship) {
+ if (getSemiPensionScholarshipLabels().contains(userScholarship)) {
+ return true;
+ }
+ return false;
+
+ }
+
+ public static boolean isExternalScholarship(String userScholarship) {
+ if (getExternalScholarshipLabels().contains(userScholarship)) {
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean isInternalScholarship(String userScholarship) {
+ if (getInternalScholarshipLabels().contains(userScholarship)) {
+ return true;
+ }
+ return false;
+ }
+
+}