/** * This file is part of Faktotum. * * * Faktotum is free software: you can redistribute it and/or * modify it under the terms of 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. * * Faktotum 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with Faktotum. * * If not, see <http://www.gnu.org/licenses/>. */ package de.romankreisel.faktotum.handlers; import java.util.Date; import javax.ejb.EJB; import javax.faces.bean.ApplicationScoped; import javax.faces.bean.ManagedBean; import de.romankreisel.faktotum.beans.SettingBean; /** * @author Roman Kreisel <mail@romankreisel.de> * */ @ManagedBean @ApplicationScoped public class SettingHandler extends FaktotumHandler { /** * */ private static final long serialVersionUID = 3367302232457502108L; @EJB SettingBean settingsBean; public String getAdministratorEmail() { return this.settingsBean.getStringSettingValue(SettingBean.SETTING_STRING_ADMINISTRATOR_EMAIL); } public String getAdministratorName() { return this.settingsBean.getStringSettingValue(SettingBean.SETTING_STRING_ADMINISTRATOR_NAME); } public Enum<?> getAuthScheme() { return this.settingsBean.getEnumSettingValue(SettingBean.SETTING_STRING_AUTH_SCHEME); } public Date getFraternityFoundationDate() { return this.settingsBean.getDateSettingValue(SettingBean.SETTING_DATE_FOUNDATION); } public String getFraternityName() { return this.settingsBean.getStringSettingValue(SettingBean.SETTING_STRING_FRATERNITY_NAME); } public String getAliasesPrefix() { return this.settingsBean.getStringSettingValue(SettingBean.SETTING_STRING_FRATERNITY_ALIASES_PREFIX); } public String getProductName() { return this.settingsBean.getStringSettingValue(SettingBean.SETTING_STRING_PRODUCT_NAME); } public Boolean getUsingAliases() { return this.settingsBean.getBooleanSettingValue(SettingBean.SETTING_BOOLEAN_FRATERNITY_USES_ALIASES); } }