ISystemTaskService startupService = (ISystemTaskService) wac
.getBean(BaseConstants.SERVICE_SYSTEM_TASK_LOOKUP);
ISystemConfigService sysConfigService = (ISystemConfigService) wac
.getBean(BaseConstants.SERVICE_SYSTEM_CONFIG);
SystemConfigVO sysConfigVO = sysConfigService.getSystemConfig();
getServletContext().setAttribute(BaseConstants.ORGANIZATION_NAME, sysConfigVO.getOrganizationName());
getServletContext().setAttribute(BaseConstants.ORGANIZATION_SHORT_NAME, sysConfigVO.getOrganizationShortName());
getServletContext().setAttribute(BaseConstants.ALBUM_URL, sysConfigVO.getAlbumUrl());
getServletContext().setAttribute(BaseConstants.FORUM_URL, sysConfigVO.getForumUrl());
getServletContext().setAttribute(BaseConstants.SERVER_URL, sysConfigVO.getServerUrl());
getServletContext().setAttribute(BaseConstants.ORG_EMAIL, sysConfigVO.getOrgEmail());
getServletContext().setAttribute(BaseConstants.LOGO_NAME, sysConfigVO.getLogoFileName());
getServletContext().setAttribute(BaseConstants.CSS_TYPE, "default");
String hasDorm = sysConfigVO.getHasDormitory();
setupDatabaseCache(startupService, sysConfigService, hasDorm);
setupOtherCache(hasDorm);
if (sysConfigVO.getSystemConfigId() == null){
getServletContext().setAttribute(BaseConstants.FIRST_STARTUP, BaseConstants.BOOLEAN_YES);
}
else{
getServletContext().setAttribute(BaseConstants.FIRST_STARTUP, BaseConstants.BOOLEAN_NO);
}