package nlib.cmm.web;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import nlib.cmm.NlibCommonController;
import nlib.cmm.exception.ErrorMessage;

/**
 * <pre>
 * @Class Name : AlertController.java
 * 
 * @Description : 각종 처리 결과/오류 안내관련 공통 컨트롤러 클래스 
 * 
 * 
 * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
 *
 * </pre>
 *
 * @ ------------    --------    ---------------------------
 * @ 수정일                     수정자             수정내용
 * @ ------------    --------    ---------------------------
 * @ 2021. 7. 29.     KNKIM       최초 생성
 *
 * 
 * @author 이씨플라자 * DIGITALSHIP KNKIM
 * @since 2021. 7. 29.
 * @version 1.0
 *
 */
@Controller
public class AlertController extends NlibCommonController {

	private static final Logger log = LoggerFactory.getLogger(SystemController.class);

	/**
	 * NLIB Property 재로드 작업을 요청한다. 
	 * 
	 * @param authentication
	 * @param model
	 * @return
	 */
	@RequestMapping( {"/alert/showError.do"} )
	public String showError(HttpServletRequest req, @RequestParam Map<String, String> paramMap, ModelMap model) {

		addParamFromInputFlash(paramMap, req);
		model.addAttribute("code", paramMap.get("errorCode"));
		model.addAttribute("message", paramMap.get("errorMessage"));
		model.addAttribute("goBackUrl", paramMap.get("goBackUrl"));
		
		return "nlib/cmm/common";
	}
	
}