// Path: libreplan-business/src/main/java/org/libreplan/business/settings/entities/Language.java
// public enum Language {
// 
//     BROWSER_LANGUAGE(_("Use browser language configuration"), null),
//     GALICIAN_LANGUAGE("Galego", new Locale("gl")),
//     SPANISH_LANGUAGE("Español", new Locale("es")),
//     ENGLISH_LANGUAGE("English", Locale.ENGLISH),
//     RUSSIAN_LANGUAGE("Pусский", new Locale("ru")),
//     PORTUGUESE_LANGUAGE("Português", new Locale("pt")),
//     ITALIAN_LANGUAGE("Italiano", new Locale("it")),
//     FRENCH_LANGUAGE("Français", new Locale("fr")),
//     DUTCH_LANGUAGE("Nederlands", new Locale("nl")),
//     POLISH_LANGUAGE("Polski", new Locale("pl")),
//     CZECH_LANGUAGE("Čeština", new Locale("cs")),
//     GERMAN_LANGUAGE("Deutsch", new Locale("de")),
//     CATALAN_LANGUAGE("Català", new Locale("ca")),
//     CHINESE_LANGUAGE("中文", new Locale("zh_CN")),
//     NORWEGIAN_LANGUAGE("Norwegian Bokmål", new Locale("nb")),
//     PERSIAN_LANGUAGE("پﺍﺮﺳی", new Locale("fa_IR")),
//     JAPANESE_LANGUAGE("日本語", new Locale("ja")),
//     PORTUGESE_BRAZIL_LANGUAGE("Portugese (Brazil) ", new Locale("pt_BR")),
//     SWEDISCH_LANGUAGE("Svenska", new Locale("sv_SE"));
// 
//     private final String displayName;
// 
//     private Locale locale;
// 
//     private Language(String displayName, Locale locale) {
//         this.displayName = displayName;
//         this.locale = locale;
//     }
// 
//     public String getDisplayName() {
//         return displayName;
//     }
// 
//     public Locale getLocale() {
//         return locale;
//     }
// 
// }


import org.libreplan.business.common.IHumanIdentifiable;
import org.libreplan.business.common.Registry;
import org.libreplan.business.common.entities.Configuration;
import org.libreplan.business.common.exceptions.InstanceNotFoundException;
import org.libreplan.business.labels.entities.Label;
import org.libreplan.business.resources.entities.Criterion;
import org.libreplan.business.resources.entities.Worker;
import org.libreplan.business.scenarios.entities.Scenario;
import org.libreplan.business.settings.entities.Language;
import org.libreplan.business.users.daos.IUserDAO;
import static org.libreplan.business.i18n.I18nHelper._;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.validation.constraints.AssertTrue;
import org.hibernate.validator.constraints.NotEmpty;
import org.libreplan.business.common.BaseEntity;
/*
 * This file is part of LibrePlan
 *
 * Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e
 *                         Desenvolvemento Tecnolóxico de Galicia
 * Copyright (C) 2010-2013 Igalia, S.L.
 *
 * This program is free software: you can redistribute it and/or modify
 * it 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.
 *
 * This program 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
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.libreplan.business.users.entities;




/**
 * Entity for modeling a user.
 *
 * @author Fernando Bellas Permuy <fbellas@udc.es>
 * @author Jacobo Aragunde Perez <jaragunde@igalia.com>
 * @author Cristina Alvarino Perez <cristina.alvarino@comtecsf.es>
 * @author Ignacio Diaz Teijido <ignacio.diaz@comtecsf.es>
 * @author Manuel Rego Casasnovas <rego@igalia.com>
 * @author Javier Moran Rua <jmoran@igalia.com>
 * @author Lorenzo Tilve Álvaro <ltilve@igalia.com>
 */
public class User extends BaseEntity implements IHumanIdentifiable{

    private String loginName = "";

    private String password = "";

// Path: libreplan-business/src/main/java/org/libreplan/business/settings/entities/Language.java
// public enum Language {
// 
//     BROWSER_LANGUAGE(_("Use browser language configuration"), null),
//     GALICIAN_LANGUAGE("Galego", new Locale("gl")),
//     SPANISH_LANGUAGE("Español", new Locale("es")),
//     ENGLISH_LANGUAGE("English", Locale.ENGLISH),
//     RUSSIAN_LANGUAGE("Pусский", new Locale("ru")),
//     PORTUGUESE_LANGUAGE("Português", new Locale("pt")),
//     ITALIAN_LANGUAGE("Italiano", new Locale("it")),
//     FRENCH_LANGUAGE("Français", new Locale("fr")),
//     DUTCH_LANGUAGE("Nederlands", new Locale("nl")),
//     POLISH_LANGUAGE("Polski", new Locale("pl")),
//     CZECH_LANGUAGE("Čeština", new Locale("cs")),
//     GERMAN_LANGUAGE("Deutsch", new Locale("de")),
//     CATALAN_LANGUAGE("Català", new Locale("ca")),
//     CHINESE_LANGUAGE("中文", new Locale("zh_CN")),
//     NORWEGIAN_LANGUAGE("Norwegian Bokmål", new Locale("nb")),
//     PERSIAN_LANGUAGE("پﺍﺮﺳی", new Locale("fa_IR")),
//     JAPANESE_LANGUAGE("日本語", new Locale("ja")),
//     PORTUGESE_BRAZIL_LANGUAGE("Portugese (Brazil) ", new Locale("pt_BR")),
//     SWEDISCH_LANGUAGE("Svenska", new Locale("sv_SE"));
// 
//     private final String displayName;
// 
//     private Locale locale;
// 
//     private Language(String displayName, Locale locale) {
//         this.displayName = displayName;
//         this.locale = locale;
//     }
// 
//     public String getDisplayName() {
//         return displayName;
//     }
// 
//     public Locale getLocale() {
//         return locale;
//     }
// 
// }


// Path: libreplan-business/src/main/java/org/libreplan/business/users/entities/User.java
import org.libreplan.business.common.IHumanIdentifiable;
import org.libreplan.business.common.Registry;
import org.libreplan.business.common.entities.Configuration;
import org.libreplan.business.common.exceptions.InstanceNotFoundException;
import org.libreplan.business.labels.entities.Label;
import org.libreplan.business.resources.entities.Criterion;
import org.libreplan.business.resources.entities.Worker;
import org.libreplan.business.scenarios.entities.Scenario;
import org.libreplan.business.settings.entities.Language;
import org.libreplan.business.users.daos.IUserDAO;
import static org.libreplan.business.i18n.I18nHelper._;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.validation.constraints.AssertTrue;
import org.hibernate.validator.constraints.NotEmpty;
import org.libreplan.business.common.BaseEntity;

/*
 * This file is part of LibrePlan
 *
 * Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e
 *                         Desenvolvemento Tecnolóxico de Galicia
 * Copyright (C) 2010-2013 Igalia, S.L.
 *
 * This program is free software: you can redistribute it and/or modify
 * it 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.
 *
 * This program 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
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.libreplan.business.users.entities;




/**
 * Entity for modeling a user.
 *
 * @author Fernando Bellas Permuy <fbellas@udc.es>
 * @author Jacobo Aragunde Perez <jaragunde@igalia.com>
 * @author Cristina Alvarino Perez <cristina.alvarino@comtecsf.es>
 * @author Ignacio Diaz Teijido <ignacio.diaz@comtecsf.es>
 * @author Manuel Rego Casasnovas <rego@igalia.com>
 * @author Javier Moran Rua <jmoran@igalia.com>
 * @author Lorenzo Tilve Álvaro <ltilve@igalia.com>
 */
public class User extends BaseEntity implements IHumanIdentifiable{

    private String loginName = "";

    private String password = "";

    private Language applicationLanguage = Language.BROWSER_LANGUAGE;