/**
*
*/
protected EngineEcoSession initEcoSession(final HttpServletRequest request) throws Exception {
EngineEcoSession engineEcoSession = new EngineEcoSession();
EngineSetting engineSettingEnvironmentStagingModeEnabled = engineSettingService.getSettingEnvironmentStagingModeEnabled();
if (engineSettingEnvironmentStagingModeEnabled != null) {
engineEcoSession.setEnvironmentStagingModeEnabled(BooleanUtils.toBoolean(engineSettingEnvironmentStagingModeEnabled.getDefaultValue()));
} else {
engineEcoSession.setEnvironmentStagingModeEnabled(false);
logger.warn("Environment Type is not define in your database. Check the " + EngineSettingService.ENGINE_SETTING_ENVIRONMENT_STAGING_MODE_ENABLED + " value in settings table.");
}
EngineSetting engineSettingEnvironmentType = engineSettingService.getSettingEnvironmentType();
if (engineSettingEnvironmentType != null) {
String environmentType = engineSettingEnvironmentType.getDefaultValue();
try {
engineEcoSession.setEnvironmentType(EnvironmentType.valueOf(environmentType));
} catch (Exception e) {
logger.error("Environment Type has wrong value define in your database. Check the " + EngineSettingService.ENGINE_SETTING_ENVIRONMENT_TYPE + " value in settings table.");
}