return getBusiness().getConfigBusiness().getConfig();
}
@Override
public ServiceResponse saveConfig(Map<String, String> vo) {
ConfigEntity config = getBusiness().getConfigBusiness().getConfig();
if (vo.get("commentsEmail") != null) {
config.setCommentsEmail(vo.get("commentsEmail"));
}
if (vo.get("commentsTemplate") != null) {
config.setCommentsTemplate(vo.get("commentsTemplate"));
}
if (vo.get("editExt") != null) {
config.setEditExt(vo.get("editExt"));
}
if (vo.get("googleAnalyticsId") != null) {
config.setGoogleAnalyticsId(vo.get("googleAnalyticsId"));
}
if (vo.get("enableRecaptcha") != null) {
config.setEnableRecaptcha(Boolean.valueOf(vo.get("enableRecaptcha")));
}
if (vo.get("recaptchaPrivateKey") != null) {
config.setRecaptchaPrivateKey(vo.get("recaptchaPrivateKey"));
}
if (vo.get("recaptchaPublicKey") != null) {
config.setRecaptchaPublicKey(vo.get("recaptchaPublicKey"));
}
if (vo.get("siteDomain") != null) {
config.setSiteDomain(vo.get("siteDomain"));
}
if (vo.get("siteEmail") != null) {
config.setSiteEmail(vo.get("siteEmail"));
}
if (vo.get("siteUserLoginUrl") != null) {
config.setSiteUserLoginUrl(vo.get("siteUserLoginUrl"));
}
if (vo.get("site404Url") != null) {
config.setSite404Url(vo.get("site404Url"));
}
if (vo.get("enablePicasa") != null) {
config.setEnablePicasa(Boolean.valueOf(vo.get("enablePicasa")));
}
if (vo.get("picasaUser") != null) {
config.setPicasaUser(vo.get("picasaUser"));
}
if (vo.get("picasaPassword") != null) {
config.setPicasaPassword(vo.get("picasaPassword"));
}
if (vo.get("enableCkeditor") != null) {
config.setEnableCkeditor(Boolean.valueOf(vo.get("enableCkeditor")));
}
if (vo.get("defaultTimezone") != null) {
config.setDefaultTimezone(vo.get("defaultTimezone"));
}
if (vo.get("defaultLanguage") != null) {
config.setDefaultLanguage(vo.get("defaultLanguage"));
}
List<String> errors = getBusiness().getConfigBusiness()
.validateBeforeUpdate(config);
if (errors.isEmpty()) {
getDao().getConfigDao().save(config);