valueMap = super.getParameterMap();
+
+ String[] values;
+ for( String key : valueMap.keySet() ){
+ values = valueMap.get(key);
+
+ for (int i = 0; i < values.length; i++) {
+ if (values[i] != null) {
+ values[i] = getSafeParamData(values[i]);
+ //System.out.println( "[HTMLTagFilter getParameterMap] "+ key + "===>>>"+values[i] );
+ } else {
+ values[i] = null;
+ }
+ }
+
+ //System.out.println( String.format("키 : %s, 값 : %s", key, valueMap.get(key)) );
+ }
+
+ return valueMap;
+ }
+
+ private String getSafeParamData(String value) {
+ StringBuffer strBuff = new StringBuffer();
+
+ for (int i = 0; i < value.length(); i++) {
+ char c = value.charAt(i);
+ switch (c) {
+ case '<':
+ if ( checkNextWhiteListTag(i, value) == false )
+ strBuff.append("<");
+ else
+ strBuff.append(c);
+ //System.out.println("checkNextWhiteListTag = "+checkNextWhiteListTag(i, value));
+ break;
+ case '>':
+ if ( checkPrevWhiteListTag(i, value) == false )
+ strBuff.append(">");
+ else
+ strBuff.append(c);
+ //System.out.println("checkPrevWhiteListTag = "+checkPrevWhiteListTag(i, value));
+ break;
+ //case '&':
+ // strBuff.append("&");
+ // break;
+ case '"':
+ strBuff.append(""");
+ break;
+ case '\'':
+ strBuff.append("'");
+ break;
+ default:
+ strBuff.append(c);
+ break;
+ }
+ }
+
+ value = strBuff.toString();
+ return value;
+ }
+
+ private boolean checkNextWhiteListTag(int index, String data) {
+ String extractData = "";
+ //int beginIndex = 0;
+ int endIndex = 0;
+ for(String whiteListData: whiteListTag) {
+ //System.out.println("===>>> whiteListData="+whiteListData);
+ endIndex = index+whiteListData.length();
+ if ( data.length() > endIndex )
+ extractData = data.substring(index, endIndex);
+ else
+ extractData = "";
+ //System.out.println("extractData="+extractData);
+ if ( whiteListData.equals(extractData) ) return true; // whiteList 대상으로 판정
+ }
+
+ return false;
+ }
+
+ private boolean checkPrevWhiteListTag(int index, String data) {
+ String extractData = "";
+ int beginIndex = 0;
+ int endIndex = 0;
+ for(String whiteListData: whiteListTag) {
+ //System.out.println("===>>> whiteListData="+whiteListData);
+ beginIndex = index-whiteListData.length()+1;
+ endIndex = index+1;
+ //System.out.println(" range ["+beginIndex+" ~ "+endIndex+"]");
+ if ( beginIndex >= 0 )
+ extractData = data.substring(beginIndex, endIndex);
+ else
+ extractData = "";
+ //System.out.println("extractData="+extractData);
+ if ( whiteListData.equals(extractData) ) return true; // whiteList 대상으로 판정
+ }
+
+ return false;
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/egovframework/com/cmm/filter/SessionTimeoutCookieFilter.java b/src/main/java/egovframework/com/cmm/filter/SessionTimeoutCookieFilter.java
new file mode 100644
index 0000000..95e6a10
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/filter/SessionTimeoutCookieFilter.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2008-2009 MOPAS(MINISTRY OF SECURITY AND PUBLIC ADMINISTRATION).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package egovframework.com.cmm.filter;
+
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+*
+* SessionTimeoutCookieFilter
+* @author 공통컴포넌트 팀 신용호
+* @since 2020.06.17
+* @version 1.0
+* @see
+*
+*
+* << 개정이력(Modification Information) >>
+*
+* 수정일 수정자 수정내용
+* ---------- -------- ---------------------------
+* 2020.06.17 신용호 최초 생성
+*
+*/
+
+public class SessionTimeoutCookieFilter implements Filter{
+
+ @SuppressWarnings("unused")
+ private FilterConfig config;
+
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain) throws IOException, ServletException {
+ HttpServletResponse httpResponse = (HttpServletResponse) response;
+ HttpServletRequest httpRequest = (HttpServletRequest) request;
+ long serverTime = System.currentTimeMillis();
+ long sessionExpireTime = serverTime + httpRequest.getSession().getMaxInactiveInterval() * 1000;
+ Cookie cookie = new Cookie("egovLatestServerTime", "" + serverTime);
+ //cookie.setSecure(true);
+ cookie.setPath("/");
+ httpResponse.addCookie(cookie);
+ cookie = new Cookie("egovExpireSessionTime", "" + sessionExpireTime);
+ cookie.setPath("/");
+
+ Date dateServer = new Date(serverTime);
+ Date dateExpiry = new Date(sessionExpireTime);
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+ String serverYMD = format.format(dateServer);
+ String expiryYMD = format.format(dateExpiry);
+ //System.out.println("=====>>> serverYMD = "+serverYMD);
+ //System.out.println("=====>>> expiryYMD = "+expiryYMD);
+ //System.out.println("=====>>> server TimeStamp = "+serverTime);
+ //System.out.println("=====>>> expire TimeStamp = "+sessionExpireTime);
+
+ httpResponse.addCookie(cookie);
+
+ chain.doFilter(request, response);
+ }
+
+ public void init(FilterConfig config) throws ServletException {
+ this.config = config;
+ }
+
+ public void destroy() {
+
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/interceptor/AuthenticInterceptor.java b/src/main/java/egovframework/com/cmm/interceptor/AuthenticInterceptor.java
new file mode 100644
index 0000000..1100617
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/interceptor/AuthenticInterceptor.java
@@ -0,0 +1,92 @@
+package egovframework.com.cmm.interceptor;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.ModelAndViewDefiningException;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+
+/**
+ * 인증여부 체크 인터셉터
+ * @author 공통서비스 개발팀 서준식
+ * @since 2011.07.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2011.07.01 서준식 최초 생성
+ * 2011.09.07 서준식 인증이 필요없는 URL을 패스하는 로직 추가
+ * 2017.08.31 장동한 인증된 사용자 체크로직 변경 및 관리자 권한 체크 로직 추가
+ * 2021.08.27 신용호 dummy모드 사용시 "60. 권한관리" 접근오류 수정
+ *
+ */
+
+
+public class AuthenticInterceptor extends HandlerInterceptorAdapter {
+
+ @Autowired
+ private Environment environment;
+
+ /** log */
+ private static final Logger LOGGER = LoggerFactory.getLogger(AuthenticInterceptor.class);
+
+ /** 관리자 접근 권한 패턴 목록 */
+ private List adminAuthPatternList;
+
+ public List getAdminAuthPatternList() {
+ return adminAuthPatternList;
+ }
+
+ public void setAdminAuthPatternList(List adminAuthPatternList) {
+ this.adminAuthPatternList = adminAuthPatternList;
+ }
+
+ /**
+ * 인증된 사용자 여부로 인증 여부를 체크한다.
+ * 관리자 권한에 따라 접근 페이지 권한을 체크한다.
+ */
+ @Override
+ public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+ //인증된사용자 여부
+ boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ //미민증사용자 체크
+ if(!isAuthenticated) {
+ ModelAndView modelAndView = new ModelAndView("redirect:/uat/uia/egovLoginUsr.do");
+ throw new ModelAndViewDefiningException(modelAndView);
+ }
+ //인증된 권한 목록
+ List authList = (List)EgovUserDetailsHelper.getAuthorities();
+ //관리자인증여부
+ boolean adminAuthUrlPatternMatcher = false;
+ //AntPathRequestMatcher
+ AntPathRequestMatcher antPathRequestMatcher = null;
+ //관리자가 아닐때 체크함
+ for(String adminAuthPattern : adminAuthPatternList){
+ antPathRequestMatcher = new AntPathRequestMatcher(adminAuthPattern);
+ if(antPathRequestMatcher.matches(request)){
+ adminAuthUrlPatternMatcher = true;
+ }
+ }
+ //관리자 권한 체크
+ if(adminAuthUrlPatternMatcher && !authList.contains("ROLE_ADMIN")){
+ ModelAndView modelAndView = new ModelAndView("redirect:/uat/uia/egovLoginUsr.do?auth_error=1");
+ throw new ModelAndViewDefiningException(modelAndView);
+ }
+ return true;
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/interceptor/IpObtainInterceptor.java b/src/main/java/egovframework/com/cmm/interceptor/IpObtainInterceptor.java
new file mode 100644
index 0000000..f4b89a4
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/interceptor/IpObtainInterceptor.java
@@ -0,0 +1,42 @@
+package egovframework.com.cmm.interceptor;
+
+import egovframework.com.cmm.LoginVO;
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+/**
+ * 사용자IP 체크 인터셉터
+ * @author 유지보수팀 이기하
+ * @since 2013.03.28
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ---------- -------- ---------------------------
+ * 2013.03.28 이기하 최초 생성
+ *
+ */
+
+public class IpObtainInterceptor extends HandlerInterceptorAdapter {
+
+ @Override
+ public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+
+ String clientIp = request.getRemoteAddr();
+
+ LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
+
+ if (loginVO != null) {
+ loginVO.setIp(clientIp);
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/service/CmmnDetailCode.java b/src/main/java/egovframework/com/cmm/service/CmmnDetailCode.java
new file mode 100644
index 0000000..7d16307
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/CmmnDetailCode.java
@@ -0,0 +1,217 @@
+package egovframework.com.cmm.service;
+
+import java.io.Serializable;
+
+/**
+ * 공통상세코드 모델 클래스
+ * @author 공통서비스 개발팀 이중호
+ * @since 2009.04.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.04.01 이중호 최초 생성
+ * 2017.09.07 이정은 표준프레임워크 v3.7 개선(clCode 추가)
+ *
+ *
+ */
+public class CmmnDetailCode implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /*
+ * 분류코드
+ */
+ private String clCode = "";
+
+ /*
+ * 코드ID
+ */
+ private String codeId = "";
+
+ /*
+ * 코드ID명
+ */
+ private String codeIdNm = "";
+
+ /*
+ * 상세코드
+ */
+ private String code = "";
+
+ /*
+ * 상세코드명
+ */
+ private String codeNm = "";
+
+ /*
+ * 상세코드설명
+ */
+ private String codeDc = "";
+
+ /*
+ * 사용여부
+ */
+ private String useAt = "";
+
+ /*
+ * 최초등록자ID
+ */
+ private String frstRegisterId = "";
+
+ /*
+ * 최종수정자ID
+ */
+ private String lastUpdusrId = "";
+
+
+ /**
+ * clCode attribute 를 리턴한다.
+ * @return String
+ */
+ public String getClCode() {
+ return clCode;
+ }
+
+ /**
+ * clCode attribute 값을 설정한다.
+ * @param clCode String
+ */
+ public void setClCode(String clCode) {
+ this.clCode = clCode;
+ }
+
+ /**
+ * codeId attribute 를 리턴한다.
+ * @return String
+ */
+ public String getCodeId() {
+ return codeId;
+ }
+
+ /**
+ * codeId attribute 값을 설정한다.
+ * @param codeId String
+ */
+ public void setCodeId(String codeId) {
+ this.codeId = codeId;
+ }
+
+ /**
+ * codeIdNm attribute 를 리턴한다.
+ * @return String
+ */
+ public String getCodeIdNm() {
+ return codeIdNm;
+ }
+
+ /**
+ * codeIdNm attribute 값을 설정한다.
+ * @param codeIdNm String
+ */
+ public void setCodeIdNm(String codeIdNm) {
+ this.codeIdNm = codeIdNm;
+ }
+
+ /**
+ * code attribute 를 리턴한다.
+ * @return String
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * code attribute 값을 설정한다.
+ * @param code String
+ */
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ /**
+ * codeNm attribute 를 리턴한다.
+ * @return String
+ */
+ public String getCodeNm() {
+ return codeNm;
+ }
+
+ /**
+ * codeNm attribute 값을 설정한다.
+ * @param codeNm String
+ */
+ public void setCodeNm(String codeNm) {
+ this.codeNm = codeNm;
+ }
+
+ /**
+ * codeDc attribute 를 리턴한다.
+ * @return String
+ */
+ public String getCodeDc() {
+ return codeDc;
+ }
+
+ /**
+ * codeDc attribute 값을 설정한다.
+ * @param codeDc String
+ */
+ public void setCodeDc(String codeDc) {
+ this.codeDc = codeDc;
+ }
+
+ /**
+ * useAt attribute 를 리턴한다.
+ * @return String
+ */
+ public String getUseAt() {
+ return useAt;
+ }
+
+ /**
+ * useAt attribute 값을 설정한다.
+ * @param useAt String
+ */
+ public void setUseAt(String useAt) {
+ this.useAt = useAt;
+ }
+
+ /**
+ * frstRegisterId attribute 를 리턴한다.
+ * @return String
+ */
+ public String getFrstRegisterId() {
+ return frstRegisterId;
+ }
+
+ /**
+ * frstRegisterId attribute 값을 설정한다.
+ * @param frstRegisterId String
+ */
+ public void setFrstRegisterId(String frstRegisterId) {
+ this.frstRegisterId = frstRegisterId;
+ }
+
+ /**
+ * lastUpdusrId attribute 를 리턴한다.
+ * @return String
+ */
+ public String getLastUpdusrId() {
+ return lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrId attribute 값을 설정한다.
+ * @param lastUpdusrId String
+ */
+ public void setLastUpdusrId(String lastUpdusrId) {
+ this.lastUpdusrId = lastUpdusrId;
+ }
+
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/EgovCmmUseService.java b/src/main/java/egovframework/com/cmm/service/EgovCmmUseService.java
new file mode 100644
index 0000000..0751039
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/EgovCmmUseService.java
@@ -0,0 +1,85 @@
+package egovframework.com.cmm.service;
+
+import java.util.List;
+import java.util.Map;
+
+import egovframework.com.cmm.ComDefaultCodeVO;
+import kccf.cmm.vo.CmmCodeVO;
+
+
+
+/**
+ *
+ * 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기 위한 서비스 인터페이스
+ * @author 공통서비스 개발팀 이삼섭
+ * @since 2009.04.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.03.11 이삼섭 최초 생성
+ *
+ *
+ */
+public interface EgovCmmUseService {
+
+ /**
+ * (문화원) 공통코드를 조회한다.
+ *
+ * @param vo
+ * @return List(코드)
+ * @throws Exception
+ */
+ public List selectCmmCode(CmmCodeVO cmmCode) throws Exception;
+
+ /**
+ * (문화원) 공통코드를 조회한다.
+ *
+ * @param vo
+ * @return List(코드)
+ * @throws Exception
+ */
+ public List selectAditCodeItem(String bbsId) throws Exception;
+
+ /**
+ * 공통코드를 조회한다.
+ *
+ * @param vo
+ * @return List(코드)
+ * @throws Exception
+ */
+ public List selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception;
+
+ /**
+ * ComDefaultCodeVO의 리스트를 받아서 여러개의 코드 리스트를 맵에 담아서 리턴한다.
+ *
+ * @param voList
+ * @return Map(코드)
+ * @throws Exception
+ */
+ public Map> selectCmmCodeDetails(List> voList) throws Exception;
+
+ /**
+ * 조직정보를 코드형태로 리턴한다.
+ *
+ * @param 조회조건정보 vo
+ * @return 조직정보 List
+ * @throws Exception
+ */
+ public List selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception;
+
+ /**
+ * 그룹정보를 코드형태로 리턴한다.
+ *
+ * @param 조회조건정보 vo
+ * @return 그룹정보 List
+ * @throws Exception
+ */
+ public List selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception;
+
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/EgovFileMngService.java b/src/main/java/egovframework/com/cmm/service/EgovFileMngService.java
new file mode 100644
index 0000000..71c1621
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/EgovFileMngService.java
@@ -0,0 +1,147 @@
+package egovframework.com.cmm.service;
+
+import java.util.List;
+import java.util.Map;
+
+import kccf.bbs.vo.AttachmentVO;
+
+/**
+ * @Class Name : EgovFileMngService.java
+ * @Description : 파일정보의 관리를 위한 서비스 인터페이스
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------- -------------------
+ * 2009. 3. 25. 이삼섭 최초생성
+ *
+ * @author 공통 서비스 개발팀 이삼섭
+ * @since 2009. 3. 25.
+ * @version
+ * @see
+ *
+ */
+public interface EgovFileMngService {
+
+ /**
+ * 문화원 파일에 대한 목록을 조회한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public List selectFileListByCntntsId(AttachmentVO attachmentVO) throws Exception;
+
+ /**
+ * 문화원 파일에 대한 상세정보를 조회한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public AttachmentVO selectFileDetailByKF(AttachmentVO attachmentVO) throws Exception;
+
+ /**
+ * 문화원 여러 개의 파일을 삭제한다.
+ *
+ * @param attachment
+ * @throws Exception
+ */
+ public void deleteFileInfsByKF(List deleteFiles) throws Exception;
+
+
+ /**
+ * 파일에 대한 목록을 조회한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public List selectFileInfs(FileVO fvo) throws Exception;
+
+ /**
+ * 하나의 파일에 대한 정보(속성 및 상세)를 등록한다.
+ *
+ * @param fvo
+ * @throws Exception
+ */
+ public String insertFileInf(FileVO fvo) throws Exception;
+
+ /**
+ * 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
+ *
+ * @param fvoList
+ * @throws Exception
+ */
+ public String insertFileInfs(List> fvoList) throws Exception;
+
+
+
+ /**
+ * 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다.
+ *
+ * @param fvoList
+ * @throws Exception
+ */
+ public void updateFileInfs(List> fvoList) throws Exception;
+
+ /**
+ * 여러 개의 파일을 삭제한다.
+ *
+ * @param fvoList
+ * @throws Exception
+ */
+ public void deleteFileInfs(List> fvoList) throws Exception;
+
+ /**
+ * 하나의 파일을 삭제한다.
+ *
+ * @param fvo
+ * @throws Exception
+ */
+ public void deleteFileInf(FileVO fvo) throws Exception;
+
+ /**
+ * 파일에 대한 상세정보를 조회한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public FileVO selectFileInf(FileVO fvo) throws Exception;
+
+ /**
+ * 파일 구분자에 대한 최대값을 구한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public int getMaxFileSN(FileVO fvo) throws Exception;
+
+ /**
+ * 전체 파일을 삭제한다.
+ *
+ * @param fvo
+ * @throws Exception
+ */
+ public void deleteAllFileInf(FileVO fvo) throws Exception;
+
+ /**
+ * 파일명 검색에 대한 목록을 조회한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public Map selectFileListByFileNm(FileVO fvo) throws Exception;
+
+ /**
+ * 이미지 파일에 대한 목록을 조회한다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ public List selectImageFileList(FileVO vo) throws Exception;
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/EgovFileMngUtil.java b/src/main/java/egovframework/com/cmm/service/EgovFileMngUtil.java
new file mode 100644
index 0000000..5a4df1e
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/EgovFileMngUtil.java
@@ -0,0 +1,524 @@
+package egovframework.com.cmm.service;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.util.FileCopyUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import egovframework.com.cmm.EgovWebUtil;
+import egovframework.com.cmm.util.EgovResourceCloseHelper;
+
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+
+/**
+ * @Class Name : EgovFileMngUtil.java
+ * @Description : 메시지 처리 관련 유틸리티
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ---------- -------- ---------------------------
+ * 2009.02.13 이삼섭 최초 생성
+ * 2011.08.09 서준식 utl.fcc패키지와 Dependency제거를 위해 getTimeStamp()메서드 추가
+ * 2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
+ * 2020.10.26 신용호 parseFileInf(List files ...) 추가
+ *
+ * @author 공통 서비스 개발팀 이삼섭
+ * @since 2009. 02. 13
+ * @version 1.0
+ * @see
+ *
+ */
+@Component("EgovFileMngUtil")
+public class EgovFileMngUtil {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovFileMngUtil.class);
+
+ public static final int BUFF_SIZE = 2048;
+
+ @Resource(name = "egovFileIdGnrService")
+ private EgovIdGnrService idgenService;
+
+
+ /**
+ * 첨부파일에 대한 목록 정보를 취득한다.
+ *
+ * @param files
+ * @return
+ * @throws Exception
+ */
+ public List parseFileInf(Map files, String KeyStr, int fileKeyParam, String atchFileId, String storePath) throws Exception {
+ int fileKey = fileKeyParam;
+
+ String storePathString = "";
+ String atchFileIdString = "";
+
+ if ("".equals(storePath) || storePath == null) {
+ storePathString = EgovProperties.getProperty("Globals.fileStorePath");
+ } else {
+ storePathString = EgovProperties.getProperty(storePath);
+ }
+
+ if ("".equals(atchFileId) || atchFileId == null) {
+ atchFileIdString = idgenService.getNextStringId();
+ } else {
+ atchFileIdString = atchFileId;
+ }
+
+ File saveFolder = new File(EgovWebUtil.filePathBlackList(storePathString));
+
+ if (!saveFolder.exists() || saveFolder.isFile()) {
+ //2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
+ if (saveFolder.mkdirs()){
+ LOGGER.debug("[file.mkdirs] saveFolder : Creation Success ");
+ }else{
+ LOGGER.error("[file.mkdirs] saveFolder : Creation Fail ");
+ }
+ }
+
+ Iterator> itr = files.entrySet().iterator();
+ MultipartFile file;
+ String filePath = "";
+ List result = new ArrayList();
+ FileVO fvo;
+
+ while (itr.hasNext()) {
+ Entry entry = itr.next();
+
+ file = entry.getValue();
+ String orginFileName = file.getOriginalFilename();
+
+ //--------------------------------------
+ // 원 파일명이 없는 경우 처리
+ // (첨부가 되지 않은 input file type)
+ //--------------------------------------
+ if ("".equals(orginFileName)) {
+ continue;
+ }
+ ////------------------------------------
+
+ int index = orginFileName.lastIndexOf(".");
+ //String fileName = orginFileName.substring(0, index);
+ String fileExt = orginFileName.substring(index + 1);
+ String newName = KeyStr + getTimeStamp() + fileKey;
+ long size = file.getSize();
+
+ if (!"".equals(orginFileName)) {
+ filePath = storePathString + File.separator + newName;
+ file.transferTo(new File(EgovWebUtil.filePathBlackList(filePath)));
+ }
+
+ fvo = new FileVO();
+ fvo.setFileExtsn(fileExt);
+ fvo.setFileStreCours(storePathString);
+ fvo.setFileMg(Long.toString(size));
+ fvo.setOrignlFileNm(orginFileName);
+ fvo.setStreFileNm(newName);
+ fvo.setAtchFileId(atchFileIdString);
+ fvo.setFileSn(String.valueOf(fileKey));
+
+ result.add(fvo);
+
+ fileKey++;
+ }
+
+ return result;
+ }
+
+ /**
+ * 첨부파일에 대한 목록 정보를 취득한다.
+ *
+ * @param files
+ * @return
+ * @throws Exception
+ */
+ public List parseFileInf(List files, String KeyStr, int fileKeyParam, String atchFileId, String storePath) throws Exception {
+ int fileKey = fileKeyParam;
+
+ String storePathString = "";
+ String atchFileIdString = "";
+
+ if ("".equals(storePath) || storePath == null) {
+ storePathString = EgovProperties.getProperty("Globals.fileStorePath");
+ } else {
+ storePathString = EgovProperties.getProperty(storePath);
+ }
+
+ if ("".equals(atchFileId) || atchFileId == null) {
+ atchFileIdString = idgenService.getNextStringId();
+ } else {
+ atchFileIdString = atchFileId;
+ }
+
+ File saveFolder = new File(EgovWebUtil.filePathBlackList(storePathString));
+
+ if (!saveFolder.exists() || saveFolder.isFile()) {
+ //2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
+ if (saveFolder.mkdirs()){
+ LOGGER.debug("[file.mkdirs] saveFolder : Creation Success ");
+ }else{
+ LOGGER.error("[file.mkdirs] saveFolder : Creation Fail ");
+ }
+ }
+
+ String filePath = "";
+ List result = new ArrayList();
+ FileVO fvo;
+
+ for (MultipartFile file : files ) {
+
+ String orginFileName = file.getOriginalFilename();
+
+ //--------------------------------------
+ // 원 파일명이 없는 경우 처리
+ // (첨부가 되지 않은 input file type)
+ //--------------------------------------
+ if ("".equals(orginFileName)) {
+ continue;
+ }
+ ////------------------------------------
+
+ int index = orginFileName.lastIndexOf(".");
+ //String fileName = orginFileName.substring(0, index);
+ String fileExt = orginFileName.substring(index + 1);
+ String newName = KeyStr + getTimeStamp() + fileKey;
+ long size = file.getSize();
+
+ if (!"".equals(orginFileName)) {
+ filePath = storePathString + File.separator + newName;
+ file.transferTo(new File(EgovWebUtil.filePathBlackList(filePath)));
+ }
+
+ fvo = new FileVO();
+ fvo.setFileExtsn(fileExt);
+ fvo.setFileStreCours(storePathString);
+ fvo.setFileMg(Long.toString(size));
+ fvo.setOrignlFileNm(orginFileName);
+ fvo.setStreFileNm(newName);
+ fvo.setAtchFileId(atchFileIdString);
+ fvo.setFileSn(String.valueOf(fileKey));
+
+ result.add(fvo);
+
+ fileKey++;
+ }
+
+ return result;
+ }
+
+
+
+
+ /**
+ * 첨부파일을 서버에 저장한다.
+ *
+ * @param file
+ * @param newName
+ * @param stordFilePath
+ * @throws Exception
+ */
+ protected void writeUploadedFile(MultipartFile file, String newName, String stordFilePath) throws Exception {
+ InputStream stream = null;
+ OutputStream bos = null;
+
+ try {
+ stream = file.getInputStream();
+ File cFile = new File(stordFilePath);
+
+ if (!cFile.isDirectory()) {
+ boolean _flag = cFile.mkdir();
+ if (!_flag) {
+ throw new IOException("Directory creation Failed ");
+ }
+ }
+
+ bos = new FileOutputStream(stordFilePath + File.separator + newName);
+
+ int bytesRead = 0;
+ byte[] buffer = new byte[BUFF_SIZE];
+
+ while ((bytesRead = stream.read(buffer, 0, BUFF_SIZE)) != -1) {
+ bos.write(buffer, 0, bytesRead);
+ }
+ } finally {
+ EgovResourceCloseHelper.close(bos, stream);
+ }
+ }
+
+ /**
+ * 서버의 파일을 다운로드한다.
+ *
+ * @param request
+ * @param response
+ * @throws Exception
+ */
+ public static void downFile(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ String downFileName = "";
+ String orgFileName = "";
+
+ if ((String) request.getAttribute("downFile") == null) {
+ downFileName = "";
+ } else {
+ downFileName = (String) request.getAttribute("downFile");
+ }
+
+ if ((String) request.getAttribute("orgFileName") == null) {
+ orgFileName = "";
+ } else {
+ orgFileName = (String) request.getAttribute("orginFile");
+ }
+
+ orgFileName = orgFileName.replaceAll("\r", "").replaceAll("\n", "");
+
+ File file = new File(EgovWebUtil.filePathBlackList(downFileName));
+
+ if (!file.exists()) {
+ throw new FileNotFoundException(downFileName);
+ }
+
+ if (!file.isFile()) {
+ throw new FileNotFoundException(downFileName);
+ }
+
+ byte[] buffer = new byte[BUFF_SIZE]; //buffer size 2K.
+
+ response.setContentType("application/x-msdownload");
+ response.setHeader("Content-Disposition:", "attachment; filename=" + new String(orgFileName.getBytes(), "UTF-8"));
+ response.setHeader("Content-Transfer-Encoding", "binary");
+ response.setHeader("Pragma", "no-cache");
+ response.setHeader("Expires", "0");
+
+ BufferedInputStream fin = null;
+ BufferedOutputStream outs = null;
+
+ try {
+ fin = new BufferedInputStream(new FileInputStream(file));
+ outs = new BufferedOutputStream(response.getOutputStream());
+ int read = 0;
+
+ while ((read = fin.read(buffer)) != -1) {
+ outs.write(buffer, 0, read);
+ }
+ } finally {
+ EgovResourceCloseHelper.close(outs, fin);
+ }
+ }
+
+ /**
+ * 첨부로 등록된 파일을 서버에 업로드한다.
+ *
+ * @param file
+ * @return
+ * @throws Exception
+ */
+ public static HashMap uploadFile(MultipartFile file) throws Exception {
+
+ HashMap map = new HashMap();
+ //Write File 이후 Move File????
+ String newName = "";
+ String stordFilePath = EgovProperties.getProperty("Globals.fileStorePath");
+ String orginFileName = file.getOriginalFilename();
+
+ int index = orginFileName.lastIndexOf(".");
+ //String fileName = orginFileName.substring(0, _index);
+ String fileExt = orginFileName.substring(index + 1);
+ long size = file.getSize();
+
+ //newName 은 Naming Convention에 의해서 생성
+ newName = getTimeStamp(); // 2012.11 KISA 보안조치
+ writeFile(file, newName, stordFilePath);
+ //storedFilePath는 지정
+ map.put(Globals.ORIGIN_FILE_NM, orginFileName);
+ map.put(Globals.UPLOAD_FILE_NM, newName);
+ map.put(Globals.FILE_EXT, fileExt);
+ map.put(Globals.FILE_PATH, stordFilePath);
+ map.put(Globals.FILE_SIZE, String.valueOf(size));
+
+ return map;
+ }
+
+ /**
+ * 파일을 실제 물리적인 경로에 생성한다.
+ *
+ * @param file
+ * @param newName
+ * @param stordFilePath
+ * @throws Exception
+ */
+ protected static void writeFile(MultipartFile file, String newName, String stordFilePath) throws Exception {
+ InputStream stream = null;
+ OutputStream bos = null;
+
+ try {
+ stream = file.getInputStream();
+ File cFile = new File(EgovWebUtil.filePathBlackList(stordFilePath));
+
+ if (!cFile.isDirectory()){
+ //2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
+ if (cFile.mkdirs()){
+ LOGGER.debug("[file.mkdirs] saveFolder : Creation Success ");
+ }else{
+ LOGGER.error("[file.mkdirs] saveFolder : Creation Fail ");
+ }
+ }
+
+ bos = new FileOutputStream(EgovWebUtil.filePathBlackList(stordFilePath + File.separator + newName));
+
+ int bytesRead = 0;
+ byte[] buffer = new byte[BUFF_SIZE];
+
+ while ((bytesRead = stream.read(buffer, 0, BUFF_SIZE)) != -1) {
+ bos.write(buffer, 0, bytesRead);
+ }
+ } finally {
+ EgovResourceCloseHelper.close(bos, stream);
+ }
+ }
+
+ /**
+ * 서버 파일에 대하여 다운로드를 처리한다.
+ *
+ * @param response
+ * @param streFileNm 파일저장 경로가 포함된 형태
+ * @param orignFileNm
+ * @throws Exception
+ */
+ public void downFile(HttpServletResponse response, String streFileNm, String orignFileNm) throws Exception {
+ String downFileName = streFileNm;
+ String orgFileName = orignFileNm;
+
+ File file = new File(downFileName);
+
+ if (!file.exists()) {
+ throw new FileNotFoundException(downFileName);
+ }
+
+ if (!file.isFile()) {
+ throw new FileNotFoundException(downFileName);
+ }
+
+ int fSize = (int) file.length();
+ if (fSize > 0) {
+ BufferedInputStream in = null;
+
+ try {
+ in = new BufferedInputStream(new FileInputStream(file));
+
+ String mimetype = "application/x-msdownload";
+
+ //response.setBufferSize(fSize);
+ response.setContentType(mimetype);
+ response.setHeader("Content-Disposition:", "attachment; filename=" + orgFileName);
+ response.setContentLength(fSize);
+ //response.setHeader("Content-Transfer-Encoding","binary");
+ //response.setHeader("Pragma","no-cache");
+ //response.setHeader("Expires","0");
+ FileCopyUtils.copy(in, response.getOutputStream());
+ } finally {
+ EgovResourceCloseHelper.close(in);
+ }
+ response.getOutputStream().flush();
+ response.getOutputStream().close();
+ }
+
+ /*
+ String uploadPath = propertiesService.getString("fileDir");
+
+ File uFile = new File(uploadPath, requestedFile);
+ int fSize = (int) uFile.length();
+
+ if (fSize > 0) {
+ BufferedInputStream in = new BufferedInputStream(new FileInputStream(uFile));
+
+ String mimetype = "text/html";
+
+ //response.setBufferSize(fSize);
+ response.setContentType(mimetype);
+ response.setHeader("Content-Disposition", "attachment; filename=\"" + requestedFile + "\"");
+ response.setContentLength(fSize);
+
+ FileCopyUtils.copy(in, response.getOutputStream());
+ in.close();
+ response.getOutputStream().flush();
+ response.getOutputStream().close();
+ } else {
+ response.setContentType("text/html");
+ PrintWriter printwriter = response.getWriter();
+ printwriter.println("");
+ printwriter.println("Could not get file name: " + requestedFile + " ");
+ printwriter.println(" ");
+ printwriter.println(" © webAccess");
+ printwriter.println("");
+ printwriter.flush();
+ printwriter.close();
+ }
+ //*/
+
+ /*
+ response.setContentType("application/x-msdownload");
+ response.setHeader("Content-Disposition:", "attachment; filename=" + new String(orgFileName.getBytes(),"UTF-8" ));
+ response.setHeader("Content-Transfer-Encoding","binary");
+ response.setHeader("Pragma","no-cache");
+ response.setHeader("Expires","0");
+
+ BufferedInputStream fin = new BufferedInputStream(new FileInputStream(file));
+ BufferedOutputStream outs = new BufferedOutputStream(response.getOutputStream());
+ int read = 0;
+
+ while ((read = fin.read(b)) != -1) {
+ outs.write(b,0,read);
+ }
+ log.debug(this.getClass().getName()+" BufferedOutputStream Write Complete!!! ");
+
+ outs.close();
+ fin.close();
+ //*/
+ }
+
+ /**
+ * 공통 컴포넌트 utl.fcc 패키지와 Dependency제거를 위해 내부 메서드로 추가 정의함
+ * 응용어플리케이션에서 고유값을 사용하기 위해 시스템에서17자리의TIMESTAMP값을 구하는 기능
+ *
+ * @param
+ * @return Timestamp 값
+ * @see
+ */
+ private static String getTimeStamp() {
+
+ String rtnStr = null;
+
+ // 문자열로 변환하기 위한 패턴 설정(년도-월-일 시:분:초:초(자정이후 초))
+ String pattern = "yyyyMMddhhmmssSSS";
+
+ SimpleDateFormat sdfCurrent = new SimpleDateFormat(pattern, Locale.KOREA);
+ Timestamp ts = new Timestamp(System.currentTimeMillis());
+
+ rtnStr = sdfCurrent.format(ts.getTime());
+
+ return rtnStr;
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/service/EgovProperties.java b/src/main/java/egovframework/com/cmm/service/EgovProperties.java
new file mode 100644
index 0000000..6e9bce9
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/EgovProperties.java
@@ -0,0 +1,182 @@
+package egovframework.com.cmm.service;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import egovframework.com.cmm.EgovWebUtil;
+import egovframework.com.utl.fcc.service.EgovStringUtil;
+
+/**
+ * Class Name : EgovProperties.java
+ * Description : properties값들을 파일로부터 읽어와 Globals클래스의 정적변수로 로드시켜주는 클래스로
+ * 문자열 정보 기준으로 사용할 전역변수를 시스템 재시작으로 반영할 수 있도록 한다.
+ * Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ---------- -------- ---------------------------
+ * 2009.01.19 박지욱 최초 생성
+ * 2011.07.20 서준식 Globals파일의 상대경로를 읽은 메서드 추가
+ * 2014.10.13 이기하 Globals.properties 값이 null일 경우 오류처리
+ * 2019.04.26 신용호 RELATIVE_PATH_PREFIX Path 적용 방식 개선
+ * 2022.01.21 윤주호 Try-catch-resource 조치 및 Method Refactoring
+ *
+ * @author 공통 서비스 개발팀 박지욱
+ * @since 2009. 01. 19
+ * @version 1.0
+ * @see
+ *
+ */
+
+public class EgovProperties {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovProperties.class);
+
+ //파일구분자
+ final static String FILE_SEPARATOR = System.getProperty("file.separator");
+
+ //프로퍼티 파일의 물리적 위치
+ //public static final String GLOBALS_PROPERTIES_FILE = System.getProperty("user.home") + FILE_SEPARATOR + "egovProps" +FILE_SEPARATOR + "globals.properties";
+
+ public static final String RELATIVE_PATH_PREFIX = EgovProperties.class.getResource("") == null ? ""
+ : EgovProperties.class.getResource("").getPath().substring(0,
+ EgovProperties.class.getResource("").getPath().lastIndexOf("com"));
+ //public static final String RELATIVE_PATH_PREFIX = EgovProperties.class.getProtectionDomain().getCodeSource().getLocation().getPath().substring(0,EgovProperties.class.getProtectionDomain().getCodeSource().getLocation().getPath().indexOf("WEB-INF/classes/")+"WEB-INF/classes/".length())+"egovframework/";
+
+ public static final String GLOBALS_PROPERTIES_FILE = RELATIVE_PATH_PREFIX + "egovProps" + FILE_SEPARATOR
+ + "globals.properties";
+
+ /**
+ * 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 값을 반환한다(Globals.java 전용)
+ * @param keyName String
+ * @return String
+ */
+ public static String getProperty(String keyName) {
+ LOGGER.debug("===>>> getProperty" + EgovProperties.class.getProtectionDomain().getCodeSource() == null ? ""
+ : EgovStringUtil
+ .isNullToString(EgovProperties.class.getProtectionDomain().getCodeSource().getLocation().getPath()));
+ LOGGER.debug("getProperty : {} = {}", GLOBALS_PROPERTIES_FILE, keyName);
+
+ return getPropertyValueByKey(keyName);
+ }
+
+ /**
+ * 인자로 주어진 문자열을 Key값으로 하는 상대경로 프로퍼티 값을 절대경로로 반환한다(Globals.java 전용)
+ * @param keyName String
+ * @return String
+ */
+ public static String getPathProperty(String keyName) {
+ LOGGER.debug("getPathProperty : {} = {}", GLOBALS_PROPERTIES_FILE, keyName);
+
+ return RELATIVE_PATH_PREFIX + "egovProps" + FILE_SEPARATOR + getProperty(keyName);
+ }
+
+ /**
+ * 주어진 파일에서 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 값을 반환한다
+ * @param fileName String
+ * @param key String
+ * @return String
+ */
+ public static String getProperty(String fileName, String keyName) {
+ return getPropertyValueByKey(fileName, keyName);
+ }
+
+ /**
+ * 주어진 파일에서 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 상대 경로값을 절대 경로값으로 반환한다
+ * @param fileName String
+ * @param key String
+ * @return String
+ */
+ public static String getPathProperty(String fileName, String keyName) {
+ return RELATIVE_PATH_PREFIX + "egovProps" + FILE_SEPARATOR + getProperty(fileName, keyName);
+ }
+
+ /**
+ * 주어진 프로파일의 내용을 파싱하여 (key-value) 형태의 구조체 배열을 반환한다.
+ * @param property String
+ * @return ArrayList
+ */
+ public static ArrayList> loadPropertyFile(String property) {
+
+ // key - value 형태로 된 배열 결과
+ ArrayList> keyList = new ArrayList>();
+
+ String src = property.replace('\\', File.separatorChar).replace('/', File.separatorChar);
+
+ if (Files.exists(Paths.get(EgovWebUtil.filePathBlackList(src)))) { //2022.01 Potential Path Traversal
+ Properties props = loadPropertiesFromFile(src);
+
+ Enumeration> plist = props.propertyNames();
+ if (plist != null) {
+ while (plist.hasMoreElements()) {
+ Map map = new HashMap();
+ String key = (String)plist.nextElement();
+ map.put(key, props.getProperty(key));
+ keyList.add(map);
+ }
+ }
+ }
+
+ return keyList;
+ }
+
+ /**
+ * 기본 Property 에서 Property Key로 Property value 받아온다.
+ * @param keyName
+ * @return
+ */
+ public static String getPropertyValueByKey(String keyName) {
+ return getPropertyValueByKey(GLOBALS_PROPERTIES_FILE, keyName);
+ }
+
+ /**
+ * Property 파일을 지정하여 Property Key로 Property value 받아온다.
+ * @param fileName
+ * @param keyName
+ * @return
+ */
+ public static String getPropertyValueByKey(String fileName, String keyName) {
+ String propertyValue = "";
+ Properties props = loadPropertiesFromFile(fileName);
+
+ if (props.containsKey(keyName)) {
+ propertyValue = props.getProperty(keyName).trim();
+ }
+
+ return propertyValue;
+ }
+
+ /**
+ * Property 파일패스로 Properties 객체를 리턴한다.
+ * @param fileName
+ * @return
+ */
+ private static Properties loadPropertiesFromFile(String fileName) {
+ Properties props = new Properties();
+
+ try (FileInputStream fis = new FileInputStream(EgovWebUtil.filePathBlackList(fileName));
+ BufferedInputStream bis = new BufferedInputStream(fis);) {
+ props.load(bis);
+ } catch (FileNotFoundException fne) {
+ LOGGER.debug("Property file not found.", fne);
+ throw new RuntimeException("Property file not found", fne);
+ } catch (IOException ioe) {
+ LOGGER.debug("Property file IO exception", ioe);
+ throw new RuntimeException("Property file IO exception", ioe);
+ }
+
+ return props;
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/service/EgovUserDetailsService.java b/src/main/java/egovframework/com/cmm/service/EgovUserDetailsService.java
new file mode 100644
index 0000000..796f5ef
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/EgovUserDetailsService.java
@@ -0,0 +1,26 @@
+package egovframework.com.cmm.service;
+
+import java.util.List;
+
+public interface EgovUserDetailsService {
+
+ /**
+ * 인증된 사용자객체를 VO형식으로 가져온다.
+ * @return Object - 사용자 ValueObject
+ */
+ public Object getAuthenticatedUser();
+
+ /**
+ * 인증된 사용자의 권한 정보를 가져온다.
+ * 예) [ROLE_ADMIN, ROLE_USER, ROLE_A, ROLE_B, ROLE_RESTRICTED, IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, IS_AUTHENTICATED_ANONYMOUSLY]
+ * @return List - 사용자 권한정보 목록
+ */
+ public List getAuthorities();
+
+ /**
+ * 인증된 사용자 여부를 체크한다.
+ * @return Boolean - 인증된 사용자 여부(TRUE / FALSE)
+ */
+ public Boolean isAuthenticated();
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/FileResizeUtil.java b/src/main/java/egovframework/com/cmm/service/FileResizeUtil.java
new file mode 100644
index 0000000..6c7a963
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/FileResizeUtil.java
@@ -0,0 +1,148 @@
+package egovframework.com.cmm.service;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+import org.imgscalr.Scalr;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import egovframework.com.cmm.EgovWebUtil;
+
+/**
+ * @Class Name : FileResizeUtil.java
+ * @Description : 파일 리사이즈 관련 유틸리티
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ---------- -------- ---------------------------
+ * 2023.08.16 정진아 최초 생성
+ *
+ * @author
+ * @since 2023.08.16
+ * @version 1.0
+ * @see
+ *
+ */
+
+@Component("FileResizeUtil")
+public class FileResizeUtil {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovFileMngUtil.class);
+
+ @Resource(name = "egovFileIdGnrService")
+ private EgovIdGnrService idgenService;
+
+ public List parseFileInf(MultipartFile file, String KeyStr, int fileKeyParam, String atchFileId, String storePath, String resizeMode) throws Exception {
+ int fileKey = fileKeyParam;
+
+ String storePathString = "";
+ String atchFileIdString = "";
+
+ // 파일 저장 위치 설정
+ if ("".equals(storePath) || storePath == null) {
+ storePathString = EgovProperties.getProperty("Globals.fileStorePath");
+ } else {
+ storePathString = EgovProperties.getProperty(storePath);
+ }
+
+ // 파일 아이디 생성
+ if ("".equals(atchFileId) || atchFileId == null) {
+ atchFileIdString = idgenService.getNextStringId();
+ } else {
+ atchFileIdString = atchFileId;
+ }
+
+ File saveFolder = new File(EgovWebUtil.filePathBlackList(storePathString));
+ if (!saveFolder.exists() || saveFolder.isFile()) {
+ if (saveFolder.mkdirs()) {
+ LOGGER.debug("[file.mkdirs] saveFolder : Creation Success ");
+ } else {
+ LOGGER.error("[file.mkdirs] saveFolder : Creation Fail ");
+ }
+ }
+
+ String filePath = "";
+ List result = new ArrayList<>();
+ FileVO fvo;
+
+ String orginFileName = file.getOriginalFilename();
+
+ BufferedImage bufferedImage = ImageIO.read(file.getInputStream());
+
+ // 이미지 리사이징 처리
+ if ("width".equals(resizeMode)) {
+ bufferedImage = resizeWidthImage(bufferedImage, 300);
+ } else if ("height".equals(resizeMode)) {
+ bufferedImage = resizeHeightImage(bufferedImage, 300);
+ } else if ("both".equals(resizeMode)) {
+ bufferedImage = resizeImage(bufferedImage, 300, 300);
+ }
+
+ if ("".equals(orginFileName)) {
+ // 원 파일명이 없는 경우 처리
+ }
+
+ int index = orginFileName.lastIndexOf(".");
+ String fileExt = orginFileName.substring(index + 1);
+ String newName = KeyStr + getTimeStamp() + fileKey;
+
+ File outputFile = null;
+
+ // 파일 생성
+ if (!"".equals(orginFileName)) {
+ filePath = storePathString + File.separator + newName;
+ outputFile = new File(filePath);
+ ImageIO.write(bufferedImage, fileExt, outputFile);
+ }
+
+ long fileSizeBytes = outputFile.length();
+
+ fvo = new FileVO();
+ fvo.setFileExtsn(fileExt);
+ fvo.setFileStreCours(storePathString);
+ fvo.setFileMg(Long.toString(fileSizeBytes));
+ fvo.setOrignlFileNm(orginFileName);
+ fvo.setStreFileNm(newName);
+ fvo.setAtchFileId(atchFileIdString);
+ fvo.setFileSn(String.valueOf(fileKey));
+
+ result.add(fvo);
+
+ fileKey++;
+
+ return result;
+ }
+
+ private BufferedImage resizeImage(BufferedImage bufferedImage, int targetWidth, int targetHeight) throws Exception {
+ return Scalr.resize(bufferedImage, Scalr.Method.QUALITY, Scalr.Mode.FIT_EXACT, targetWidth, targetHeight, Scalr.OP_ANTIALIAS);
+ }
+
+ private BufferedImage resizeWidthImage(BufferedImage bufferedImage, int targetWidth) throws Exception {
+ return Scalr.resize(bufferedImage, Scalr.Method.QUALITY, Scalr.Mode.FIT_TO_WIDTH, targetWidth);
+ }
+
+ private BufferedImage resizeHeightImage(BufferedImage bufferedImage, int targetHeight) throws Exception {
+ return Scalr.resize(bufferedImage, Scalr.Method.QUALITY, Scalr.Mode.FIT_TO_HEIGHT, targetHeight);
+ }
+
+ private static String getTimeStamp() {
+ String rtnStr = null;
+ String pattern = "yyyyMMddhhmmssSSS";
+ SimpleDateFormat sdfCurrent = new SimpleDateFormat(pattern, Locale.KOREA);
+ Timestamp ts = new Timestamp(System.currentTimeMillis());
+ rtnStr = sdfCurrent.format(ts.getTime());
+ return rtnStr;
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/service/FileVO.java b/src/main/java/egovframework/com/cmm/service/FileVO.java
new file mode 100644
index 0000000..6f5e0f3
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/FileVO.java
@@ -0,0 +1,240 @@
+package egovframework.com.cmm.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * @Class Name : FileVO.java
+ * @Description : 파일정보 처리를 위한 VO 클래스
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------- -------------------
+ * 2009. 3. 25. 이삼섭
+ *
+ * @author 공통 서비스 개발팀 이삼섭
+ * @since 2009. 3. 25.
+ * @version
+ * @see
+ *
+ */
+@SuppressWarnings("serial")
+public class FileVO implements Serializable {
+
+ /**
+ * 첨부파일 아이디
+ */
+ public String atchFileId = "";
+ /**
+ * 생성일자
+ */
+ public String creatDt = "";
+ /**
+ * 파일내용
+ */
+ public String fileCn = "";
+ /**
+ * 파일확장자
+ */
+ public String fileExtsn = "";
+ /**
+ * 파일크기
+ */
+ public String fileMg = "";
+ /**
+ * 파일연번
+ */
+ public String fileSn = "";
+ /**
+ * 파일저장경로
+ */
+ public String fileStreCours = "";
+ /**
+ * 원파일명
+ */
+ public String orignlFileNm = "";
+ /**
+ * 저장파일명
+ */
+ public String streFileNm = "";
+
+ /**
+ * atchFileId attribute를 리턴한다.
+ *
+ * @return the atchFileId
+ */
+ public String getAtchFileId() {
+ return atchFileId;
+ }
+
+ /**
+ * atchFileId attribute 값을 설정한다.
+ *
+ * @param atchFileId
+ * the atchFileId to set
+ */
+ public void setAtchFileId(String atchFileId) {
+ this.atchFileId = atchFileId;
+ }
+
+ /**
+ * creatDt attribute를 리턴한다.
+ *
+ * @return the creatDt
+ */
+ public String getCreatDt() {
+ return creatDt;
+ }
+
+ /**
+ * creatDt attribute 값을 설정한다.
+ *
+ * @param creatDt
+ * the creatDt to set
+ */
+ public void setCreatDt(String creatDt) {
+ this.creatDt = creatDt;
+ }
+
+ /**
+ * fileCn attribute를 리턴한다.
+ *
+ * @return the fileCn
+ */
+ public String getFileCn() {
+ return fileCn;
+ }
+
+ /**
+ * fileCn attribute 값을 설정한다.
+ *
+ * @param fileCn
+ * the fileCn to set
+ */
+ public void setFileCn(String fileCn) {
+ this.fileCn = fileCn;
+ }
+
+ /**
+ * fileExtsn attribute를 리턴한다.
+ *
+ * @return the fileExtsn
+ */
+ public String getFileExtsn() {
+ return fileExtsn;
+ }
+
+ /**
+ * fileExtsn attribute 값을 설정한다.
+ *
+ * @param fileExtsn
+ * the fileExtsn to set
+ */
+ public void setFileExtsn(String fileExtsn) {
+ this.fileExtsn = fileExtsn;
+ }
+
+ /**
+ * fileMg attribute를 리턴한다.
+ *
+ * @return the fileMg
+ */
+ public String getFileMg() {
+ return fileMg;
+ }
+
+ /**
+ * fileMg attribute 값을 설정한다.
+ *
+ * @param fileMg
+ * the fileMg to set
+ */
+ public void setFileMg(String fileMg) {
+ this.fileMg = fileMg;
+ }
+
+ /**
+ * fileSn attribute를 리턴한다.
+ *
+ * @return the fileSn
+ */
+ public String getFileSn() {
+ return fileSn;
+ }
+
+ /**
+ * fileSn attribute 값을 설정한다.
+ *
+ * @param fileSn
+ * the fileSn to set
+ */
+ public void setFileSn(String fileSn) {
+ this.fileSn = fileSn;
+ }
+
+ /**
+ * fileStreCours attribute를 리턴한다.
+ *
+ * @return the fileStreCours
+ */
+ public String getFileStreCours() {
+ return fileStreCours;
+ }
+
+ /**
+ * fileStreCours attribute 값을 설정한다.
+ *
+ * @param fileStreCours
+ * the fileStreCours to set
+ */
+ public void setFileStreCours(String fileStreCours) {
+ this.fileStreCours = fileStreCours;
+ }
+
+ /**
+ * orignlFileNm attribute를 리턴한다.
+ *
+ * @return the orignlFileNm
+ */
+ public String getOrignlFileNm() {
+ return orignlFileNm;
+ }
+
+ /**
+ * orignlFileNm attribute 값을 설정한다.
+ *
+ * @param orignlFileNm
+ * the orignlFileNm to set
+ */
+ public void setOrignlFileNm(String orignlFileNm) {
+ this.orignlFileNm = orignlFileNm;
+ }
+
+ /**
+ * streFileNm attribute를 리턴한다.
+ *
+ * @return the streFileNm
+ */
+ public String getStreFileNm() {
+ return streFileNm;
+ }
+
+ /**
+ * streFileNm attribute 값을 설정한다.
+ *
+ * @param streFileNm
+ * the streFileNm to set
+ */
+ public void setStreFileNm(String streFileNm) {
+ this.streFileNm = streFileNm;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/Globals.java b/src/main/java/egovframework/com/cmm/service/Globals.java
new file mode 100644
index 0000000..2b71770
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/Globals.java
@@ -0,0 +1,59 @@
+package egovframework.com.cmm.service;
+
+/**
+ * Class Name : Globals.java
+ * Description : 시스템 구동 시 프로퍼티를 통해 사용될 전역변수를 정의한다.
+ * Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.01.19 박지욱 최초 생성
+ *
+ * @author 공통 서비스 개발팀 박지욱
+ * @since 2009. 01. 19
+ * @version 1.0
+ * @see
+ *
+ */
+
+public class Globals {
+ //OS 유형
+ public static final String OS_TYPE = EgovProperties.getProperty("Globals.OsType");
+ //DB 유형
+ public static final String DB_TYPE = EgovProperties.getProperty("Globals.DbType");
+ //메인 페이지
+ public static final String MAIN_PAGE = EgovProperties.getProperty("Globals.MainPage");
+ //ShellFile 경로
+ public static final String SHELL_FILE_PATH = EgovProperties.getPathProperty("Globals.ShellFilePath");
+ //퍼로퍼티 파일 위치
+ public static final String CONF_PATH = EgovProperties.getPathProperty("Globals.ConfPath");
+ //Server정보 프로퍼티 위치
+ public static final String SERVER_CONF_PATH = EgovProperties.getPathProperty("Globals.ServerConfPath");
+ //Client정보 프로퍼티 위치
+ public static final String CLIENT_CONF_PATH = EgovProperties.getPathProperty("Globals.ClientConfPath");
+ //파일포맷 정보 프로퍼티 위치
+ public static final String FILE_FORMAT_PATH = EgovProperties.getPathProperty("Globals.FileFormatPath");
+
+ //파일 업로드 원 파일명
+ public static final String ORIGIN_FILE_NM = "originalFileName";
+ //파일 확장자
+ public static final String FILE_EXT = "fileExtension";
+ //파일크기
+ public static final String FILE_SIZE = "fileSize";
+ //업로드된 파일명
+ public static final String UPLOAD_FILE_NM = "uploadFileName";
+ //파일경로
+ public static final String FILE_PATH = "filePath";
+
+ //메일발송요청 XML파일경로
+ public static final String MAIL_REQUEST_PATH = EgovProperties.getPathProperty("Globals.MailRequestPath");
+ //메일발송응답 XML파일경로
+ public static final String MAIL_RESPONSE_PATH = EgovProperties.getPathProperty("Globals.MailRResponsePath");
+
+ // G4C 연결용 IP (localhost)
+ public static final String LOCAL_IP = EgovProperties.getProperty("Globals.LocalIp");
+
+ //SMS 정보 프로퍼티 위치
+ public static final String SMSDB_CONF_PATH = EgovProperties.getPathProperty("Globals.SmsDbConfPath");
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/impl/CmmUseDAO.java b/src/main/java/egovframework/com/cmm/service/impl/CmmUseDAO.java
new file mode 100644
index 0000000..67a1b1b
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/impl/CmmUseDAO.java
@@ -0,0 +1,87 @@
+package egovframework.com.cmm.service.impl;
+
+import java.util.List;
+
+import egovframework.com.cmm.ComDefaultCodeVO;
+import egovframework.com.cmm.service.CmmnDetailCode;
+import kccf.cmm.vo.CmmCodeVO;
+
+import org.springframework.stereotype.Repository;
+
+/**
+ * @Class Name : CmmUseDAO.java
+ * @Description : 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기위한 데이터 접근 클래스
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------- -------------------
+ * 2009. 3. 11. 이삼섭
+ *
+ * @author 공통 서비스 개발팀 이삼섭
+ * @since 2009. 3. 11.
+ * @version
+ * @see
+ *
+ */
+@Repository("cmmUseDAO")
+public class CmmUseDAO extends EgovComAbstractDAO {
+
+ /**
+ * (문화원) 주어진 조건에 따른 공통코드를 불러온다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ public List selectCmmCode(CmmCodeVO cmmCode) {
+ return (List) list("CmmUseDAO.selectCmmCode",cmmCode);
+ }
+
+ /**
+ * (문화원) 주어진 조건에 따른 공통코드를 불러온다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ public List selectAditCodeItem(String bbsId) {
+ return selectList("CmmUseDAO.selectAditCodeItem", bbsId);
+ }
+
+ /**
+ * 주어진 조건에 따른 공통코드를 불러온다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception {
+ return (List) list("CmmUseDAO.selectCmmCodeDetail", vo);
+ }
+
+ /**
+ * 공통코드로 사용할 조직정보를 를 불러온다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception {
+ return (List) list("CmmUseDAO.selectOgrnztIdDetail", vo);
+ }
+
+ /**
+ * 공통코드로 사용할그룹정보를 를 불러온다.
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception {
+ return (List) list("CmmUseDAO.selectGroupIdDetail", vo);
+ }
+
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/impl/EgoDummyUserDetailsServiceImpl.java b/src/main/java/egovframework/com/cmm/service/impl/EgoDummyUserDetailsServiceImpl.java
new file mode 100644
index 0000000..6d53fc6
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/impl/EgoDummyUserDetailsServiceImpl.java
@@ -0,0 +1,70 @@
+package egovframework.com.cmm.service.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import egovframework.com.cmm.LoginVO;
+import egovframework.com.cmm.service.EgovUserDetailsService;
+
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+
+/**
+ *
+ * @author 공통서비스 개발팀 서준식
+ * @since 2011. 8. 12.
+ * @version 1.0
+ * @see
+ *
+ *
+ * 개정이력(Modification Information)
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2011. 8. 12. 서준식 최초생성
+ * 2017. 9. 04. 장동한 클래스 이름 변경(EgovTestUserDetailsServiceImpl > EgovUserDetailsService)
+ *
+ *
+ *
+ */
+
+public class EgoDummyUserDetailsServiceImpl extends EgovAbstractServiceImpl implements
+ EgovUserDetailsService {
+
+ //로그인 객체
+ LoginVO loginVO = new LoginVO();
+ //권한목록 객체
+ List listAuth = new ArrayList();
+
+ @Override
+ public Object getAuthenticatedUser() {
+ loginVO.setId("TEST1");
+ loginVO.setPassword("raHLBnHFcunwNzcDcfad4PhD11hHgXSUr7fc1Jk9uoQ=");
+ loginVO.setUserSe("USR");
+ loginVO.setEmail("egovframe@nia.or.kr");
+ loginVO.setIhidNum("");
+ loginVO.setName("더미사용자");
+ loginVO.setOrgnztId("ORGNZT_0000000000000");
+ loginVO.setUniqId("USRCNFRM_00000000000");
+ return loginVO;
+ }
+
+ @Override
+ public List getAuthorities() {
+ // 권한 설정을 리턴한다.
+ listAuth.add("IS_AUTHENTICATED_ANONYMOUSLY");
+ listAuth.add("IS_AUTHENTICATED_FULLY");
+ listAuth.add("IS_AUTHENTICATED_REMEMBERED");
+ listAuth.add("ROLE_ADMIN");
+ listAuth.add("ROLE_ANONYMOUS");
+ listAuth.add("ROLE_RESTRICTED");
+ listAuth.add("ROLE_USER");
+ return listAuth;
+ }
+
+ @Override
+ public Boolean isAuthenticated() {
+ // 인증된 유저인지 확인한다.
+ return true;
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/impl/EgovCmmUseServiceImpl.java b/src/main/java/egovframework/com/cmm/service/impl/EgovCmmUseServiceImpl.java
new file mode 100644
index 0000000..a686fcc
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/impl/EgovCmmUseServiceImpl.java
@@ -0,0 +1,118 @@
+package egovframework.com.cmm.service.impl;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import egovframework.com.cmm.ComDefaultCodeVO;
+import egovframework.com.cmm.service.CmmnDetailCode;
+import egovframework.com.cmm.service.EgovCmmUseService;
+import kccf.cmm.vo.CmmCodeVO;
+
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+/**
+ * @Class Name : EgovCmmUseServiceImpl.java
+ * @Description : 공통코드등 전체 업무에서 공용해서 사용해야 하는 서비스를 정의하기위한 서비스 구현 클래스
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------- -------------------
+ * 2009. 3. 11. 이삼섭
+ *
+ * @author 공통 서비스 개발팀 이삼섭
+ * @since 2009. 3. 11.
+ * @version
+ * @see
+ *
+ */
+@Service("EgovCmmUseService")
+public class EgovCmmUseServiceImpl extends EgovAbstractServiceImpl implements EgovCmmUseService {
+
+ @Resource(name = "cmmUseDAO")
+ private CmmUseDAO cmmUseDAO;
+
+ /**
+ * (문화원) 공통코드를 조회한다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ @Override
+ public List selectCmmCode(CmmCodeVO cmmCode) throws Exception {
+ return cmmUseDAO.selectCmmCode(cmmCode);
+ }
+
+ /**
+ * (문화원) 공통코드를 조회한다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ @Override
+ public List selectAditCodeItem(String bbsId) throws Exception {
+ return cmmUseDAO.selectAditCodeItem(bbsId);
+ }
+
+ /**
+ * 공통코드를 조회한다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ public List selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception {
+ return cmmUseDAO.selectCmmCodeDetail(vo);
+ }
+
+ /**
+ * ComDefaultCodeVO의 리스트를 받아서 여러개의 코드 리스트를 맵에 담아서 리턴한다.
+ *
+ * @param voList
+ * @return
+ * @throws Exception
+ */
+ public Map> selectCmmCodeDetails(List> voList) throws Exception {
+ ComDefaultCodeVO vo;
+ Map> map = new HashMap>();
+
+ Iterator> iter = voList.iterator();
+ while (iter.hasNext()) {
+ vo = (ComDefaultCodeVO)iter.next();
+ map.put(vo.getCodeId(), cmmUseDAO.selectCmmCodeDetail(vo));
+ }
+
+ return map;
+ }
+
+ /**
+ * 조직정보를 코드형태로 리턴한다.
+ *
+ * @param 조회조건정보 vo
+ * @return 조직정보 List
+ * @throws Exception
+ */
+ public List selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception {
+ return cmmUseDAO.selectOgrnztIdDetail(vo);
+ }
+
+ /**
+ * 그룹정보를 코드형태로 리턴한다.
+ *
+ * @param 조회조건정보 vo
+ * @return 그룹정보 List
+ * @throws Exception
+ */
+ public List selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception {
+ return cmmUseDAO.selectGroupIdDetail(vo);
+ }
+
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/impl/EgovComAbstractDAO.java b/src/main/java/egovframework/com/cmm/service/impl/EgovComAbstractDAO.java
new file mode 100644
index 0000000..004f992
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/impl/EgovComAbstractDAO.java
@@ -0,0 +1,306 @@
+/**
+ *
+ */
+package egovframework.com.cmm.service.impl;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import org.apache.ibatis.session.ResultHandler;
+import org.apache.ibatis.session.RowBounds;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.egovframe.rte.psl.dataaccess.EgovAbstractMapper;
+/**
+ * EgovComAbstractDAO.java 클래스
+ *
+ * @author 서준식
+ * @since 2011. 9. 23.
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------------- ----------------------
+ * 2011. 9. 23. 서준식 최초 생성
+ * 2016. 5. 11. 장동한 myBatis 방식 적용
+ *
+ */
+public abstract class EgovComAbstractDAO extends EgovAbstractMapper{
+
+ private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
+
+ @Resource(name="egov.sqlSession")
+ public void setSqlSessionFactory(SqlSessionFactory sqlSession) {
+ super.setSqlSessionFactory(sqlSession);
+ }
+
+ /**
+ * 입력 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 입력 처리 SQL mapping 쿼리 ID
+ *
+ * @return DBMS가 지원하는 경우 insert 적용 결과 count
+ */
+ @Override
+ public int insert(String queryId) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().insert(queryId);
+ }
+
+ /**
+ * 입력 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 입력 처리 SQL mapping 쿼리 ID
+ * @param parameterObject - 입력 처리 SQL mapping 입력 데이터를 세팅한 파라메터 객체(보통 VO 또는 Map)
+ *
+ * @return DBMS가 지원하는 경우 insert 적용 결과 count
+ */
+ @Override
+ public int insert(String queryId, Object parameterObject) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().insert(queryId, parameterObject);
+ }
+
+ /**
+ * 수정 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 수정 처리 SQL mapping 쿼리 ID
+ *
+ * @return DBMS가 지원하는 경우 update 적용 결과 count
+ */
+ @Override
+ public int update(String queryId) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().update(queryId);
+ }
+
+ /**
+ * 수정 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 수정 처리 SQL mapping 쿼리 ID
+ * @param parameterObject - 수정 처리 SQL mapping 입력 데이터(key 조건 및 변경 데이터)를 세팅한 파라메터 객체(보통 VO 또는 Map)
+ *
+ * @return DBMS가 지원하는 경우 update 적용 결과 count
+ */
+ @Override
+ public int update(String queryId, Object parameterObject) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().update(queryId, parameterObject);
+ }
+
+ /**
+ * 삭제 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 삭제 처리 SQL mapping 쿼리 ID
+ *
+ * @return DBMS가 지원하는 경우 delete 적용 결과 count
+ */
+ @Override
+ public int delete(String queryId) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().delete(queryId);
+ }
+
+ /**
+ * 삭제 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 삭제 처리 SQL mapping 쿼리 ID
+ * @param parameterObject - 삭제 처리 SQL mapping 입력 데이터(일반적으로 key 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
+ *
+ * @return DBMS가 지원하는 경우 delete 적용 결과 count
+ */
+ @Override
+ public int delete(String queryId, Object parameterObject) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().delete(queryId, parameterObject);
+ }
+
+ //CHECKSTYLE:OFF
+ /**
+ * 명명규칙에 맞춰 selectOne()로 변경한다.
+ * @deprecated select() 메소드로 대체
+ *
+ * @see EgovAbstractMapper.selectOne()
+ */
+ //CHECKSTYLE:ON
+ @Deprecated
+ public Object selectByPk(String queryId, Object parameterObject) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectOne(queryId, parameterObject);
+ }
+
+ /**
+ * 단건조회 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
+ *
+ * @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)
+ */
+ @Override
+ public T selectOne(String queryId) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectOne(queryId);
+ }
+
+ /**
+ * 단건조회 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
+ * @param parameterObject - 단건 조회 처리 SQL mapping 입력 데이터(key)를 세팅한 파라메터 객체(보통 VO 또는 Map)
+ *
+ * @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)
+ */
+ @Override
+ public T selectOne(String queryId, Object parameterObject) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectOne(queryId, parameterObject);
+ }
+
+ /**
+ * 결과 목록을 Map 을 변환한다.
+ * 모든 구문이 파라미터를 필요로 하지는 않기 때문에, 파라미터 객체를 요구하지 않는 형태로 오버로드되었다.
+ *
+ * @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
+ * @param mapKey - 결과 객체의 프로퍼티 중 하나를 키로 사용
+ *
+ * @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)의 Map
+ */
+ @Override
+ public Map selectMap(String queryId, String mapKey) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectMap(queryId, mapKey);
+ }
+
+ /**
+ * 결과 목록을 Map 을 변환한다.
+ * 모든 구문이 파라미터를 필요로 하지는 않기 때문에, 파라미터 객체를 요구하지 않는 형태로 오버로드되었다.
+ *
+ * @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
+ * @param parameterObject - 맵 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
+ * @param mapKey - 결과 객체의 프로퍼티 중 하나를 키로 사용
+ *
+ * @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)의 Map
+ */
+ @Override
+ public Map selectMap(String queryId, Object parameterObject, String mapKey) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectMap(queryId, parameterObject, mapKey);
+ }
+
+ /**
+ * 결과 목록을 Map 을 변환한다.
+ * 모든 구문이 파라미터를 필요로 하지는 않기 때문에, 파라미터 객체를 요구하지 않는 형태로 오버로드되었다.
+ *
+ * @param queryId - 단건 조회 처리 SQL mapping 쿼리 ID
+ * @param parameterObject - 맵 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
+ * @param mapKey - 결과 객체의 프로퍼티 중 하나를 키로 사용
+ * @param rowBounds - 특정 개수 만큼의 레코드를 건너띄게 함
+ *
+ * @return 결과 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 단일 결과 객체(보통 VO 또는 Map)의 Map
+ */
+ @Override
+ public Map selectMap(String queryId, Object parameterObject, String mapKey, RowBounds rowBounds) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectMap(queryId, parameterObject, mapKey, rowBounds);
+ }
+
+ //CHECKSTYLE:OFF
+ /**
+ * 명명규칙에 맞춰 selectList()로 변경한다.
+ *
+ * @see EgovAbstractMapper.selectList()
+ * @deprecated List> 메소드로 대체
+ */
+ //CHECKSTYLE:ON
+ @Deprecated
+ public List> list(String queryId, Object parameterObject) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectList(queryId, parameterObject);
+ }
+
+ /**
+ * 리스트 조회 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
+ *
+ * @return 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 결과 객체(보통 VO 또는 Map)의 List
+ */
+ @Override
+ public List selectList(String queryId) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectList(queryId);
+ }
+
+ /**
+ * 리스트 조회 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
+ * @param parameterObject - 리스트 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
+ *
+ * @return 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 결과 객체(보통 VO 또는 Map)의 List
+ */
+ @Override
+ public List selectList(String queryId, Object parameterObject) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectList(queryId, parameterObject);
+ }
+
+ /**
+ * 리스트 조회 처리 SQL mapping 을 실행한다.
+ *
+ * @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
+ * @param parameterObject - 리스트 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
+ * @param rowBounds - 특정 개수 만큼의 레코드를 건너띄게 함
+ *
+ * @return 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 결과 객체(보통 VO 또는 Map)의 List
+ */
+ @Override
+ public List selectList(String queryId, Object parameterObject, RowBounds rowBounds) {
+ LOGGER.debug("queryId = "+queryId);
+ return getSqlSession().selectList(queryId, parameterObject, rowBounds);
+ }
+
+ /**
+ * 부분 범위 리스트 조회 처리 SQL mapping 을 실행한다.
+ * (부분 범위 - pageIndex 와 pageSize 기반으로 현재 부분 범위 조회를 위한 skipResults, maxResults 를 계산하여 ibatis 호출)
+ *
+ * @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
+ * @param parameterObject - 리스트 조회 처리 SQL mapping 입력 데이터(조회 조건)를 세팅한 파라메터 객체(보통 VO 또는 Map)
+ * @param pageIndex - 현재 페이지 번호
+ * @param pageSize - 한 페이지 조회 수(pageSize)
+ *
+ * @return 부분 범위 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 부분 범위 결과 객체(보통 VO 또는 Map) List
+ */
+ @Override
+ public List> listWithPaging(String queryId, Object parameterObject, int pageIndex, int pageSize) {
+ LOGGER.debug("queryId = "+queryId);
+ int skipResults = pageIndex * pageSize;
+ //int maxResults = (pageIndex * pageSize) + pageSize;
+
+ RowBounds rowBounds = new RowBounds(skipResults, pageSize);
+
+ return getSqlSession().selectList(queryId, parameterObject, rowBounds);
+ }
+
+ /**
+ * SQL 조회 결과를 ResultHandler를 이용해서 출력한다.
+ * ResultHandler를 상속해 구현한 커스텀 핸들러의 handleResult() 메서드에 따라 실행된다.
+ *
+ * @param queryId - 리스트 조회 처리 SQL mapping 쿼리 ID
+ * @param handler - 조회 결과를 제어하기 위해 구현한 ResultHandler
+ * @return
+ *
+ * @return 결과 List 객체 - SQL mapping 파일에서 지정한 resultType/resultMap 에 의한 결과 객체(보통 VO 또는 Map)의 List
+ */
+ @Override
+ public void listToOutUsingResultHandler(String queryId, ResultHandler handler) {
+ LOGGER.debug("queryId = "+queryId);
+ getSqlSession().select(queryId, handler);
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/service/impl/EgovFileMngServiceImpl.java b/src/main/java/egovframework/com/cmm/service/impl/EgovFileMngServiceImpl.java
new file mode 100644
index 0000000..ba75123
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/impl/EgovFileMngServiceImpl.java
@@ -0,0 +1,193 @@
+package egovframework.com.cmm.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import egovframework.com.cmm.service.EgovFileMngService;
+import egovframework.com.cmm.service.FileVO;
+import kccf.bbs.vo.AttachmentVO;
+
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+/**
+ * @Class Name : EgovFileMngServiceImpl.java
+ * @Description : 파일정보의 관리를 위한 구현 클래스
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------- -------------------
+ * 2009. 3. 25. 이삼섭 최초생성
+ *
+ * @author 공통 서비스 개발팀 이삼섭
+ * @since 2009. 3. 25.
+ * @version
+ * @see
+ *
+ */
+@Service("EgovFileMngService")
+public class EgovFileMngServiceImpl extends EgovAbstractServiceImpl implements EgovFileMngService {
+
+ @Resource(name = "FileManageDAO")
+ private FileManageDAO fileMngDAO;
+
+ /**
+ * 문화원 파일에 대한 목록 리스트를 조회한다.
+ *
+ */
+ public List selectFileListByCntntsId(AttachmentVO attachmentVO) throws Exception {
+ if(attachmentVO.getCntntsGroupId()!=null) {
+ if(attachmentVO.getCntntsGroupId().equals("N000000000000000000020") || attachmentVO.getCntntsGroupId().equals("N000000000000000000021")) {
+ return fileMngDAO.selectViewFileListByCntntsId(attachmentVO);
+ } else {
+ return fileMngDAO.selectFileListByCntntsId(attachmentVO);
+ }
+ } else {
+ return fileMngDAO.selectFileListByCntntsId(attachmentVO);
+ }
+
+ }
+
+ /**
+ * 문화원 파일에 대한 상세정보를 조회한다.
+ *
+ */
+ public AttachmentVO selectFileDetailByKF(AttachmentVO attachmentVO) throws Exception {
+ return fileMngDAO.selectFileDetailByKF(attachmentVO);
+ }
+
+ /**
+ * 문화원 여러 개의 파일을 삭제한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#deleteFileInfs(java.util.List)
+ */
+ public void deleteFileInfsByKF(List deleteFiles) throws Exception {
+ fileMngDAO.deleteFileInfsByKF(deleteFiles);
+ }
+
+
+ /**
+ * 여러 개의 파일을 삭제한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#deleteFileInfs(java.util.List)
+ */
+ public void deleteFileInfs(List> fvoList) throws Exception {
+ fileMngDAO.deleteFileInfs(fvoList);
+ }
+
+ /**
+ * 하나의 파일에 대한 정보(속성 및 상세)를 등록한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#insertFileInf(egovframework.com.cmm.service.FileVO)
+ */
+ public String insertFileInf(FileVO fvo) throws Exception {
+ String atchFileId = fvo.getAtchFileId();
+
+ fileMngDAO.insertFileInf(fvo);
+
+ return atchFileId;
+ }
+
+ /**
+ * 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#insertFileInfs(java.util.List)
+ */
+ public String insertFileInfs(List> fvoList) throws Exception {
+ String atchFileId = "";
+
+ if (fvoList.size() != 0) {
+ atchFileId = fileMngDAO.insertFileInfsByKF(fvoList);
+ //atchFileId = fileMngDAO.insertFileInfs(fvoList);
+ }
+ if (atchFileId == "") {
+ atchFileId = null;
+ }
+ return atchFileId;
+ }
+
+ /**
+ * 파일에 대한 목록을 조회한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#selectFileInfs(egovframework.com.cmm.service.FileVO)
+ */
+ public List selectFileInfs(FileVO fvo) throws Exception {
+ return fileMngDAO.selectFileInfs(fvo);
+ }
+
+ /**
+ * 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#updateFileInfs(java.util.List)
+ */
+ public void updateFileInfs(List> fvoList) throws Exception {
+ //Delete & Insert
+ fileMngDAO.updateFileInfs(fvoList);
+ }
+
+ /**
+ * 하나의 파일을 삭제한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#deleteFileInf(egovframework.com.cmm.service.FileVO)
+ */
+ public void deleteFileInf(FileVO fvo) throws Exception {
+ fileMngDAO.deleteFileInf(fvo);
+ }
+
+ /**
+ * 파일에 대한 상세정보를 조회한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#selectFileInf(egovframework.com.cmm.service.FileVO)
+ */
+ public FileVO selectFileInf(FileVO fvo) throws Exception {
+ return fileMngDAO.selectFileInf(fvo);
+ }
+
+ /**
+ * 파일 구분자에 대한 최대값을 구한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#getMaxFileSN(egovframework.com.cmm.service.FileVO)
+ */
+ public int getMaxFileSN(FileVO fvo) throws Exception {
+ return fileMngDAO.getMaxFileSN(fvo);
+ }
+
+ /**
+ * 전체 파일을 삭제한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#deleteAllFileInf(egovframework.com.cmm.service.FileVO)
+ */
+ public void deleteAllFileInf(FileVO fvo) throws Exception {
+ fileMngDAO.deleteAllFileInf(fvo);
+ }
+
+ /**
+ * 파일명 검색에 대한 목록을 조회한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#selectFileListByFileNm(egovframework.com.cmm.service.FileVO)
+ */
+ public Map selectFileListByFileNm(FileVO fvo) throws Exception {
+ List result = fileMngDAO.selectFileListByFileNm(fvo);
+ int cnt = fileMngDAO.selectFileListCntByFileNm(fvo);
+
+ Map map = new HashMap();
+
+ map.put("resultList", result);
+ map.put("resultCnt", Integer.toString(cnt));
+
+ return map;
+ }
+
+ /**
+ * 이미지 파일에 대한 목록을 조회한다.
+ *
+ * @see egovframework.com.cmm.service.EgovFileMngService#selectImageFileList(egovframework.com.cmm.service.FileVO)
+ */
+ public List selectImageFileList(FileVO vo) throws Exception {
+ return fileMngDAO.selectImageFileList(vo);
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/service/impl/EgovUserDetailsSessionServiceImpl.java b/src/main/java/egovframework/com/cmm/service/impl/EgovUserDetailsSessionServiceImpl.java
new file mode 100644
index 0000000..a6844f2
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/impl/EgovUserDetailsSessionServiceImpl.java
@@ -0,0 +1,54 @@
+package egovframework.com.cmm.service.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import egovframework.com.cmm.service.EgovUserDetailsService;
+
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import org.egovframe.rte.fdl.access.service.EgovUserDetailsHelper;
+
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+
+/**
+ *
+ * @author 공통서비스 개발팀 서준식
+ * @since 2011. 6. 25.
+ * @version 1.0
+ * @see
+ *
+ *
+ * 개정이력(Modification Information)
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2011. 8. 12. 서준식 최초생성
+ *
+ *
+ */
+
+public class EgovUserDetailsSessionServiceImpl extends EgovAbstractServiceImpl implements EgovUserDetailsService {
+
+ /**
+ * 인증된 사용자객체를 VO형식으로 가져온다.
+ * @return Object - 사용자 ValueObject
+ */
+ public Object getAuthenticatedUser() {
+ if (EgovUserDetailsHelper.isAuthenticated()) {
+ return EgovUserDetailsHelper.getAuthenticatedUser();
+ }
+ return null;
+ }
+
+ public List getAuthorities() {
+ // 권한 설정을 리턴한다.
+ return EgovUserDetailsHelper.getAuthorities();
+ }
+
+ public Boolean isAuthenticated() {
+ // 인증된 유저인지 확인한다.
+ return EgovUserDetailsHelper.isAuthenticated();
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/service/impl/FileManageDAO.java b/src/main/java/egovframework/com/cmm/service/impl/FileManageDAO.java
new file mode 100644
index 0000000..d8cf5c9
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/service/impl/FileManageDAO.java
@@ -0,0 +1,246 @@
+package egovframework.com.cmm.service.impl;
+
+import java.util.Iterator;
+import java.util.List;
+
+import egovframework.com.cmm.service.FileVO;
+import kccf.bbs.vo.AttachmentVO;
+
+import org.springframework.stereotype.Repository;
+
+/**
+ * @Class Name : EgovFileMngDAO.java
+ * @Description : 파일정보 관리를 위한 데이터 처리 클래스
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------- -------------------
+ * 2009. 3. 25. 이삼섭 최초생성
+ *
+ * @author 공통 서비스 개발팀 이삼섭
+ * @since 2009. 3. 25.
+ * @version
+ * @see
+ *
+ */
+@Repository("FileManageDAO")
+public class FileManageDAO extends EgovComAbstractDAO {
+
+ /**
+ * 문화원 파일에 대한 목록을 조회한다.
+ *
+ * @param attachmentVO
+ * @return
+ * @throws Exception
+ */
+ public List selectFileListByCntntsId(AttachmentVO attachmentVO) throws Exception {
+ return selectList("FileManageDAO.selectFileListByCntntsId", attachmentVO);
+ }
+
+ public List selectViewFileListByCntntsId(AttachmentVO attachmentVO) throws Exception {
+ return selectList("FileManageDAO.selectViewFileListByCntntsId", attachmentVO);
+ }
+
+ /**
+ * 문화원 파일에 대한 상세정보를 조회한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public AttachmentVO selectFileDetailByKF(AttachmentVO attachmentVO) throws Exception {
+ return selectOne("FileManageDAO.selectFileDetailByKF", attachmentVO);
+ }
+
+ /**
+ * 문화원 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
+ *
+ * @param fileList
+ * @return
+ * @throws Exception
+ */
+ public String insertFileInfsByKF(List> fileList) throws Exception {
+ AttachmentVO vo = (AttachmentVO) fileList.get(0);
+ String atchFileId = vo.getAtchmnflId();
+
+
+ Iterator> iter = fileList.iterator();
+ while (iter.hasNext()) {
+ vo = (AttachmentVO) iter.next();
+
+ insert("FileManageDAO.insertFileDetailByKF", vo);
+ }
+
+ return atchFileId;
+ }
+
+ /**
+ * 문화원 여러 개의 파일을 삭제한다.
+ *
+ * @param fileList
+ * @throws Exception
+ */
+ public void deleteFileInfsByKF(List deleteFiles) throws Exception {
+ Iterator> iter = deleteFiles.iterator();
+ AttachmentVO vo;
+ while (iter.hasNext()) {
+ vo = (AttachmentVO) iter.next();
+
+ update("FileManageDAO.deleteFileInfsByKF", vo);
+ }
+ }
+
+ /**
+ * 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
+ *
+ * @param fileList
+ * @return
+ * @throws Exception
+ */
+ public String insertFileInfs(List> fileList) throws Exception {
+ FileVO vo = (FileVO) fileList.get(0);
+ String atchFileId = vo.getAtchFileId();
+
+ insert("FileManageDAO.insertFileMaster", vo);
+
+ Iterator> iter = fileList.iterator();
+ while (iter.hasNext()) {
+ vo = (FileVO) iter.next();
+
+ insert("FileManageDAO.insertFileDetail", vo);
+ }
+
+ return atchFileId;
+ }
+
+ /**
+ * 하나의 파일에 대한 정보(속성 및 상세)를 등록한다.
+ *
+ * @param vo
+ * @throws Exception
+ */
+ public void insertFileInf(FileVO vo) throws Exception {
+ insert("FileManageDAO.insertFileMaster", vo);
+ insert("FileManageDAO.insertFileDetail", vo);
+ }
+
+ /**
+ * 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다.
+ *
+ * @param fileList
+ * @throws Exception
+ */
+ public void updateFileInfs(List> fileList) throws Exception {
+ FileVO vo;
+ Iterator> iter = fileList.iterator();
+ while (iter.hasNext()) {
+ vo = (FileVO) iter.next();
+ insert("FileManageDAO.insertFileDetail", vo);
+ }
+ }
+
+ /**
+ * 여러 개의 파일을 삭제한다.
+ *
+ * @param fileList
+ * @throws Exception
+ */
+ public void deleteFileInfs(List> fileList) throws Exception {
+ Iterator> iter = fileList.iterator();
+ AttachmentVO vo;
+ while (iter.hasNext()) {
+ vo = (AttachmentVO) iter.next();
+
+ update("FileManageDAO.deleteFileDetail", vo);
+ }
+ }
+
+ /**
+ * 하나의 파일을 삭제한다.
+ *
+ * @param fvo
+ * @throws Exception
+ */
+ public void deleteFileInf(FileVO fvo) throws Exception {
+ delete("FileManageDAO.deleteFileDetail", fvo);
+ }
+
+ /**
+ * 파일에 대한 목록을 조회한다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List selectFileInfs(FileVO vo) throws Exception {
+ return (List) list("FileManageDAO.selectFileList", vo);
+ }
+
+ /**
+ * 파일 구분자에 대한 최대값을 구한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public int getMaxFileSN(FileVO fvo) throws Exception {
+ return (Integer) selectOne("FileManageDAO.getMaxFileSN", fvo);
+ }
+
+ /**
+ * 파일에 대한 상세정보를 조회한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public FileVO selectFileInf(FileVO fvo) throws Exception {
+ return (FileVO) selectOne("FileManageDAO.selectFileInf", fvo);
+ }
+
+ /**
+ * 전체 파일을 삭제한다.
+ *
+ * @param fvo
+ * @throws Exception
+ */
+ public void deleteAllFileInf(FileVO fvo) throws Exception {
+ update("FileManageDAO.deleteCOMTNFILE", fvo);
+ }
+
+ /**
+ * 파일명 검색에 대한 목록을 조회한다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List selectFileListByFileNm(FileVO fvo) throws Exception {
+ return (List) list("FileManageDAO.selectFileListByFileNm", fvo);
+ }
+
+ /**
+ * 파일명 검색에 대한 목록 전체 건수를 조회한다.
+ *
+ * @param fvo
+ * @return
+ * @throws Exception
+ */
+ public int selectFileListCntByFileNm(FileVO fvo) throws Exception {
+ return (Integer) selectOne("FileManageDAO.selectFileListCntByFileNm", fvo);
+ }
+
+ /**
+ * 이미지 파일에 대한 목록을 조회한다.
+ *
+ * @param vo
+ * @return
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List selectImageFileList(FileVO vo) throws Exception {
+ return (List) list("FileManageDAO.selectImageFileList", vo);
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/taglibs/DoubleSubmitTag.java b/src/main/java/egovframework/com/cmm/taglibs/DoubleSubmitTag.java
new file mode 100644
index 0000000..95a750a
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/taglibs/DoubleSubmitTag.java
@@ -0,0 +1,88 @@
+package egovframework.com.cmm.taglibs;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import egovframework.com.cmm.util.EgovDoubleSubmitHelper;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * TagSupport to support to double submit preventer
+ * @author Vincent Han
+ * @since 2014.08.07
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2014.08.07 표준프레임워크센터 최초 생성
+ *
+ *
+ */
+public class DoubleSubmitTag extends TagSupport {
+ private static final Logger LOGGER = LoggerFactory.getLogger(DoubleSubmitTag.class);
+
+ /**
+ * Generated Serial Version UID
+ */
+ private static final long serialVersionUID = 5242217605452312594L;
+
+ private String tokenKey = EgovDoubleSubmitHelper.DEFAULT_TOKEN_KEY;
+
+ public String getTokenKey() {
+ return tokenKey;
+ }
+
+ public void setTokenKey(String tokenKey) {
+ this.tokenKey = tokenKey;
+ }
+
+ @SuppressWarnings("unchecked")
+ public int doStartTag() throws JspException {
+ StringBuilder buffer = new StringBuilder();
+
+ HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
+ HttpSession session = request.getSession();
+
+ Map map = null;
+
+ if (session.getAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY) == null) {
+ map = new HashMap();
+
+ session.setAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY, map);
+ } else {
+ map = (Map) session.getAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY);
+ }
+
+ // First call (check session)
+ if (map.get(tokenKey) == null) {
+
+ map.put(tokenKey, EgovDoubleSubmitHelper.getNewUUID());
+
+ LOGGER.debug("[Double Submit] session token created({}) : {}", tokenKey, map.get(tokenKey));
+ }
+
+ buffer.append(" ");
+
+ try {
+ pageContext.getOut().print(buffer.toString());
+ } catch (IOException e) {
+ throw new JspTagException("Error: IOException while writing to the user");
+ }
+
+ return SKIP_BODY;
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/util/EgovBasicLogger.java b/src/main/java/egovframework/com/cmm/util/EgovBasicLogger.java
new file mode 100644
index 0000000..5911261
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/EgovBasicLogger.java
@@ -0,0 +1,83 @@
+package egovframework.com.cmm.util;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utility class to support to logging information
+ * @author Vincent Han
+ * @since 2014.09.18
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2014.09.18 표준프레임워크센터 최초 생성
+ *
+ *
+ */
+public class EgovBasicLogger {
+ private static final Level IGNORE_INFO_LEVEL = Level.OFF;
+ private static final Level DEBUG_INFO_LEVEL = Level.FINEST;
+ private static final Level INFO_INFO_LEVEL = Level.INFO;
+
+ private static final Logger ignoreLogger = Logger.getLogger("ignore");
+ private static final Logger debugLogger = Logger.getLogger("debug");
+ private static final Logger infoLogger = Logger.getLogger("info");
+
+ /**
+ * 기록이나 처리가 불필요한 경우 사용.
+ * @param message
+ * @param exception
+ */
+ public static void ignore(String message, Exception exception) {
+ if (exception == null) {
+ ignoreLogger.log(IGNORE_INFO_LEVEL, message);
+ } else {
+ ignoreLogger.log(IGNORE_INFO_LEVEL, message, exception);
+ }
+ }
+
+ /**
+ * 기록이나 처리가 불필요한 경우 사용.
+ * @param message
+ * @param exception
+ */
+ public static void ignore(String message) {
+ ignore(message, null);
+ }
+
+ /**
+ * 디버그 정보를 기록하는 경우 사용.
+ * @param message
+ * @param exception
+ */
+ public static void debug(String message, Exception exception) {
+ if (exception == null) {
+ debugLogger.log(DEBUG_INFO_LEVEL, message);
+ } else {
+ debugLogger.log(DEBUG_INFO_LEVEL, message, exception);
+ }
+ }
+
+ /**
+ * 디버그 정보를 기록하는 경우 사용.
+ * @param message
+ * @param exception
+ */
+ public static void debug(String message) {
+ debug(message, null);
+ }
+
+ /**
+ * 일반적이 정보를 기록하는 경우 사용.
+ * @param message
+ * @param exception
+ */
+ public static void info(String message) {
+ infoLogger.log(INFO_INFO_LEVEL, message);
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/util/EgovDoubleSubmitHelper.java b/src/main/java/egovframework/com/cmm/util/EgovDoubleSubmitHelper.java
new file mode 100644
index 0000000..672087e
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/EgovDoubleSubmitHelper.java
@@ -0,0 +1,80 @@
+package egovframework.com.cmm.util;
+
+import java.util.Map;
+import java.util.UUID;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+/**
+ * Utility class to support to double submit preventer
+ * @author Vincent Han
+ * @since 2014.08.07
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2014.08.07 표준프레임워크센터 최초 생성
+ *
+ *
+ */
+public class EgovDoubleSubmitHelper {
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovDoubleSubmitHelper.class);
+
+ public final static String SESSION_TOKEN_KEY = "egovframework.double.submit.preventer.session.key";
+
+ public final static String PARAMETER_NAME = "egovframework.double.submit.preventer.parameter.name";
+
+ public final static String DEFAULT_TOKEN_KEY = "DEFAULT";
+
+ public static String getNewUUID() {
+ return UUID.randomUUID().toString().toUpperCase();
+ }
+
+ public static boolean checkAndSaveToken() {
+ return checkAndSaveToken(DEFAULT_TOKEN_KEY);
+ }
+
+ public static boolean checkAndSaveToken(String tokenKey) {
+
+ HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+ HttpSession session = request.getSession();
+
+ // check session...
+ if (session.getAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY) == null) {
+ throw new RuntimeException("Double Submit Preventer TagLig isn't set. Check JSP.");
+ }
+
+ String parameter = request.getParameter(EgovDoubleSubmitHelper.PARAMETER_NAME);
+
+ // check parameter
+ if (parameter == null) {
+ throw new RuntimeException("Double Submit Preventer parameter isn't set. Check JSP.");
+ }
+
+ @SuppressWarnings("unchecked")
+ Map map = (Map) session.getAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY);
+
+ if (parameter.equals(map.get(tokenKey))) {
+
+ LOGGER.debug("[Double Submit] session token ({}) equals to parameter token.", tokenKey);
+
+ map.put(tokenKey, getNewUUID());
+
+ return true;
+ }
+
+ LOGGER.debug("[Double Submit] session token ({}) isn't equal to parameter token.", tokenKey);
+
+ return false;
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/util/EgovHttpRequestHelper.java b/src/main/java/egovframework/com/cmm/util/EgovHttpRequestHelper.java
new file mode 100644
index 0000000..4da5ef4
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/EgovHttpRequestHelper.java
@@ -0,0 +1,56 @@
+package egovframework.com.cmm.util;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+/**
+ * @Class Name : EgovHttpRequestHelper.java
+ * @Description : HTTP Request 정보 취득 Helper 클래스
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------- -------------------
+ * 2014.09.11 표준프레임워크 최초생성
+* @author Vincent Han
+ * @since 2014.09.11
+ * @version 3.5
+ * @see
+ * web.xml 상에 다음과 같은 Listener 등록 필요
+ * <listener>
+ * <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
+ * </listener>
+ *
+ */
+public class EgovHttpRequestHelper {
+
+ public static boolean isInHttpRequest() {
+ try {
+ getCurrentRequest();
+ } catch (IllegalStateException ise) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public static HttpServletRequest getCurrentRequest() {
+ ServletRequestAttributes sra = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();
+
+ return sra.getRequest();
+ }
+
+ public static String getRequestIp() {
+ return getCurrentRequest().getRemoteAddr();
+ }
+
+ public static String getRequestURI() {
+ return getCurrentRequest().getRequestURI();
+ }
+
+ public static HttpSession getCurrentSession() {
+ return getCurrentRequest().getSession();
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/util/EgovMybaitsUtil.java b/src/main/java/egovframework/com/cmm/util/EgovMybaitsUtil.java
new file mode 100644
index 0000000..542b669
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/EgovMybaitsUtil.java
@@ -0,0 +1,135 @@
+package egovframework.com.cmm.util;
+
+import java.lang.reflect.Array;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * EgovMybaitsUtil 클래스
+ *
+ * @author 장동한
+ * @since 2016.06.07
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------------- ----------------------
+ * 2016.06.07 장동한 최초 생성
+ * 2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
+ * 2017.07.21 장동한 isEquals에서 String Character 비교 가능하도록
+ *
+ *
+ */
+
+
+public class EgovMybaitsUtil {
+
+ private static final Logger logger = LoggerFactory.getLogger(EgovMybaitsUtil.class);
+
+ /**
+ * Empty 여부를 확인한다.
+ * @param o Object
+ * @return boolean
+ * @exception IllegalArgumentException
+ */
+ public static boolean isEmpty(Object o) throws IllegalArgumentException {
+ try {
+ if(o == null) return true;
+
+ if(o instanceof String) {
+ if(((String)o).length() == 0){
+ return true;
+ }
+ } else if(o instanceof Collection) {
+ if(((Collection)o).isEmpty()){
+ return true;
+ }
+ } else if(o.getClass().isArray()) {
+ if(Array.getLength(o) == 0){
+ return true;
+ }
+ } else if(o instanceof Map) {
+ if(((Map)o).isEmpty()){
+ return true;
+ }
+ }else {
+ return false;
+ }
+
+ return false;
+ //2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
+ } catch(IllegalArgumentException e) {
+ logger.error("[IllegalArgumentException] Try/Catch...usingParameters Runing : "+ e.getMessage());
+ } catch(Exception e) {
+ logger.error("["+e.getClass()+"] Try/Catch...Exception : " + e.getMessage());
+ }
+ return false;
+ }
+
+ /**
+ * Not Empty 여부를 확인한다.
+ * @param o Object
+ * @return boolean
+ * @exception IllegalArgumentException
+ */
+ public static boolean isNotEmpty(Object o) {
+ return !isEmpty(o);
+ }
+
+ /**
+ * Equal 여부를 확인한다.
+ * @param obj Object, obj Object
+ * @return boolean
+ */
+
+ public static boolean isEquals(Object obj, Object obj2){
+ if(isEmpty(obj)) return false;
+
+ if(obj instanceof String && obj2 instanceof String) {
+ if( (String.valueOf(obj)).equals( String.valueOf(obj2) )){
+ return true;
+ }
+ }else if(obj instanceof String && obj2 instanceof Character) {
+ if( (String.valueOf(obj) ).equals( String.valueOf(obj2) )){
+ return true;
+ }
+ }else if(obj instanceof String && obj2 instanceof Integer) {
+ if( (String.valueOf(obj)).equals( String.valueOf((Integer)obj2) )){
+ return true;
+ }
+
+ }else if(obj instanceof Integer && obj2 instanceof String) {
+ if( (String.valueOf(obj2)).equals( String.valueOf((Integer)obj) )){
+ return true;
+ }
+ } else if(obj instanceof Integer && obj instanceof Integer) {
+ if((Integer)obj == (Integer)obj2){
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * String의 Equal 여부를 확인한다.
+ * @param obj Object, obj Object
+ * @return boolean
+ */
+ public static boolean isEqualsStr(Object obj, String s){
+ if(isEmpty(obj)) return false;
+
+ if(s.equals(String.valueOf(obj))){
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/util/EgovResourceCloseHelper.java b/src/main/java/egovframework/com/cmm/util/EgovResourceCloseHelper.java
new file mode 100644
index 0000000..4901b15
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/EgovResourceCloseHelper.java
@@ -0,0 +1,146 @@
+package egovframework.com.cmm.util;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Wrapper;
+
+/**
+ * Utility class to support to close resources
+ * @author Vincent Han
+ * @since 2014.09.18
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2014.09.18 표준프레임워크센터 최초 생성
+ *
+ *
+ */
+public class EgovResourceCloseHelper {
+ /**
+ * Resource close 처리.
+ * @param resources
+ */
+ public static void close(Closeable ... resources) {
+ for (Closeable resource : resources) {
+ if (resource != null) {
+ try {
+ resource.close();
+ } catch (IOException ignore) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
+ EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
+ } catch (Exception ignore) {
+ EgovBasicLogger.ignore("Occurred Exception to close resource is ingored!!");
+ }
+ }
+ }
+ }
+
+ /**
+ * JDBC 관련 resource 객체 close 처리
+ * @param objects
+ */
+ public static void closeDBObjects(Wrapper ... objects) {
+ for (Object object : objects) {
+ if (object != null) {
+ if (object instanceof ResultSet) {
+ try {
+ ((ResultSet)object).close();
+ } catch (SQLException ignore) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
+ EgovBasicLogger.ignore("Occurred SQLException to close resource is ingored!!");
+ } catch (Exception ignore) {
+ EgovBasicLogger.ignore("Occurred Exception to close resource is ingored!!");
+ }
+ } else if (object instanceof Statement) {
+ try {
+ ((Statement)object).close();
+ } catch (SQLException ignore) {//KISA 보안약점 조치 (2018-10-29, 윤창원)
+ EgovBasicLogger.ignore("Occurred SQLException to close resource is ingored!!");
+ } catch (Exception ignore) {
+ EgovBasicLogger.ignore("Occurred Exception to close resource is ingored!!");
+ }
+ } else if (object instanceof Connection) {
+ try {
+ ((Connection)object).close();
+ } catch (SQLException ignore) {
+ EgovBasicLogger.ignore("Occurred SQLException to close resource is ingored!!");
+ } catch (Exception ignore) {
+ EgovBasicLogger.ignore("Occurred Exception to close resource is ingored!!");
+ }
+ } else {
+ throw new IllegalArgumentException("Wrapper type is not found : " + object.toString());
+ }
+ }
+ }
+ }
+
+ /**
+ * Socket 관련 resource 객체 close 처리
+ * @param objects
+ */
+ public static void closeSocketObjects(Socket socket, ServerSocket server) {
+ if (socket != null) {
+ try {
+ socket.shutdownOutput();
+ } catch (IOException ignore) {
+ EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
+ } catch (Exception ignore) {
+ EgovBasicLogger.ignore("Occurred Exception to shutdown ouput is ignored!!");
+ }
+
+ try {
+ socket.close();
+ } catch (IOException ignore) {
+ EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
+ } catch (Exception ignore) {
+ EgovBasicLogger.ignore("Occurred Exception to close resource is ignored!!");
+ }
+ }
+
+ if (server != null) {
+ try {
+ server.close();
+ } catch (IOException ignore) {
+ EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
+ } catch (Exception ignore) {
+ EgovBasicLogger.ignore("Occurred Exception to close resource is ignored!!");
+ }
+ }
+ }
+
+ /**
+ * Socket 관련 resource 객체 close 처리
+ *
+ * @param sockets
+ */
+ public static void closeSockets(Socket ... sockets) {
+ for (Socket socket : sockets) {
+ if (socket != null) {
+ try {
+ socket.shutdownOutput();
+ } catch (IOException ignore) {
+ EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
+ } catch (Exception ignore) {
+ EgovBasicLogger.ignore("Occurred Exception to shutdown ouput is ignored!!");
+ }
+
+ try {
+ socket.close();
+ } catch (IOException ignore) {
+ EgovBasicLogger.ignore("Occurred IOException to close resource is ingored!!");
+ } catch (Exception ignore) {
+ EgovBasicLogger.ignore("Occurred Exception to close resource is ignored!!");
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/egovframework/com/cmm/util/EgovUrlRewriteFilter.java b/src/main/java/egovframework/com/cmm/util/EgovUrlRewriteFilter.java
new file mode 100644
index 0000000..323683d
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/EgovUrlRewriteFilter.java
@@ -0,0 +1,112 @@
+package egovframework.com.cmm.util;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.util.AntPathMatcher;
+
+import egovframework.com.cmm.EgovWebUtil;
+
+/**
+ * @Class Name : UrlRewriteFilter.java
+ * @Description : UrlRewriteFilter Class
+ * @Modification Information
+ * @
+ * @ 수정일 수정자 수정내용
+ * @ ---------- --------- -------------------------------
+ * @ 2014.09.30 최초생성
+ * @ 2020.11.02 신용호 KISA 보안약점 조치 (CRLF 제거 조치)
+ *
+ * @author 전자정부 표준프레임워크 유지보수
+ * @since 2014. 09.30
+ * @version 1.0
+ * @see
+ *
+ * Copyright (C) by MOPAS All right reserved.
+ */
+public class EgovUrlRewriteFilter implements Filter {
+
+ @SuppressWarnings("unused")
+ private FilterConfig config;
+
+ private String targetURI;
+ private String httpsPort;
+ private String httpPort;
+
+ private String[] uriPatterns;
+
+ @Override
+ public void init(FilterConfig config) throws ServletException {
+
+ String delimiter = ",";
+ this.config = config;
+
+ this.targetURI = config.getInitParameter("targetURI");
+ this.httpsPort = config.getInitParameter("httpsPort");
+ this.httpPort = config.getInitParameter("httpPort");
+
+ this.uriPatterns = targetURI.split(delimiter);
+
+ }
+
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
+
+ HttpServletRequest req = (HttpServletRequest) request;
+ HttpServletResponse res = (HttpServletResponse) response;
+
+ String uri = req.getRequestURI();
+ String getProtocol = req.getScheme();
+ String getDomain = req.getServerName();
+
+ AntPathMatcher pm = new AntPathMatcher();
+
+ for (String uriPattern : uriPatterns) {
+
+ if (pm.match(uriPattern.trim(), uri)) {
+
+ if (getProtocol.toLowerCase().equals("http")) {
+
+ response.setContentType("text/html");
+
+ String httpsPath = "https" + "://" + getDomain + ":" + httpsPort + uri;
+ String site = new String(httpsPath);
+ res.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
+ res.setHeader("Location", EgovWebUtil.removeCRLF(site));
+
+ }
+
+ }else if(getProtocol.toLowerCase().equals("https")){
+
+ response.setContentType("text/html");
+
+ String httpPath = "http" + "://" + getDomain + ":" + httpPort + uri;
+
+ String site = new String(httpPath);
+ res.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
+ res.setHeader("Location", EgovWebUtil.removeCRLF(site));
+
+ }
+ }
+
+ chain.doFilter(req, res);
+
+ }
+
+ @Override
+ public void destroy() {
+ this.targetURI = null;
+ this.httpsPort = null;
+ this.httpPort = null;
+ this.uriPatterns = null;
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/util/EgovUserDetailsHelper.java b/src/main/java/egovframework/com/cmm/util/EgovUserDetailsHelper.java
new file mode 100644
index 0000000..0f67b14
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/EgovUserDetailsHelper.java
@@ -0,0 +1,61 @@
+package egovframework.com.cmm.util;
+
+import java.util.List;
+
+import egovframework.com.cmm.service.EgovUserDetailsService;
+
+/**
+ * EgovUserDetails Helper 클래스
+ *
+ * @author sjyoon
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------------- ----------------------
+ * 2009.03.10 sjyoon 최초 생성
+ * 2011.07.01 서준식 interface 생성후 상세 로직의 분리
+ *
+ */
+
+public class EgovUserDetailsHelper {
+
+ static EgovUserDetailsService egovUserDetailsService;
+
+ public EgovUserDetailsService getEgovUserDetailsService() {
+ return egovUserDetailsService;
+ }
+
+ public void setEgovUserDetailsService(EgovUserDetailsService egovUserDetailsService) {
+ EgovUserDetailsHelper.egovUserDetailsService = egovUserDetailsService;
+ }
+
+ /**
+ * 인증된 사용자객체를 VO형식으로 가져온다.
+ * @return Object - 사용자 ValueObject
+ */
+ public static Object getAuthenticatedUser() {
+ return egovUserDetailsService.getAuthenticatedUser();
+ }
+
+ /**
+ * 인증된 사용자의 권한 정보를 가져온다.
+ *
+ * @return List - 사용자 권한정보 목록
+ */
+ public static List getAuthorities() {
+ return egovUserDetailsService.getAuthorities();
+ }
+
+ /**
+ * 인증된 사용자 여부를 체크한다.
+ * @return Boolean - 인증된 사용자 여부(TRUE / FALSE)
+ */
+ public static Boolean isAuthenticated() {
+ return egovUserDetailsService.isAuthenticated();
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/util/EgovWildcardReloadableResourceBundleMessageSource.java b/src/main/java/egovframework/com/cmm/util/EgovWildcardReloadableResourceBundleMessageSource.java
new file mode 100644
index 0000000..fdbeb1a
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/EgovWildcardReloadableResourceBundleMessageSource.java
@@ -0,0 +1,96 @@
+package egovframework.com.cmm.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang.StringUtils;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.UrlResource;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.core.io.support.ResourcePatternResolver;
+
+/**
+ * @Class Name : EgovWildcardReloadableResourceBundleMessageSource
+ * @Description : 다국어 properties 파일을 팩키지 구조의 폴더로 읽어드리는 MessageSource
+ * @Modification Information
+ * @
+ * @ 수정일 수정자 수정내용
+ * @ ------- -------- ---------------------------
+ * @ 2016.06.10 장동한 최초 생성
+ *
+ * @author 2016 표준프레임워크 유지보수 장동한
+ * @since 2016.06.10
+ * @version 1.0
+ * @see
+ *
+ */
+
+public class EgovWildcardReloadableResourceBundleMessageSource extends
+ org.springframework.context.support.ReloadableResourceBundleMessageSource {
+ private ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
+
+ public void setEgovBasenames(String... basenames) {
+ if (basenames != null) {
+ List baseNames = new ArrayList();
+ for (int i = 0; i < basenames.length; i++) {
+
+ String basename = StringUtils.trimToEmpty(basenames[i]);
+ if(basename.indexOf("classpath:/") > -1 ){
+ baseNames.add(basename);
+ }else if(StringUtils.isNotBlank(basename)) {
+ try {
+
+ Resource[] resources = resourcePatternResolver.getResources(basename);
+
+ for (int j = 0; j < resources.length; j++) {
+ Resource resource = resources[j];
+ String uri = resource.getURI().toString();
+ String baseName = null;
+
+ if(uri.indexOf(".properties") == -1){continue;}
+
+ if (resource instanceof FileSystemResource) {
+ baseName = "classpath:" + StringUtils.substringBetween(uri, "/classes/", ".properties");
+ baseName = baseName.substring(0,baseName.indexOf("_"));
+ baseName = baseName.replaceAll("classpath:", "classpath:/");
+ if(baseNames.indexOf(baseName) > -1){continue;};
+
+ } else if (resource instanceof ClassPathResource) {
+ baseName = StringUtils.substringBefore(uri, ".properties");
+ baseName = baseName.substring(0,baseName.indexOf("_"));
+ baseName = baseName.replaceAll("classpath:", "classpath:/");
+ } else if (resource instanceof UrlResource) {
+ baseName = "classpath:" + StringUtils.substringBetween(uri, ".jar!/", ".properties");
+ baseName = baseName.substring(0,baseName.indexOf("_"));
+ baseName = baseName.replaceAll("classpath:", "classpath:/");
+ }
+ if (baseName != null) {
+ String fullName = processBasename(baseName);
+ baseNames.add(fullName);
+ }
+ }
+ } catch (IOException e) {
+ logger.debug("No message source files found for basename " + basename + ".");
+ }
+ }
+
+
+ }
+
+ logger.debug("EgovWildcardReloadableResourceBundleMessageSource>>basenames>["+baseNames+"}");
+ setBasenames(baseNames.toArray(new String[baseNames.size()]));
+ }
+ }
+
+ String processBasename(String baseName) {
+ String prefix = StringUtils.substringBeforeLast(baseName, "/");
+ String name = StringUtils.substringAfterLast(baseName, "/");
+ do {
+ name = StringUtils.substringBeforeLast(name, "_");
+ } while (name.contains("_"));
+ return prefix + "/" + name;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/egovframework/com/cmm/util/EgovXssChecker.java b/src/main/java/egovframework/com/cmm/util/EgovXssChecker.java
new file mode 100644
index 0000000..3db2a04
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/EgovXssChecker.java
@@ -0,0 +1,89 @@
+package egovframework.com.cmm.util;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import egovframework.com.cmm.LoginVO;
+import egovframework.com.cmm.exception.EgovXssException;
+
+/**
+ * EgovXssChecker 클래스
+ *
+ * @author 장동한
+ * @since 2016.10.27
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- ------------- ----------------------
+ * 2016.10.17 장동한 최초 생성
+ * 2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
+ *
+ */
+
+public class EgovXssChecker {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovXssChecker.class);
+
+ /**
+ * 사용자에 대한 크로스사이트스크립트(Xss) 확인한다.
+ * 수정, 상세조회, 삭제시 사용
+ * @param uniqId Stirng
+ * @return boolean
+ * @exception IllegalArgumentException
+ */
+ public static boolean checkerUserXss(HttpServletRequest request, String sUniqId) throws Exception {
+
+ boolean bLog = false;
+
+ try {
+ //@ 공통모듈을 이용한 권한체크
+ LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+
+ if (loginVO != null) {
+ if (bLog) {
+ LOGGER.debug("@Step1. XSS Check uniqId : {}", sUniqId);
+ LOGGER.debug("Step2. XSS Session uniqId : {}", loginVO.getId());
+ LOGGER.debug("Step3. XSS Session getUniqId : {}", loginVO.getUniqId());
+ LOGGER.debug("Step4. XSS Session getAuthorities : {}", EgovUserDetailsHelper.getAuthorities());
+ }
+
+ //체크 값에 대한 무결성 체크
+ // if(sUniqId == null || (loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId())) == null){
+ // throw new EgovXssException("XSS00001", "errors.xss.checkerUser");
+ // } else if (loginVO.getUniqId().equals("")) { // KISA 보안약점 조치 (2018-12-11, 신용호)
+ // throw new EgovXssException("XSS00001", "errors.xss.checkerUser");
+ // }
+ //
+ // //사용자에에 대한 Xss 체크
+ // if(!sUniqId.equals(loginVO.getUniqId())){
+ // throw new EgovXssException("XSS00002", "errors.xss.checkerUser");
+ // }
+
+ if (sUniqId == null || loginVO.getUniqId() == null || loginVO.getUniqId().equals("")) {
+ throw new EgovXssException("XSS00001", "errors.xss.checkerUser");
+ }
+
+ //사용자에에 대한 Xss 체크
+ if (!sUniqId.equals(loginVO.getUniqId())) {
+ throw new EgovXssException("XSS00002", "errors.xss.checkerUser");
+ }
+ } else {
+ throw new EgovXssException("XSS00001", "errors.xss.checkerUser");
+ }
+
+ //2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
+ } catch (IllegalArgumentException e) {
+ LOGGER.error("[IllegalArgumentException] Try/Catch...usingParameters Runing : " + e.getMessage());
+ } catch (Exception e) {
+ LOGGER.error("[" + e.getClass() + "] Try/Catch...Exception : " + e.getMessage());
+ }
+ return true;
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/util/URLEncodeUtil.java b/src/main/java/egovframework/com/cmm/util/URLEncodeUtil.java
new file mode 100644
index 0000000..7d028dd
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/util/URLEncodeUtil.java
@@ -0,0 +1,27 @@
+package egovframework.com.cmm.util;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+
+public class URLEncodeUtil {
+
+ public static String encode(String data) {
+ try {
+ return URLEncoder.encode(data, "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static String decode(String data) {
+ try {
+ return URLDecoder.decode(data, "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/web/EgovBindingInitializer.java b/src/main/java/egovframework/com/cmm/web/EgovBindingInitializer.java
new file mode 100644
index 0000000..8fe89b1
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/web/EgovBindingInitializer.java
@@ -0,0 +1,22 @@
+package egovframework.com.cmm.web;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.springframework.beans.propertyeditors.CustomDateEditor;
+import org.springframework.beans.propertyeditors.StringTrimmerEditor;
+import org.springframework.web.bind.WebDataBinder;
+import org.springframework.web.bind.support.WebBindingInitializer;
+import org.springframework.web.context.request.WebRequest;
+
+public class EgovBindingInitializer implements WebBindingInitializer {
+
+
+ public void initBinder(WebDataBinder binder) {
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+ dateFormat.setLenient(false);
+ binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false));
+ binder.registerCustomEditor(String.class, new StringTrimmerEditor(false));
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cmm/web/EgovComIndexController.java b/src/main/java/egovframework/com/cmm/web/EgovComIndexController.java
new file mode 100644
index 0000000..be480ec
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/web/EgovComIndexController.java
@@ -0,0 +1,213 @@
+package egovframework.com.cmm.web;
+
+/**
+ * 컴포넌트 설치 후 설치된 컴포넌트들을 IncludedInfo annotation을 통해 찾아낸 후
+ * 화면에 표시할 정보를 처리하는 Controller 클래스
+ *
+ * 개발시 메뉴 구조가 잡히기 전에 배포파일들에 포함된 공통 컴포넌트들의 목록성 화면에
+ * URL을 제공하여 개발자가 편하게 활용하도록 하기 위해 작성된 것으로,
+ * 실제 운영되는 시스템에서는 적용해서는 안 됨
+ * 실 운영 시에는 삭제해서 배포해도 좋음
+ *
+ * 운영시에 본 컨트롤을 사용하여 메뉴를 구성하는 경우 성능 문제를 일으키거나
+ * 사용자별 메뉴 구성에 오류를 발생할 수 있음
+ * @author 공통컴포넌트 정진오
+ * @since 2011.08.26
+ * @version 2.0.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ---------- -------- ---------------------------
+ * 2011.08.26 정진오 최초 생성
+ * 2011.09.16 서준식 컨텐츠 페이지 생성
+ * 2011.09.26 이기하 header, footer 페이지 생성
+ * 2019.12.04 신용호 KISA 보안코드 점검 : Map map를 지역변수로 수정
+ * 2020.07.08 신용호 비밀번호를 수정한후 경과한 날짜 조회
+ * 2020.08.28 정진호 표준프레임워크 v3.10 개선
+ *
+ */
+
+import java.lang.reflect.Method;
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.annotation.Resource;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import egovframework.com.cmm.IncludedCompInfoVO;
+import egovframework.com.cmm.LoginVO;
+import egovframework.com.cmm.annotation.IncludedInfo;
+import egovframework.com.cmm.service.EgovProperties;
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+import egovframework.com.uat.uia.service.EgovLoginService;
+
+@Controller
+public class EgovComIndexController implements ApplicationContextAware, InitializingBean {
+
+ private ApplicationContext applicationContext;
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovComIndexController.class);
+
+ @Override
+ public void afterPropertiesSet() throws Exception {}
+
+ @Override
+ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ this.applicationContext = applicationContext;
+
+ LOGGER.info("EgovComIndexController setApplicationContext method has called!");
+ }
+
+ /** EgovLoginService */
+ @Resource(name = "loginService")
+ private EgovLoginService loginService;
+
+
+ @RequestMapping("/EgovIndex.do")
+ public String index(ModelMap model) {
+ return "egovframework/com/cmm/EgovUnitMain";
+ }
+
+ @RequestMapping("/EgovTop.do")
+ public String top() {
+ return "egovframework/com/cmm/EgovUnitTop";
+ }
+
+ @RequestMapping("/EgovBottom.do")
+ public String bottom() {
+ return "egovframework/com/cmm/EgovUnitBottom";
+ }
+
+ @RequestMapping("/EgovContent.do")
+ public String setContent(ModelMap model) throws Exception {
+
+ // 설정된 비밀번호 유효기간을 가져온다. ex) 180이면 비밀번호 변경후 만료일이 앞으로 180일
+ String propertyExpirePwdDay = EgovProperties.getProperty("Globals.ExpirePwdDay");
+ int expirePwdDay = 0 ;
+ try {
+ expirePwdDay = Integer.parseInt(propertyExpirePwdDay);
+ } catch (NumberFormatException Nfe) {
+ LOGGER.debug("convert expirePwdDay Err : "+Nfe.getMessage());
+ } catch (Exception e) {
+ LOGGER.debug("convert expirePwdDay Err : "+e.getMessage());
+ }
+
+ model.addAttribute("expirePwdDay", expirePwdDay);
+
+ // 비밀번호 설정일로부터 몇일이 지났는지 확인한다. ex) 3이면 비빌번호 설정후 3일 경과
+ LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
+ model.addAttribute("loginVO", loginVO);
+ int passedDayChangePWD = 0;
+ if ( loginVO != null ) {
+ LOGGER.debug("===>>> loginVO.getId() = "+loginVO.getId());
+ LOGGER.debug("===>>> loginVO.getUniqId() = "+loginVO.getUniqId());
+ LOGGER.debug("===>>> loginVO.getUserSe() = "+loginVO.getUserSe());
+ // 비밀번호 변경후 경과한 일수
+ passedDayChangePWD = loginService.selectPassedDayChangePWD(loginVO);
+ LOGGER.debug("===>>> passedDayChangePWD = "+passedDayChangePWD);
+ model.addAttribute("passedDay", passedDayChangePWD);
+ }
+
+ // 만료일자로부터 경과한 일수 => ex)1이면 만료일에서 1일 경과
+ model.addAttribute("elapsedTimeExpiration", passedDayChangePWD - expirePwdDay);
+
+ return "egovframework/com/cmm/EgovUnitContent";
+ }
+
+ @RequestMapping("/EgovLeft.do")
+ public String setLeftMenu(ModelMap model) {
+
+ Map map = new TreeMap();
+ RequestMapping rmAnnotation;
+ IncludedInfo annotation;
+ IncludedCompInfoVO zooVO;
+
+ /*
+ * EgovLoginController가 AOP Proxy되는 바람에 클래스를 reflection으로 가져올 수 없음
+ */
+ try {
+ Class> loginController = Class.forName("egovframework.com.uat.uia.web.EgovLoginController");
+ Method[] methods = loginController.getMethods();
+ for (int i = 0; i < methods.length; i++) {
+ annotation = methods[i].getAnnotation(IncludedInfo.class);
+
+ if (annotation != null) {
+ LOGGER.debug("Found @IncludedInfo Method : {}", methods[i]);
+ zooVO = new IncludedCompInfoVO();
+ zooVO.setName(annotation.name());
+ zooVO.setOrder(annotation.order());
+ zooVO.setGid(annotation.gid());
+
+ rmAnnotation = methods[i].getAnnotation(RequestMapping.class);
+ if ("".equals(annotation.listUrl()) && rmAnnotation != null) {
+ zooVO.setListUrl(rmAnnotation.value()[0]);
+ } else {
+ zooVO.setListUrl(annotation.listUrl());
+ }
+ map.put(zooVO.getOrder(), zooVO);
+ }
+ }
+ } catch (ClassNotFoundException e) {
+ LOGGER.error("No egovframework.com.uat.uia.web.EgovLoginController!!");
+ }
+ /* 여기까지 AOP Proxy로 인한 코드 */
+
+ /*@Controller Annotation 처리된 클래스를 모두 찾는다.*/
+ Map myZoos = applicationContext.getBeansWithAnnotation(Controller.class);
+ LOGGER.debug("How many Controllers : ", myZoos.size());
+ for (final Object myZoo : myZoos.values()) {
+ Class extends Object> zooClass = myZoo.getClass();
+
+ Method[] methods = zooClass.getMethods();
+ LOGGER.debug("Controller Detected {}", zooClass);
+ for (int i = 0; i < methods.length; i++) {
+ annotation = methods[i].getAnnotation(IncludedInfo.class);
+
+ if (annotation != null) {
+ //LOG.debug("Found @IncludedInfo Method : " + methods[i] );
+ zooVO = new IncludedCompInfoVO();
+ zooVO.setName(annotation.name());
+ zooVO.setOrder(annotation.order());
+ zooVO.setGid(annotation.gid());
+ /*
+ * 목록형 조회를 위한 url 매핑은 @IncludedInfo나 @RequestMapping에서 가져온다
+ */
+ rmAnnotation = methods[i].getAnnotation(RequestMapping.class);
+ if ("".equals(annotation.listUrl())) {
+ zooVO.setListUrl(rmAnnotation.value()[0]);
+ } else {
+ zooVO.setListUrl(annotation.listUrl());
+ }
+
+ map.put(zooVO.getOrder(), zooVO);
+ }
+ }
+ }
+
+ model.addAttribute("resultList", map.values());
+
+ LOGGER.debug("EgovComIndexController index is called ");
+
+ return "egovframework/com/cmm/EgovUnitLeft";
+ }
+
+ // context-security.xml 설정
+ // csrf="true"인 경우 csrf Token이 없는경우 이동하는 페이지
+ // csrfAccessDeniedUrl="/egovCSRFAccessDenied.do"
+ @RequestMapping("/egovCSRFAccessDenied.do")
+ public String egovCSRFAccessDenied() {
+ return "egovframework/com/cmm/error/csrfAccessDenied";
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/web/EgovComUtlController.java b/src/main/java/egovframework/com/cmm/web/EgovComUtlController.java
new file mode 100644
index 0000000..a338ea3
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/web/EgovComUtlController.java
@@ -0,0 +1,93 @@
+package egovframework.com.cmm.web;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import egovframework.com.cmm.EgovWebUtil;
+import org.egovframe.rte.fdl.property.EgovPropertyService;
+
+/**
+ * @Class Name : EgovComUtlController.java
+ * @Description : 공통유틸리티성 작업을 위한 Controller
+ * @Modification Information
+ * @
+ * @ 수정일 수정자 수정내용
+ * @ ---------- -------- ---------------------------
+ * 2009.03.02 조재영 최초 생성
+ * 2011.10.07 이기하 .action -> .do로 변경하면서 동일 매핑이 되어 삭제처리
+ * 2015.11.12 김연호 한국인터넷진흥원 웹 취약점 개선
+ * 2019.04.25 신용호 moveToPage() 화이트리스트 처리
+ *
+ * @author 공통서비스 개발팀 조재영
+ * @since 2009.03.02
+ * @version 1.0
+ * @see
+ *
+ */
+@Controller
+public class EgovComUtlController {
+
+ //@Resource(name = "egovUserManageService")
+ //private EgovUserManageService egovUserManageService;
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovComUtlController.class);
+
+ @Resource(name = "egovPageLinkWhitelist")
+ protected List egovWhitelist;
+
+ /** EgovPropertyService */
+ @Resource(name = "propertiesService")
+ protected EgovPropertyService propertiesService;
+
+ /**
+ * JSP 호출작업만 처리하는 공통 함수
+ */
+ @RequestMapping(value="/EgovPageLink.do")
+ public String moveToPage(@RequestParam("link") String linkPage){
+ String link = linkPage;
+ link = link.replace(";", "");
+ link = link.replace(".", "");
+
+ // service 사용하여 리턴할 결과값 처리하는 부분은 생략하고 단순 페이지 링크만 처리함
+ if (linkPage==null || linkPage.equals("")){
+ link="egovframework/com/cmm/egovError";
+ }
+
+ // 화이트 리스트 처리
+ // whitelist목록에 있는 경우 결과가 true, 결과가 false인경우 FAIL처리
+ if (egovWhitelist.contains(linkPage) == false) {
+ LOGGER.debug("Page Link WhiteList Error! Please check whitelist!");
+ link="egovframework/com/cmm/egovError";
+ }
+
+ // 안전한 경로 문자열로 조치
+ link = EgovWebUtil.filePathBlackList(link);
+
+ return link;
+ }
+
+ /**
+ * 모달조회
+ * @return String
+ * @exception Exception
+ */
+ @RequestMapping(value="/EgovModal.do")
+ public String selectUtlJsonInquire() throws Exception {
+ return "egovframework/com/cmm/EgovModal";
+ }
+
+ /**
+ * validato rule dynamic Javascript
+ */
+ @RequestMapping("/validator.do")
+ public String validate(){
+ return "egovframework/com/cmm/validator";
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/egovframework/com/cmm/web/EgovFileDownloadController.java b/src/main/java/egovframework/com/cmm/web/EgovFileDownloadController.java
new file mode 100644
index 0000000..e207cd3
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/web/EgovFileDownloadController.java
@@ -0,0 +1,156 @@
+package egovframework.com.cmm.web;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.util.FileCopyUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import egovframework.com.cmm.EgovBrowserUtil;
+import egovframework.com.cmm.EgovWebUtil;
+import egovframework.com.cmm.service.EgovFileMngService;
+import egovframework.com.cmm.service.FileVO;
+import egovframework.com.cmm.util.EgovBasicLogger;
+import egovframework.com.cmm.util.EgovResourceCloseHelper;
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+import kccf.bbs.vo.AttachmentVO;
+
+/**
+ * 파일 다운로드를 위한 컨트롤러 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------------ -------- ---------------------------
+ * 2009.03.25 이삼섭 최초 생성
+ * 2014.02.24 이기하 IE11 브라우저 한글 파일 다운로드시 에러 수정
+ * 2018.08.28 신용호 Safari, Chrome, Firefox, Opera 한글파일 다운로드 처리 수정 (macOS에서 확장자 exe붙는 문제 처리)
+ *
+ * Copyright (C) 2009 by MOPAS All right reserved.
+ *
+ */
+@Controller
+public class EgovFileDownloadController {
+
+ @Resource(name = "EgovFileMngService")
+ private EgovFileMngService fileService;
+
+ /**
+ * 브라우저 구분 얻기.
+ *
+ * @param request
+ * @return
+ */
+ private String getBrowser(HttpServletRequest request) {
+ String header = request.getHeader("User-Agent");
+ if (header.indexOf("MSIE") > -1) {
+ return "MSIE";
+ } else if (header.indexOf("Trident") > -1) { // IE11 문자열 깨짐 방지
+ return "Trident";
+ } else if (header.indexOf("Chrome") > -1) {
+ return "Chrome";
+ } else if (header.indexOf("Opera") > -1) {
+ return "Opera";
+ }
+ return "Firefox";
+ }
+
+ /**
+ * (문화원)첨부파일로 등록된 파일에 대하여 다운로드를 제공한다.
+ *
+ * @param commandMap
+ * @param response
+ * @throws Exception
+ */
+ @RequestMapping(value = "/cmm/fms/FileDown.do")
+ public void cvplFileDownload(@RequestParam Map commandMap, HttpServletRequest request,
+ HttpServletResponse response) throws Exception {
+
+ String atchFileId = (String)commandMap.get("atchFileId");
+ String fileSn = (String)commandMap.get("fileSn");
+
+// Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+// if (isAuthenticated) {
+
+// FileVO fileVO = new FileVO();
+// fileVO.setAtchFileId(atchFileId);
+// fileVO.setFileSn(fileSn);
+// FileVO fvo = fileService.selectFileInf(fileVO);
+
+// File uFile = new File(fvo.getFileStreCours(), fvo.getStreFileNm());
+// long fSize = uFile.length();
+
+ AttachmentVO attachmentVO = new AttachmentVO();
+ attachmentVO.setAtchmnflId(atchFileId);
+ //atchmnflVO.setSortSn(fileSn);
+ AttachmentVO fvo = fileService.selectFileDetailByKF(attachmentVO);
+
+ File uFile = new File(fvo.getFlpth(), fvo.getFilePhysiclNm());
+ long fSize = uFile.length();
+
+ if (fSize > 0) {
+ String mimetype = "application/x-msdownload";
+
+ String userAgent = request.getHeader("User-Agent");
+ HashMap result = EgovBrowserUtil.getBrowser(userAgent);
+ if (!EgovBrowserUtil.MSIE.equals(result.get(EgovBrowserUtil.TYPEKEY))) {
+ mimetype = "application/x-stuff";
+ }
+
+ String contentDisposition = EgovBrowserUtil.getDisposition(fvo.getFileLogicNm(), userAgent, "UTF-8");
+ //String contentDisposition = EgovBrowserUtil.getDisposition(fvo.getOrignlFileNm(), userAgent, "UTF-8");
+ //response.setBufferSize(fSize); // OutOfMemeory 발생
+ response.setContentType(mimetype);
+ //response.setHeader("Content-Disposition", "attachment; filename=\"" + contentDisposition + "\"");
+ response.setHeader("Content-Disposition", contentDisposition);
+ response.setContentLengthLong(fSize);
+
+ /*
+ * FileCopyUtils.copy(in, response.getOutputStream());
+ * in.close();
+ * response.getOutputStream().flush();
+ * response.getOutputStream().close();
+ */
+ BufferedInputStream in = null;
+ BufferedOutputStream out = null;
+
+ try {
+ in = new BufferedInputStream(new FileInputStream(uFile));
+ out = new BufferedOutputStream(response.getOutputStream());
+
+ FileCopyUtils.copy(in, out);
+ out.flush();
+ } catch (IOException ex) {
+ // 다음 Exception 무시 처리
+ // Connection reset by peer: socket write error
+ EgovBasicLogger.ignore("IO Exception", ex);
+ } finally {
+ EgovResourceCloseHelper.close(in, out);
+ }
+
+ } else {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND, "파일을 찾을 수 없습니다.");
+
+ }
+// }
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/web/EgovFileMngController.java b/src/main/java/egovframework/com/cmm/web/EgovFileMngController.java
new file mode 100644
index 0000000..24daa57
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/web/EgovFileMngController.java
@@ -0,0 +1,287 @@
+package egovframework.com.cmm.web;
+
+import java.util.List;
+import java.util.Map;
+
+import egovframework.com.cmm.service.EgovFileMngService;
+import egovframework.com.cmm.service.FileVO;
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+import kccf.bbs.vo.AttachmentVO;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * 파일 조회, 삭제, 다운로드 처리를 위한 컨트롤러 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.3.25 이삼섭 최초 생성
+ * 2016.10.13 장동한 deleteFileInf 메소드 return 방식 수정
+ *
+ *
+ */
+@Controller
+public class EgovFileMngController {
+
+ @Resource(name = "EgovFileMngService")
+ private EgovFileMngService fileService;
+
+ /**
+ * 문화원 첨부파일에 대한 목록을 조회한다.
+ *
+ * @param fileVO
+ * @param atchFileId
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cmm/fms/selectFileInfsByKF.do")
+ public String selectFileInfsByKF(@ModelAttribute("searchVO") AttachmentVO attachmentVO, @RequestParam Map commandMap, ModelMap model) throws Exception {
+ String nttId = (String)commandMap.get("param_nttId");
+ String bbsId;
+ String locate;
+ if(commandMap.get("param_bbsId")!=null) {
+ bbsId = (String)commandMap.get("param_bbsId");
+ attachmentVO.setCntntsGroupId(bbsId);
+ }
+ if(commandMap.get("param_locate")!=null) {
+ locate = (String)commandMap.get("param_locate");
+ model.addAttribute("locate", locate);
+ }
+ String fileType = (String)commandMap.get("param_thumb");
+
+ attachmentVO.setCntntsId(nttId);
+
+ List result = fileService.selectFileListByCntntsId(attachmentVO);
+
+ model.addAttribute("fileList", result);
+ model.addAttribute("fileType", fileType);
+ model.addAttribute("updateFlag", "N");
+ model.addAttribute("fileListCnt", result.size());
+ model.addAttribute("nttId", nttId);
+
+ return "egovframework/com/cmm/fms/EgovFileList";
+ }
+
+
+ /**
+ * 문화원 첨부파일 변경을 위한 수정페이지로 이동한다.
+ *
+ * @param fileVO
+ * @param atchFileId
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cmm/fms/selectFileInfsForUpdateByKF.do")
+ public String selectFileInfsForUpdateByKF(@ModelAttribute("searchVO") AttachmentVO attachmentVO, @RequestParam Map commandMap,
+ //SessionVO sessionVO,
+ ModelMap model) throws Exception {
+
+ String nttId = (String)commandMap.get("param_nttId");
+ String fileType = (String)commandMap.get("param_thumb");
+
+ attachmentVO.setCntntsId(nttId);
+
+ List fileList = fileService.selectFileListByCntntsId(attachmentVO);
+
+ model.addAttribute("fileList", fileList);
+ model.addAttribute("fileType", fileType);
+ model.addAttribute("updateFlag", "Y");
+ model.addAttribute("fileListCnt", fileList.size());
+ model.addAttribute("nttId", nttId);
+
+ return "egovframework/com/cmm/fms/EgovFileList";
+ }
+
+
+ /**
+ * 문화원 첨부파일에 대한 삭제를 처리한다.
+ *
+ * @param fileVO
+ * @param returnUrl
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cmm/fms/deleteFileInfsByKF.do")
+ public String deleteFileInfsByKF(@RequestBody List deleteFiles,
+ HttpSession session,
+ HttpServletRequest request,
+ ModelMap model
+ ) throws Exception {
+
+ //Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ //if (isAuthenticated) {
+ fileService.deleteFileInfsByKF(deleteFiles);
+ //}
+
+ return "blank";
+
+ //--------------------------------------------
+ // contextRoot가 있는 경우 제외 시켜야 함
+ //--------------------------------------------
+ ////return "forward:/cmm/fms/selectFileInfs.do";
+ //return "forward:" + returnUrl;
+ /* *******************************************************
+ * modify by jdh
+ *******************************************************
+ if ("".equals(request.getContextPath()) || "/".equals(request.getContextPath())) {
+ return "forward:" + returnUrl;
+ }
+
+ if (returnUrl.startsWith(request.getContextPath())) {
+ return "forward:" + returnUrl.substring(returnUrl.indexOf("/", 1));
+ } else {
+ return "forward:" + returnUrl;
+ }
+ */
+ ////------------------------------------------
+ }
+
+
+
+ /**
+ * 첨부파일에 대한 목록을 조회한다.
+ *
+ * @param fileVO
+ * @param atchFileId
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cmm/fms/selectFileInfs.do")
+ public String selectFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map commandMap, ModelMap model) throws Exception {
+ String atchFileId = (String)commandMap.get("param_atchFileId");
+
+ fileVO.setAtchFileId(atchFileId);
+ List result = fileService.selectFileInfs(fileVO);
+
+ model.addAttribute("fileList", result);
+ model.addAttribute("updateFlag", "N");
+ model.addAttribute("fileListCnt", result.size());
+ model.addAttribute("atchFileId", atchFileId);
+
+ return "egovframework/com/cmm/fms/EgovFileList";
+ }
+
+ /**
+ * 첨부파일 변경을 위한 수정페이지로 이동한다.
+ *
+ * @param fileVO
+ * @param atchFileId
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cmm/fms/selectFileInfsForUpdate.do")
+ public String selectFileInfsForUpdate(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map commandMap,
+ //SessionVO sessionVO,
+ ModelMap model) throws Exception {
+
+ String atchFileId = (String)commandMap.get("param_atchFileId");
+
+ fileVO.setAtchFileId(atchFileId);
+
+ List result = fileService.selectFileInfs(fileVO);
+
+ model.addAttribute("fileList", result);
+ model.addAttribute("updateFlag", "Y");
+ model.addAttribute("fileListCnt", result.size());
+ model.addAttribute("atchFileId", atchFileId);
+
+ return "egovframework/com/cmm/fms/EgovFileList";
+ }
+
+ /**
+ * 첨부파일에 대한 삭제를 처리한다.
+ *
+ * @param fileVO
+ * @param returnUrl
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cmm/fms/deleteFileInfs.do")
+ public String deleteFileInf(@ModelAttribute("searchVO") FileVO fileVO,
+ //SessionVO sessionVO,
+ HttpServletRequest request,
+ ModelMap model) throws Exception {
+
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if (isAuthenticated) {
+ fileService.deleteFileInf(fileVO);
+ }
+
+ return "blank";
+
+ //--------------------------------------------
+ // contextRoot가 있는 경우 제외 시켜야 함
+ //--------------------------------------------
+ ////return "forward:/cmm/fms/selectFileInfs.do";
+ //return "forward:" + returnUrl;
+ /* *******************************************************
+ * modify by jdh
+ *******************************************************
+ if ("".equals(request.getContextPath()) || "/".equals(request.getContextPath())) {
+ return "forward:" + returnUrl;
+ }
+
+ if (returnUrl.startsWith(request.getContextPath())) {
+ return "forward:" + returnUrl.substring(returnUrl.indexOf("/", 1));
+ } else {
+ return "forward:" + returnUrl;
+ }
+ */
+ ////------------------------------------------
+ }
+
+ /**
+ * 이미지 첨부파일에 대한 목록을 조회한다.
+ *
+ * @param fileVO
+ * @param atchFileId
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cmm/fms/selectImageFileInfs.do")
+ public String selectImageFileInfs(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam Map commandMap,
+ //SessionVO sessionVO,
+ ModelMap model) throws Exception {
+
+ String atchFileId = (String)commandMap.get("atchFileId");
+
+ fileVO.setAtchFileId(atchFileId);
+ List result = fileService.selectImageFileList(fileVO);
+
+ model.addAttribute("fileList", result);
+
+ return "egovframework/com/cmm/fms/EgovImgFileList";
+ }
+}
diff --git a/src/main/java/egovframework/com/cmm/web/EgovImageProcessController.java b/src/main/java/egovframework/com/cmm/web/EgovImageProcessController.java
new file mode 100644
index 0000000..ed5a096
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/web/EgovImageProcessController.java
@@ -0,0 +1,126 @@
+package egovframework.com.cmm.web;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Map;
+
+import egovframework.com.cmm.EgovWebUtil;
+import egovframework.com.cmm.SessionVO;
+import egovframework.com.cmm.service.EgovFileMngService;
+import egovframework.com.cmm.service.FileVO;
+import egovframework.com.cmm.util.EgovResourceCloseHelper;
+import kccf.bbs.vo.AttachmentVO;
+import kccf.util.StrUtil;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletResponse;
+
+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;
+
+
+/**
+ * @Class Name : EgovImageProcessController.java
+ * @Description :
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ---------- --------- -------------------
+ * 2009.04.02 이삼섭 최초생성
+ * 2014.03.31 유지보수 fileSn 오류수정
+ * 2018.08.31 이정은 MimeType 중복설정 제거
+ * 2019.11.29 신용호 KISA 보안약점 조치 : HTTP응답분할(HTTP_Response_Splitting,CRLF)취약점 조치
+ *
+ * @author 공통 서비스 개발팀 이삼섭
+ * @since 2009. 4. 2.
+ * @version
+ * @see
+ *
+ */
+@SuppressWarnings("serial")
+@Controller
+public class EgovImageProcessController extends HttpServlet {
+
+ @Resource(name = "EgovFileMngService")
+ private EgovFileMngService fileService;
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovImageProcessController.class);
+
+ /**
+ * 첨부된 이미지에 대한 미리보기 기능을 제공한다.
+ *
+ * @param atchFileId
+ * @param fileSn
+ * @param sessionVO
+ * @param model
+ * @param response
+ * @throws Exception
+ */
+ @RequestMapping("/cmm/fms/getImage.do")
+ public void getImageInf(SessionVO sessionVO, ModelMap model, @RequestParam Map commandMap, HttpServletResponse response) throws Exception {
+
+ //@RequestParam("atchFileId") String atchFileId,
+ //@RequestParam("fileSn") String fileSn,
+ String atchmnflId = StrUtil.ifEmpty((String)commandMap.get("atchmnflId"), (String)commandMap.get("atchFileId")) ;
+ //int fileSn = (int)commandMap.get("fileSn");
+
+ AttachmentVO attachVO = new AttachmentVO();
+
+ attachVO.setAtchmnflId(atchmnflId);
+
+ AttachmentVO fvo = (AttachmentVO) fileService.selectFileDetailByKF(attachVO);
+
+ //String fileLoaction = fvo.getFileStreCours() + fvo.getStreFileNm();
+
+ File file = null;
+ FileInputStream fis = null;
+
+ BufferedInputStream in = null;
+ ByteArrayOutputStream bStream = null;
+
+ try {
+ file = new File(fvo.getFlpth(), fvo.getFilePhysiclNm());
+ fis = new FileInputStream(file);
+
+ in = new BufferedInputStream(fis);
+ bStream = new ByteArrayOutputStream();
+
+ int imgByte;
+ while ((imgByte = in.read()) != -1) {
+ bStream.write(imgByte);
+ }
+
+ String type = "";
+
+ if (fvo.getExtsn() != null && !"".equals(fvo.getExtsn())) {
+ if ("jpg".equals(fvo.getExtsn().toLowerCase())) {
+ type = "image/jpeg";
+ } else {
+ type = "image/" + fvo.getExtsn().toLowerCase();
+ }
+ /*type = "image/" + fvo.getFileExtsn().toLowerCase();*/
+
+ } else {
+ LOGGER.debug("Image fileType is null.");
+ }
+
+ response.setHeader("Content-Type", EgovWebUtil.removeCRLF(type));
+ response.setContentLength(bStream.size());
+
+ bStream.writeTo(response.getOutputStream());
+
+ response.getOutputStream().flush();
+ response.getOutputStream().close();
+
+ } finally {
+ EgovResourceCloseHelper.close(bStream, in, fis);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/egovframework/com/cmm/web/EgovMultipartResolver.java b/src/main/java/egovframework/com/cmm/web/EgovMultipartResolver.java
new file mode 100644
index 0000000..dd2935f
--- /dev/null
+++ b/src/main/java/egovframework/com/cmm/web/EgovMultipartResolver.java
@@ -0,0 +1,151 @@
+package egovframework.com.cmm.web;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the ";License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS"; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+
+import org.apache.commons.fileupload.FileItem;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.util.StringUtils;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartResolver;
+
+import egovframework.com.cmm.service.EgovProperties;
+import egovframework.com.utl.fcc.service.EgovFileUploadUtil;
+
+/**
+ * 실행환경의 파일업로드 처리를 위한 기능 클래스
+ *
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ---------- -------- ---------------------------
+ * 2009.03.25 이삼섭 최초 생성
+ * 2011.06.11 서준식 스프링 3.0 업그레이드 API변경으로인한 수정
+ * 2020.10.27 신용호 예외처리 수정
+ * 2020.10.29 신용호 허용되지 않는 확장자 업로드 제한 (globals.properties > Globals.fileUpload.Extensions)
+ *
+ *
+ */
+public class EgovMultipartResolver extends CommonsMultipartResolver {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovMultipartResolver.class);
+
+ public EgovMultipartResolver() {
+ }
+
+ /**
+ * 첨부파일 처리를 위한 multipart resolver를 생성한다.
+ *
+ * @param servletContext
+ */
+ public EgovMultipartResolver(ServletContext servletContext) {
+ super(servletContext);
+ }
+
+ /**
+ * multipart에 대한 parsing을 처리한다.
+ */
+ @Override
+ protected MultipartParsingResult parseFileItems(List fileItems, String encoding) {
+
+ // 스프링 3.0변경으로 수정한 부분
+ MultiValueMap multipartFiles = new LinkedMultiValueMap();
+ Map multipartParameters = new HashMap();
+ String whiteListFileUploadExtensions = EgovProperties.getProperty("Globals.fileUpload.Extensions");
+ Map mpParamContentTypes = new HashMap();
+
+ // Extract multipart files and multipart parameters.
+ for (Iterator it = fileItems.iterator(); it.hasNext();) {
+ FileItem fileItem = it.next();
+
+ if (fileItem.isFormField()) {
+
+ String value = null;
+ if (encoding != null) {
+ try {
+ value = fileItem.getString(encoding);
+ } catch (UnsupportedEncodingException ex) {
+ LOGGER.warn("Could not decode multipart item '{}' with encoding '{}': using platform default",
+ fileItem.getFieldName(), encoding);
+ value = fileItem.getString();
+ }
+ } else {
+ value = fileItem.getString();
+ }
+ String[] curParam = multipartParameters.get(fileItem.getFieldName());
+ if (curParam == null) {
+ // simple form field
+ multipartParameters.put(fileItem.getFieldName(), new String[] { value });
+ } else {
+ // array of simple form fields
+ String[] newParam = StringUtils.addStringToArray(curParam, value);
+ multipartParameters.put(fileItem.getFieldName(), newParam);
+ }
+
+ //contentType 입력
+ mpParamContentTypes.put(fileItem.getFieldName(), fileItem.getContentType());
+ } else {
+
+ CommonsMultipartFile file = createMultipartFile(fileItem);
+ multipartFiles.add(file.getName(), file);
+
+ LOGGER.debug("Found multipart file [{" + file.getName() + "}] of size {" + file.getSize()
+ + "} bytes with original filename [{" + file.getOriginalFilename() + "}], stored {"
+ + file.getStorageDescription() + "}");
+
+ String fileName = file.getOriginalFilename();
+ String fileExtension = EgovFileUploadUtil.getFileExtension(fileName);
+ LOGGER.debug("Found File Extension = "+fileExtension);
+ if (whiteListFileUploadExtensions == null || "".equals(whiteListFileUploadExtensions)) {
+ LOGGER.debug("The file extension whitelist has not been set.");
+ } else {
+ if (fileName == null || "".equals(fileName)) {
+ LOGGER.debug("No file name.");
+ } else {
+ if ("".equals(fileExtension)) { // 확장자 없는 경우 처리 불가
+ throw new SecurityException("[No file extension] File extension not allowed.");
+ }
+ if ((whiteListFileUploadExtensions+".").contains("."+fileExtension.toLowerCase()+".")) {
+ LOGGER.debug("File extension allowed.");
+ } else {
+ throw new SecurityException("["+fileExtension+"] File extension not allowed.");
+ }
+ }
+ }
+
+ }
+ }
+
+ return new MultipartParsingResult(multipartFiles, multipartParameters, mpParamContentTypes);//2022.01. Method call passes null for non-null parameter 처리
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/Blog.java b/src/main/java/egovframework/com/cop/bbs/service/Blog.java
new file mode 100644
index 0000000..7f5fcfb
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/Blog.java
@@ -0,0 +1,341 @@
+package egovframework.com.cop.bbs.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 블로그게시판 관리를 위한 모델 클래스
+ * @author 공통서비스개발팀 양희훈
+ * @since 2017.09.12
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ----------- -------- ---------------------------
+ * 2017.09.12 양희훈 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class Blog implements Serializable {
+
+ /** 블로그 아이디 */
+ private String blogId = "";
+
+ /** 게시판 아이디 */
+ private String bbsId = "";
+
+ /** 블로그 소개 */
+ private String blogIntrcn = "";
+
+ /** 블로그 명 */
+ private String blogNm = "";
+
+ /** 최초등록자 아이디 */
+ private String frstRegisterId = "";
+
+ /** 최초등록시점 */
+ private String frstRegisterPnttm = "";
+
+ /** 최종수정자 아이디 */
+ private String lastUpdusrId = "";
+
+ /** 최종수정시점 */
+ private String lastUpdusrPnttm = "";
+
+ /** 등록구분코드 */
+ private String registSeCode = "";
+
+ /** 템플릿 아이디 */
+ private String tmplatId = "";
+
+ /** 템플릿 아이디 */
+ private String useAt = "";
+
+ /** 사용자 아이디 */
+ private String emplyrId = "";
+
+ /** 사용자명 */
+ private String userNm = "";
+
+ /** 템플릿 명 */
+ private String tmplatNm = "";
+
+ /** 블로그 게시판 여부 */
+ private String blogAt = "";
+
+ /**
+ * blogId attribute를 리턴한다.
+ *
+ * @return the blogId
+ */
+ public String getBlogId() {
+ return blogId;
+ }
+
+ /**
+ * blogId attribute 값을 설정한다.
+ *
+ * @param blogId
+ * the blogId to set
+ */
+ public void setBlogId(String blogId) {
+ this.blogId = blogId;
+ }
+
+ public String getBbsId() {
+ return bbsId;
+ }
+
+ public void setBbsId(String bbsId) {
+ this.bbsId = bbsId;
+ }
+
+ /**
+ * blogIntrcn attribute를 리턴한다.
+ *
+ * @return the blogIntrcn
+ */
+ public String getBlogIntrcn() {
+ return blogIntrcn;
+ }
+
+ /**
+ * blogIntrcn attribute 값을 설정한다.
+ *
+ * @param blogIntrcn
+ * the blogIntrcn to set
+ */
+ public void setBlogIntrcn(String blogIntrcn) {
+ this.blogIntrcn = blogIntrcn;
+ }
+
+ /**
+ * blogNm attribute를 리턴한다.
+ *
+ * @return the blogNm
+ */
+ public String getBlogNm() {
+ return blogNm;
+ }
+
+ /**
+ * blogNm attribute 값을 설정한다.
+ *
+ * @param blogNm
+ * the blogNm to set
+ */
+ public void setBlogNm(String blogNm) {
+ this.blogNm = blogNm;
+ }
+
+ /**
+ * frstRegisterId attribute를 리턴한다.
+ *
+ * @return the frstRegisterId
+ */
+ public String getFrstRegisterId() {
+ return frstRegisterId;
+ }
+
+ /**
+ * frstRegisterId attribute 값을 설정한다.
+ *
+ * @param frstRegisterId
+ * the frstRegisterId to set
+ */
+ public void setFrstRegisterId(String frstRegisterId) {
+ this.frstRegisterId = frstRegisterId;
+ }
+
+ /**
+ * frstRegisterPnttm attribute를 리턴한다.
+ *
+ * @return the frstRegisterPnttm
+ */
+ public String getFrstRegisterPnttm() {
+ return frstRegisterPnttm;
+ }
+
+ /**
+ * frstRegisterPnttm attribute 값을 설정한다.
+ *
+ * @param frstRegisterPnttm
+ * the frstRegisterPnttm to set
+ */
+ public void setFrstRegisterPnttm(String frstRegisterPnttm) {
+ this.frstRegisterPnttm = frstRegisterPnttm;
+ }
+
+ /**
+ * lastUpdusrId attribute를 리턴한다.
+ *
+ * @return the lastUpdusrId
+ */
+ public String getLastUpdusrId() {
+ return lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrId attribute 값을 설정한다.
+ *
+ * @param lastUpdusrId
+ * the lastUpdusrId to set
+ */
+ public void setLastUpdusrId(String lastUpdusrId) {
+ this.lastUpdusrId = lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute를 리턴한다.
+ *
+ * @return the lastUpdusrPnttm
+ */
+ public String getLastUpdusrPnttm() {
+ return lastUpdusrPnttm;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute 값을 설정한다.
+ *
+ * @param lastUpdusrPnttm
+ * the lastUpdusrPnttm to set
+ */
+ public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
+ this.lastUpdusrPnttm = lastUpdusrPnttm;
+ }
+
+ /**
+ * registSeCode attribute를 리턴한다.
+ *
+ * @return the registSeCode
+ */
+ public String getRegistSeCode() {
+ return registSeCode;
+ }
+
+ /**
+ * registSeCode attribute 값을 설정한다.
+ *
+ * @param registSeCode
+ * the registSeCode to set
+ */
+ public void setRegistSeCode(String registSeCode) {
+ this.registSeCode = registSeCode;
+ }
+
+ /**
+ * tmplatId attribute를 리턴한다.
+ *
+ * @return the tmplatId
+ */
+ public String getTmplatId() {
+ return tmplatId;
+ }
+
+ /**
+ * tmplatId attribute 값을 설정한다.
+ *
+ * @param tmplatId
+ * the tmplatId to set
+ */
+ public void setTmplatId(String tmplatId) {
+ this.tmplatId = tmplatId;
+ }
+
+ /**
+ * useAt attribute를 리턴한다.
+ *
+ * @return the useAt
+ */
+ public String getUseAt() {
+ return useAt;
+ }
+
+ /**
+ * useAt attribute 값을 설정한다.
+ *
+ * @param useAt
+ * the useAt to set
+ */
+ public void setUseAt(String useAt) {
+ this.useAt = useAt;
+ }
+
+ /**
+ * emplyrId attribute를 리턴한다.
+ *
+ * @return the emplyrId
+ */
+ public String getEmplyrId() {
+ return emplyrId;
+ }
+
+ /**
+ * emplyrId attribute 값을 설정한다.
+ *
+ * @param emplyrId
+ * the emplyrId to set
+ */
+ public void setEmplyrId(String emplyrId) {
+ this.emplyrId = emplyrId;
+ }
+
+ /**
+ * userNm attribute를 리턴한다.
+ *
+ * @return the userNm
+ */
+ public String getUserNm() {
+ return userNm;
+ }
+
+ /**
+ * userNm attribute 값을 설정한다.
+ *
+ * @param userNm
+ * the userNm to set
+ */
+ public void setUserNm(String userNm) {
+ this.userNm = userNm;
+ }
+
+ /**
+ * tmplatNm attribute를 리턴한다.
+ *
+ * @return the tmplatNm
+ */
+ public String getTmplatNm() {
+ return tmplatNm;
+ }
+
+ /**
+ * tmplatNm attribute 값을 설정한다.
+ *
+ * @param tmplatNm
+ * the tmplatNm to set
+ */
+ public void setTmplatNm(String tmplatNm) {
+ this.tmplatNm = tmplatNm;
+ }
+
+ public String getBlogAt() {
+ return blogAt;
+ }
+
+ public void setBlogAt(String blogAt) {
+ this.blogAt = blogAt;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/BlogUser.java b/src/main/java/egovframework/com/cop/bbs/service/BlogUser.java
new file mode 100644
index 0000000..17616e0
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/BlogUser.java
@@ -0,0 +1,362 @@
+package egovframework.com.cop.bbs.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 블로그게시판 관리를 위한 모델 클래스
+ * @author 공통서비스개발팀 양희훈
+ * @since 2017.09.12
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ----------- -------- ---------------------------
+ * 2017.09.12 양희훈 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class BlogUser implements Serializable {
+
+ /** 블로그아이디 */
+ private String blogId = "";
+
+ /** 최초등록자 아이디 */
+ private String frstRegisterId = "";
+
+ /** 최초등록시점 */
+ private String frstRegisterPnttm = "";
+
+ /** 최종수정자 아이디 */
+ private String lastUpdusrId = "";
+
+ /** 최종수정시점 */
+ private String lastUpdusrPnttm = "";
+
+ /** 관리자여부 */
+ private String mngrAt = "";
+
+ /** 탈퇴일 */
+ private String secsnDe = "";
+
+ /** 가입일 */
+ private String sbscrbDe = "";
+
+ /** 사용여부 */
+ private String useAt = "";
+
+ /** 사용자 아이디 */
+ private String emplyrId = "";
+
+ /** 사용자명 */
+ private String emplyrNm = "";
+
+ /** 회원 ID */
+ private String userId = "";
+
+ /** 회원 이메일 */
+ private String userEmail = "";
+
+ /** 회원 상태 */
+ private String mberSttus = "";
+
+ /** 회원 상태 코드명 */
+ private String mberSttusNm = "";
+
+ /**
+ * blogId attribute를 리턴한다.
+ *
+ * @return the blogId
+ */
+ public String getBlogId() {
+ return blogId;
+ }
+
+ /**
+ * blogId attribute 값을 설정한다.
+ *
+ * @param blogId
+ * the blogId to set
+ */
+ public void setBlogId(String blogId) {
+ this.blogId = blogId;
+ }
+
+ /**
+ * frstRegisterId attribute를 리턴한다.
+ *
+ * @return the frstRegisterId
+ */
+ public String getFrstRegisterId() {
+ return frstRegisterId;
+ }
+
+ /**
+ * frstRegisterId attribute 값을 설정한다.
+ *
+ * @param frstRegisterId
+ * the frstRegisterId to set
+ */
+ public void setFrstRegisterId(String frstRegisterId) {
+ this.frstRegisterId = frstRegisterId;
+ }
+
+ /**
+ * frstRegisterPnttm attribute를 리턴한다.
+ *
+ * @return the frstRegisterPnttm
+ */
+ public String getFrstRegisterPnttm() {
+ return frstRegisterPnttm;
+ }
+
+ /**
+ * frstRegisterPnttm attribute 값을 설정한다.
+ *
+ * @param frstRegisterPnttm
+ * the frstRegisterPnttm to set
+ */
+ public void setFrstRegisterPnttm(String frstRegisterPnttm) {
+ this.frstRegisterPnttm = frstRegisterPnttm;
+ }
+
+ /**
+ * lastUpdusrId attribute를 리턴한다.
+ *
+ * @return the lastUpdusrId
+ */
+ public String getLastUpdusrId() {
+ return lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrId attribute 값을 설정한다.
+ *
+ * @param lastUpdusrId
+ * the lastUpdusrId to set
+ */
+ public void setLastUpdusrId(String lastUpdusrId) {
+ this.lastUpdusrId = lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute를 리턴한다.
+ *
+ * @return the lastUpdusrPnttm
+ */
+ public String getLastUpdusrPnttm() {
+ return lastUpdusrPnttm;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute 값을 설정한다.
+ *
+ * @param lastUpdusrPnttm
+ * the lastUpdusrPnttm to set
+ */
+ public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
+ this.lastUpdusrPnttm = lastUpdusrPnttm;
+ }
+
+ /**
+ * mngrAt attribute를 리턴한다.
+ *
+ * @return the mngrAt
+ */
+ public String getMngrAt() {
+ return mngrAt;
+ }
+
+ /**
+ * mngrAt attribute 값을 설정한다.
+ *
+ * @param mngrAt
+ * the mngrAt to set
+ */
+ public void setMngrAt(String mngrAt) {
+ this.mngrAt = mngrAt;
+ }
+
+ /**
+ * secsnDe attribute를 리턴한다.
+ *
+ * @return the secsnDe
+ */
+ public String getSecsnDe() {
+ return secsnDe;
+ }
+
+ /**
+ * secsnDe attribute 값을 설정한다.
+ *
+ * @param secsnDe
+ * the secsnDe to set
+ */
+ public void setSecsnDe(String secsnDe) {
+ this.secsnDe = secsnDe;
+ }
+
+ /**
+ * sbscrbDe attribute를 리턴한다.
+ *
+ * @return the sbscrbDe
+ */
+ public String getSbscrbDe() {
+ return sbscrbDe;
+ }
+
+ /**
+ * sbscrbDe attribute 값을 설정한다.
+ *
+ * @param sbscrbDe
+ * the sbscrbDe to set
+ */
+ public void setSbscrbDe(String sbscrbDe) {
+ this.sbscrbDe = sbscrbDe;
+ }
+
+ /**
+ * useAt attribute를 리턴한다.
+ *
+ * @return the useAt
+ */
+ public String getUseAt() {
+ return useAt;
+ }
+
+ /**
+ * useAt attribute 값을 설정한다.
+ *
+ * @param useAt
+ * the useAt to set
+ */
+ public void setUseAt(String useAt) {
+ this.useAt = useAt;
+ }
+
+ /**
+ * emplyrId attribute를 리턴한다.
+ *
+ * @return the emplyrId
+ */
+ public String getEmplyrId() {
+ return emplyrId;
+ }
+
+ /**
+ * emplyrId attribute 값을 설정한다.
+ *
+ * @param emplyrId
+ * the emplyrId to set
+ */
+ public void setEmplyrId(String emplyrId) {
+ this.emplyrId = emplyrId;
+ }
+
+ /**
+ * emplyrNm attribute를 리턴한다.
+ *
+ * @return the emplyrNm
+ */
+ public String getEmplyrNm() {
+ return emplyrNm;
+ }
+
+ /**
+ * emplyrNm attribute 값을 설정한다.
+ *
+ * @param emplyrNm
+ * the emplyrNm to set
+ */
+ public void setEmplyrNm(String emplyrNm) {
+ this.emplyrNm = emplyrNm;
+ }
+
+ /**
+ * userId attribute를 리턴한다.
+ *
+ * @return the userId
+ */
+ public String getUserId() {
+ return userId;
+ }
+
+ /**
+ * userId attribute 값을 설정한다.
+ *
+ * @param userId
+ * the userId to set
+ */
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ /**
+ * userEmail attribute를 리턴한다.
+ *
+ * @return the userEmail
+ */
+ public String getUserEmail() {
+ return userEmail;
+ }
+
+ /**
+ * userEmail attribute 값을 설정한다.
+ *
+ * @param userEmail
+ * the userEmail to set
+ */
+ public void setUserEmail(String userEmail) {
+ this.userEmail = userEmail;
+ }
+
+ /**
+ * mberSttus attribute를 리턴한다.
+ *
+ * @return the mberSttus
+ */
+ public String getMberSttus() {
+ return mberSttus;
+ }
+
+ /**
+ * mberSttus attribute 값을 설정한다.
+ *
+ * @param mberSttus
+ * the mberSttus to set
+ */
+ public void setMberSttus(String mberSttus) {
+ this.mberSttus = mberSttus;
+ }
+
+ /**
+ * mberSttusNm attribute를 리턴한다.
+ *
+ * @return the mberSttusNm
+ */
+ public String getMberSttusNm() {
+ return mberSttusNm;
+ }
+
+ /**
+ * mberSttusNm attribute 값을 설정한다.
+ *
+ * @param mberSttusNm
+ * the mberSttusNm to set
+ */
+ public void setMberSttusNm(String mberSttusNm) {
+ this.mberSttusNm = mberSttusNm;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/BlogUserVO.java b/src/main/java/egovframework/com/cop/bbs/service/BlogUserVO.java
new file mode 100644
index 0000000..91e39f1
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/BlogUserVO.java
@@ -0,0 +1,319 @@
+package egovframework.com.cop.bbs.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+
+/**
+ * 블로그게시판 관리를 위한 VO 클래스
+ * @author 공통서비스개발팀 양희훈
+ * @since 2017.09.12
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ----------- -------- ---------------------------
+ * 2017.09.12 양희훈 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class BlogUserVO extends BlogUser implements Serializable {
+
+ /** 검색시작일 */
+ private String searchBgnDe = "";
+
+ /** 검색조건 */
+ private String searchCnd = "";
+
+ /** 검색종료일 */
+ private String searchEndDe = "";
+
+ /** 검색단어 */
+ private String searchWrd = "";
+
+ /** 정렬순서(DESC,ASC) */
+ private long sortOrdr = 0L;
+
+ /** 검색사용여부 */
+ private String searchUseYn = "";
+
+ /** 현재페이지 */
+ private int pageIndex = 1;
+
+ /** 페이지갯수 */
+ private int pageUnit = 10;
+
+ /** 페이지사이즈 */
+ private int pageSize = 10;
+
+ /** 첫페이지 인덱스 */
+ private int firstIndex = 1;
+
+ /** 마지막페이지 인덱스 */
+ private int lastIndex = 1;
+
+ /** 페이지당 레코드 개수 */
+ private int recordCountPerPage = 10;
+
+ /** 레코드 번호 */
+ private int rowNo = 0;
+
+ /**
+ * searchBgnDe attribute를 리턴한다.
+ *
+ * @return the searchBgnDe
+ */
+ public String getSearchBgnDe() {
+ return searchBgnDe;
+ }
+
+ /**
+ * searchBgnDe attribute 값을 설정한다.
+ *
+ * @param searchBgnDe
+ * the searchBgnDe to set
+ */
+ public void setSearchBgnDe(String searchBgnDe) {
+ this.searchBgnDe = searchBgnDe;
+ }
+
+ /**
+ * searchCnd attribute를 리턴한다.
+ *
+ * @return the searchCnd
+ */
+ public String getSearchCnd() {
+ return searchCnd;
+ }
+
+ /**
+ * searchCnd attribute 값을 설정한다.
+ *
+ * @param searchCnd
+ * the searchCnd to set
+ */
+ public void setSearchCnd(String searchCnd) {
+ this.searchCnd = searchCnd;
+ }
+
+ /**
+ * searchEndDe attribute를 리턴한다.
+ *
+ * @return the searchEndDe
+ */
+ public String getSearchEndDe() {
+ return searchEndDe;
+ }
+
+ /**
+ * searchEndDe attribute 값을 설정한다.
+ *
+ * @param searchEndDe
+ * the searchEndDe to set
+ */
+ public void setSearchEndDe(String searchEndDe) {
+ this.searchEndDe = searchEndDe;
+ }
+
+ /**
+ * searchWrd attribute를 리턴한다.
+ *
+ * @return the searchWrd
+ */
+ public String getSearchWrd() {
+ return searchWrd;
+ }
+
+ /**
+ * searchWrd attribute 값을 설정한다.
+ *
+ * @param searchWrd
+ * the searchWrd to set
+ */
+ public void setSearchWrd(String searchWrd) {
+ this.searchWrd = searchWrd;
+ }
+
+ /**
+ * sortOrdr attribute를 리턴한다.
+ *
+ * @return the sortOrdr
+ */
+ public long getSortOrdr() {
+ return sortOrdr;
+ }
+
+ /**
+ * sortOrdr attribute 값을 설정한다.
+ *
+ * @param sortOrdr
+ * the sortOrdr to set
+ */
+ public void setSortOrdr(long sortOrdr) {
+ this.sortOrdr = sortOrdr;
+ }
+
+ /**
+ * searchUseYn attribute를 리턴한다.
+ *
+ * @return the searchUseYn
+ */
+ public String getSearchUseYn() {
+ return searchUseYn;
+ }
+
+ /**
+ * searchUseYn attribute 값을 설정한다.
+ *
+ * @param searchUseYn
+ * the searchUseYn to set
+ */
+ public void setSearchUseYn(String searchUseYn) {
+ this.searchUseYn = searchUseYn;
+ }
+
+ /**
+ * pageIndex attribute를 리턴한다.
+ *
+ * @return the pageIndex
+ */
+ public int getPageIndex() {
+ return pageIndex;
+ }
+
+ /**
+ * pageIndex attribute 값을 설정한다.
+ *
+ * @param pageIndex
+ * the pageIndex to set
+ */
+ public void setPageIndex(int pageIndex) {
+ this.pageIndex = pageIndex;
+ }
+
+ /**
+ * pageUnit attribute를 리턴한다.
+ *
+ * @return the pageUnit
+ */
+ public int getPageUnit() {
+ return pageUnit;
+ }
+
+ /**
+ * pageUnit attribute 값을 설정한다.
+ *
+ * @param pageUnit
+ * the pageUnit to set
+ */
+ public void setPageUnit(int pageUnit) {
+ this.pageUnit = pageUnit;
+ }
+
+ /**
+ * pageSize attribute를 리턴한다.
+ *
+ * @return the pageSize
+ */
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ /**
+ * pageSize attribute 값을 설정한다.
+ *
+ * @param pageSize
+ * the pageSize to set
+ */
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ /**
+ * firstIndex attribute를 리턴한다.
+ *
+ * @return the firstIndex
+ */
+ public int getFirstIndex() {
+ return firstIndex;
+ }
+
+ /**
+ * firstIndex attribute 값을 설정한다.
+ *
+ * @param firstIndex
+ * the firstIndex to set
+ */
+ public void setFirstIndex(int firstIndex) {
+ this.firstIndex = firstIndex;
+ }
+
+ /**
+ * lastIndex attribute를 리턴한다.
+ *
+ * @return the lastIndex
+ */
+ public int getLastIndex() {
+ return lastIndex;
+ }
+
+ /**
+ * lastIndex attribute 값을 설정한다.
+ *
+ * @param lastIndex
+ * the lastIndex to set
+ */
+ public void setLastIndex(int lastIndex) {
+ this.lastIndex = lastIndex;
+ }
+
+ /**
+ * recordCountPerPage attribute를 리턴한다.
+ *
+ * @return the recordCountPerPage
+ */
+ public int getRecordCountPerPage() {
+ return recordCountPerPage;
+ }
+
+ /**
+ * recordCountPerPage attribute 값을 설정한다.
+ *
+ * @param recordCountPerPage
+ * the recordCountPerPage to set
+ */
+ public void setRecordCountPerPage(int recordCountPerPage) {
+ this.recordCountPerPage = recordCountPerPage;
+ }
+
+ /**
+ * rowNo attribute를 리턴한다.
+ *
+ * @return the rowNo
+ */
+ public int getRowNo() {
+ return rowNo;
+ }
+
+ /**
+ * rowNo attribute 값을 설정한다.
+ *
+ * @param rowNo
+ * the rowNo to set
+ */
+ public void setRowNo(int rowNo) {
+ this.rowNo = rowNo;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/BlogVO.java b/src/main/java/egovframework/com/cop/bbs/service/BlogVO.java
new file mode 100644
index 0000000..9fe2c3b
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/BlogVO.java
@@ -0,0 +1,443 @@
+package egovframework.com.cop.bbs.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 커뮤니티 관리를 위한 VO 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.4.2 이삼섭 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class BlogVO extends Blog implements Serializable {
+
+ /** 검색시작일 */
+ private String searchBgnDe = "";
+
+ /** 검색조건 */
+ private String searchCnd = "";
+
+ /** 검색종료일 */
+ private String searchEndDe = "";
+
+ /** 검색단어 */
+ private String searchWrd = "";
+
+ /** 정렬순서(DESC,ASC) */
+ private long sortOrdr = 0L;
+
+ /** 검색사용여부 */
+ private String searchUseYn = "";
+
+ /** 현재페이지 */
+ private int pageIndex = 1;
+
+ /** 페이지갯수 */
+ private int pageUnit = 10;
+
+ /** 페이지사이즈 */
+ private int pageSize = 10;
+
+ /** 첫페이지 인덱스 */
+ private int firstIndex = 1;
+
+ /** 마지막페이지 인덱스 */
+ private int lastIndex = 1;
+
+ /** 페이지당 레코드 개수 */
+ private int recordCountPerPage = 10;
+
+ /** 레코드 번호 */
+ private int rowNo = 0;
+
+ /** 등록구분 코드명 */
+ private String registSeCodeNm = "";
+
+ /** 최초 등록자명 */
+ private String frstRegisterNm = "";
+
+ /** 게시판 아이드 */
+ private String bbsId = "";
+
+ /** 게시판 이름 */
+ private String bbsNm = "";
+
+ /** 제공 URL */
+ private String provdUrl = "";
+
+ private String blogId = "";
+
+
+ /**
+ * searchBgnDe attribute를 리턴한다.
+ *
+ * @return the searchBgnDe
+ */
+ public String getSearchBgnDe() {
+ return searchBgnDe;
+ }
+
+ /**
+ * searchBgnDe attribute 값을 설정한다.
+ *
+ * @param searchBgnDe
+ * the searchBgnDe to set
+ */
+ public void setSearchBgnDe(String searchBgnDe) {
+ this.searchBgnDe = searchBgnDe;
+ }
+
+ /**
+ * searchCnd attribute를 리턴한다.
+ *
+ * @return the searchCnd
+ */
+ public String getSearchCnd() {
+ return searchCnd;
+ }
+
+ /**
+ * searchCnd attribute 값을 설정한다.
+ *
+ * @param searchCnd
+ * the searchCnd to set
+ */
+ public void setSearchCnd(String searchCnd) {
+ this.searchCnd = searchCnd;
+ }
+
+ /**
+ * searchEndDe attribute를 리턴한다.
+ *
+ * @return the searchEndDe
+ */
+ public String getSearchEndDe() {
+ return searchEndDe;
+ }
+
+ /**
+ * searchEndDe attribute 값을 설정한다.
+ *
+ * @param searchEndDe
+ * the searchEndDe to set
+ */
+ public void setSearchEndDe(String searchEndDe) {
+ this.searchEndDe = searchEndDe;
+ }
+
+ /**
+ * searchWrd attribute를 리턴한다.
+ *
+ * @return the searchWrd
+ */
+ public String getSearchWrd() {
+ return searchWrd;
+ }
+
+ /**
+ * searchWrd attribute 값을 설정한다.
+ *
+ * @param searchWrd
+ * the searchWrd to set
+ */
+ public void setSearchWrd(String searchWrd) {
+ this.searchWrd = searchWrd;
+ }
+
+ /**
+ * sortOrdr attribute를 리턴한다.
+ *
+ * @return the sortOrdr
+ */
+ public long getSortOrdr() {
+ return sortOrdr;
+ }
+
+ /**
+ * sortOrdr attribute 값을 설정한다.
+ *
+ * @param sortOrdr
+ * the sortOrdr to set
+ */
+ public void setSortOrdr(long sortOrdr) {
+ this.sortOrdr = sortOrdr;
+ }
+
+ /**
+ * searchUseYn attribute를 리턴한다.
+ *
+ * @return the searchUseYn
+ */
+ public String getSearchUseYn() {
+ return searchUseYn;
+ }
+
+ /**
+ * searchUseYn attribute 값을 설정한다.
+ *
+ * @param searchUseYn
+ * the searchUseYn to set
+ */
+ public void setSearchUseYn(String searchUseYn) {
+ this.searchUseYn = searchUseYn;
+ }
+
+ /**
+ * pageIndex attribute를 리턴한다.
+ *
+ * @return the pageIndex
+ */
+ public int getPageIndex() {
+ return pageIndex;
+ }
+
+ /**
+ * pageIndex attribute 값을 설정한다.
+ *
+ * @param pageIndex
+ * the pageIndex to set
+ */
+ public void setPageIndex(int pageIndex) {
+ this.pageIndex = pageIndex;
+ }
+
+ /**
+ * pageUnit attribute를 리턴한다.
+ *
+ * @return the pageUnit
+ */
+ public int getPageUnit() {
+ return pageUnit;
+ }
+
+ /**
+ * pageUnit attribute 값을 설정한다.
+ *
+ * @param pageUnit
+ * the pageUnit to set
+ */
+ public void setPageUnit(int pageUnit) {
+ this.pageUnit = pageUnit;
+ }
+
+ /**
+ * pageSize attribute를 리턴한다.
+ *
+ * @return the pageSize
+ */
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ /**
+ * pageSize attribute 값을 설정한다.
+ *
+ * @param pageSize
+ * the pageSize to set
+ */
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ /**
+ * firstIndex attribute를 리턴한다.
+ *
+ * @return the firstIndex
+ */
+ public int getFirstIndex() {
+ return firstIndex;
+ }
+
+ /**
+ * firstIndex attribute 값을 설정한다.
+ *
+ * @param firstIndex
+ * the firstIndex to set
+ */
+ public void setFirstIndex(int firstIndex) {
+ this.firstIndex = firstIndex;
+ }
+
+ /**
+ * lastIndex attribute를 리턴한다.
+ *
+ * @return the lastIndex
+ */
+ public int getLastIndex() {
+ return lastIndex;
+ }
+
+ /**
+ * lastIndex attribute 값을 설정한다.
+ *
+ * @param lastIndex
+ * the lastIndex to set
+ */
+ public void setLastIndex(int lastIndex) {
+ this.lastIndex = lastIndex;
+ }
+
+ /**
+ * recordCountPerPage attribute를 리턴한다.
+ *
+ * @return the recordCountPerPage
+ */
+ public int getRecordCountPerPage() {
+ return recordCountPerPage;
+ }
+
+ /**
+ * recordCountPerPage attribute 값을 설정한다.
+ *
+ * @param recordCountPerPage
+ * the recordCountPerPage to set
+ */
+ public void setRecordCountPerPage(int recordCountPerPage) {
+ this.recordCountPerPage = recordCountPerPage;
+ }
+
+ /**
+ * rowNo attribute를 리턴한다.
+ *
+ * @return the rowNo
+ */
+ public int getRowNo() {
+ return rowNo;
+ }
+
+ /**
+ * rowNo attribute 값을 설정한다.
+ *
+ * @param rowNo
+ * the rowNo to set
+ */
+ public void setRowNo(int rowNo) {
+ this.rowNo = rowNo;
+ }
+
+ /**
+ * registSeCodeNm attribute를 리턴한다.
+ *
+ * @return the registSeCodeNm
+ */
+ public String getRegistSeCodeNm() {
+ return registSeCodeNm;
+ }
+
+ /**
+ * registSeCodeNm attribute 값을 설정한다.
+ *
+ * @param registSeCodeNm
+ * the registSeCodeNm to set
+ */
+ public void setRegistSeCodeNm(String registSeCodeNm) {
+ this.registSeCodeNm = registSeCodeNm;
+ }
+
+ /**
+ * frstRegisterNm attribute를 리턴한다.
+ *
+ * @return the frstRegisterNm
+ */
+ public String getFrstRegisterNm() {
+ return frstRegisterNm;
+ }
+
+ /**
+ * frstRegisterNm attribute 값을 설정한다.
+ *
+ * @param frstRegisterNm
+ * the frstRegisterNm to set
+ */
+ public void setFrstRegisterNm(String frstRegisterNm) {
+ this.frstRegisterNm = frstRegisterNm;
+ }
+
+ /**
+ * bbsId attribute를 리턴한다.
+ *
+ * @return the bbsId
+ */
+ public String getBbsId() {
+ return bbsId;
+ }
+
+ /**
+ * bbsId attribute 값을 설정한다.
+ *
+ * @param bbsId
+ * the bbsId to set
+ */
+ public void setBbsId(String bbsId) {
+ this.bbsId = bbsId;
+ }
+
+
+ public String getBlogId() {
+ return blogId;
+ }
+
+ /**
+ * bbsId attribute 값을 설정한다.
+ *
+ * @param bbsId
+ * the bbsId to set
+ */
+ public void setBlogId(String blogId) {
+ this.blogId = blogId;
+ }
+
+ /**
+ * bbsNm attribute를 리턴한다.
+ *
+ * @return the bbsNm
+ */
+ public String getBbsNm() {
+ return bbsNm;
+ }
+
+ /**
+ * bbsNm attribute 값을 설정한다.
+ *
+ * @param bbsNm
+ * the bbsNm to set
+ */
+ public void setBbsNm(String bbsNm) {
+ this.bbsNm = bbsNm;
+ }
+
+ /**
+ * provdUrl attribute를 리턴한다.
+ * @return the provdUrl
+ */
+ public String getProvdUrl() {
+ return provdUrl;
+ }
+
+ /**
+ * provdUrl attribute 값을 설정한다.
+ * @param provdUrl the provdUrl to set
+ */
+ public void setProvdUrl(String provdUrl) {
+ this.provdUrl = provdUrl;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/Board.java b/src/main/java/egovframework/com/cop/bbs/service/Board.java
new file mode 100644
index 0000000..fd158a3
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/Board.java
@@ -0,0 +1,573 @@
+package egovframework.com.cop.bbs.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * @Class Name : Board.java
+ * @Description : 게시물에 대한 데이터 처리 모델
+ * @Modification Information
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.03.06 이삼섭 최초 생성
+ *
+ * @author 공통 서비스 개발팀 이삼섭
+ * @since 2009. 02. 13
+ * @version 1.0
+ * @see
+ *
+ */
+@SuppressWarnings("serial")
+public class Board implements Serializable {
+
+ /**
+ * 게시물 첨부파일 아이디
+ */
+ private String atchFileId = "";
+ /**
+ * 게시판 아이디
+ */
+ private String bbsId = "";
+ /**
+ * 최초등록자 아이디
+ */
+ private String frstRegisterId = "";
+ /**
+ * 최초등록시점
+ */
+ private String frstRegisterPnttm = "";
+ /**
+ * 최종수정자 아이디
+ */
+ private String lastUpdusrId = "";
+ /**
+ * 최종수정시점
+ */
+ private String lastUpdusrPnttm = "";
+ /**
+ * 게시시작일
+ */
+ private String ntceBgnde = "";
+ /**
+ * 게시종료일
+ */
+ private String ntceEndde = "";
+ /**
+ * 게시자 아이디
+ */
+ private String ntcrId = "";
+ /**
+ * 게시자명
+ */
+ private String ntcrNm = "";
+ /**
+ * 게시물 내용
+ */
+ private String nttCn = "";
+ /**
+ * 게시물 아이디
+ */
+ private long nttId = 0L;
+ /**
+ * 게시물 번호
+ */
+ private long nttNo = 0L;
+ /**
+ * 게시물 제목
+ */
+ private String nttSj = "";
+ /**
+ * 부모글번호
+ */
+ private String parnts = "0";
+ /**
+ * 패스워드
+ */
+ private String password = "";
+ /**
+ * 조회수
+ */
+ private int inqireCo = 0;
+ /**
+ * 답장여부
+ */
+ private String replyAt = "";
+ /**
+ * 답장위치
+ */
+ private String replyLc = "0";
+ /**
+ * 정렬순서
+ */
+ private long sortOrdr = 0L;
+ /**
+ * 사용여부
+ */
+ private String useAt = "";
+ /**
+ * 게시 종료일
+ */
+ private String ntceEnddeView = "";
+ /**
+ * 게시 시작일
+ */
+ private String ntceBgndeView = "";
+ /**
+ * 공지사항 여부
+ */
+ private String noticeAt = "";
+ /**
+ * 비밀글 여부
+ */
+ private String secretAt = "";
+ /**
+ * 제목 Bold 여부
+ */
+ private String sjBoldAt = "";
+ /**
+ * 블로그 게시판 여부
+ */
+ private String blogAt = "";
+ /** 블로그 ID */
+ private String blogId = "";
+ /**
+ * atchFileId attribute를 리턴한다.
+ * @return the atchFileId
+ */
+ public String getAtchFileId() {
+ return atchFileId;
+ }
+
+ /**
+ * atchFileId attribute 값을 설정한다.
+ * @param atchFileId the atchFileId to set
+ */
+ public void setAtchFileId(String atchFileId) {
+ this.atchFileId = atchFileId;
+ }
+
+ /**
+ * bbsId attribute를 리턴한다.
+ * @return the bbsId
+ */
+ public String getBbsId() {
+ return bbsId;
+ }
+
+ /**
+ * bbsId attribute 값을 설정한다.
+ * @param bbsId the bbsId to set
+ */
+ public void setBbsId(String bbsId) {
+ this.bbsId = bbsId;
+ }
+
+ /**
+ * frstRegisterId attribute를 리턴한다.
+ * @return the frstRegisterId
+ */
+ public String getFrstRegisterId() {
+ return frstRegisterId;
+ }
+
+ /**
+ * frstRegisterId attribute 값을 설정한다.
+ * @param frstRegisterId the frstRegisterId to set
+ */
+ public void setFrstRegisterId(String frstRegisterId) {
+ this.frstRegisterId = frstRegisterId;
+ }
+
+ /**
+ * frstRegisterPnttm attribute를 리턴한다.
+ * @return the frstRegisterPnttm
+ */
+ public String getFrstRegisterPnttm() {
+ return frstRegisterPnttm;
+ }
+
+ /**
+ * frstRegisterPnttm attribute 값을 설정한다.
+ * @param frstRegisterPnttm the frstRegisterPnttm to set
+ */
+ public void setFrstRegisterPnttm(String frstRegisterPnttm) {
+ this.frstRegisterPnttm = frstRegisterPnttm;
+ }
+
+ /**
+ * lastUpdusrId attribute를 리턴한다.
+ * @return the lastUpdusrId
+ */
+ public String getLastUpdusrId() {
+ return lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrId attribute 값을 설정한다.
+ * @param lastUpdusrId the lastUpdusrId to set
+ */
+ public void setLastUpdusrId(String lastUpdusrId) {
+ this.lastUpdusrId = lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute를 리턴한다.
+ * @return the lastUpdusrPnttm
+ */
+ public String getLastUpdusrPnttm() {
+ return lastUpdusrPnttm;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute 값을 설정한다.
+ * @param lastUpdusrPnttm the lastUpdusrPnttm to set
+ */
+ public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
+ this.lastUpdusrPnttm = lastUpdusrPnttm;
+ }
+
+ /**
+ * ntceBgnde attribute를 리턴한다.
+ * @return the ntceBgnde
+ */
+ public String getNtceBgnde() {
+ return ntceBgnde;
+ }
+
+ /**
+ * ntceBgnde attribute 값을 설정한다.
+ * @param ntceBgnde the ntceBgnde to set
+ */
+ public void setNtceBgnde(String ntceBgnde) {
+ this.ntceBgnde = ntceBgnde;
+ }
+
+ /**
+ * ntceEndde attribute를 리턴한다.
+ * @return the ntceEndde
+ */
+ public String getNtceEndde() {
+ return ntceEndde;
+ }
+
+ /**
+ * ntceEndde attribute 값을 설정한다.
+ * @param ntceEndde the ntceEndde to set
+ */
+ public void setNtceEndde(String ntceEndde) {
+ this.ntceEndde = ntceEndde;
+ }
+
+ /**
+ * ntcrId attribute를 리턴한다.
+ * @return the ntcrId
+ */
+ public String getNtcrId() {
+ return ntcrId;
+ }
+
+ /**
+ * ntcrId attribute 값을 설정한다.
+ * @param ntcrId the ntcrId to set
+ */
+ public void setNtcrId(String ntcrId) {
+ this.ntcrId = ntcrId;
+ }
+
+ /**
+ * ntcrNm attribute를 리턴한다.
+ * @return the ntcrNm
+ */
+ public String getNtcrNm() {
+ return ntcrNm;
+ }
+
+ /**
+ * ntcrNm attribute 값을 설정한다.
+ * @param ntcrNm the ntcrNm to set
+ */
+ public void setNtcrNm(String ntcrNm) {
+ this.ntcrNm = ntcrNm;
+ }
+
+ /**
+ * nttCn attribute를 리턴한다.
+ * @return the nttCn
+ */
+ public String getNttCn() {
+ return nttCn;
+ }
+
+ /**
+ * nttCn attribute 값을 설정한다.
+ * @param nttCn the nttCn to set
+ */
+ public void setNttCn(String nttCn) {
+ this.nttCn = nttCn;
+ }
+
+ /**
+ * nttId attribute를 리턴한다.
+ * @return the nttId
+ */
+ public long getNttId() {
+ return nttId;
+ }
+
+ /**
+ * nttId attribute 값을 설정한다.
+ * @param nttId the nttId to set
+ */
+ public void setNttId(long nttId) {
+ this.nttId = nttId;
+ }
+
+ /**
+ * nttNo attribute를 리턴한다.
+ * @return the nttNo
+ */
+ public long getNttNo() {
+ return nttNo;
+ }
+
+ /**
+ * nttNo attribute 값을 설정한다.
+ * @param nttNo the nttNo to set
+ */
+ public void setNttNo(long nttNo) {
+ this.nttNo = nttNo;
+ }
+
+ /**
+ * nttSj attribute를 리턴한다.
+ * @return the nttSj
+ */
+ public String getNttSj() {
+ return nttSj;
+ }
+
+ /**
+ * nttSj attribute 값을 설정한다.
+ * @param nttSj the nttSj to set
+ */
+ public void setNttSj(String nttSj) {
+ this.nttSj = nttSj;
+ }
+
+ /**
+ * parnts attribute를 리턴한다.
+ * @return the parnts
+ */
+ public String getParnts() {
+ return parnts;
+ }
+
+ /**
+ * parnts attribute 값을 설정한다.
+ * @param parnts the parnts to set
+ */
+ public void setParnts(String parnts) {
+ this.parnts = parnts;
+ }
+
+ /**
+ * password attribute를 리턴한다.
+ * @return the password
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * password attribute 값을 설정한다.
+ * @param password the password to set
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ /**
+ * inqireCo attribute를 리턴한다.
+ * @return the inqireCo
+ */
+ public int getInqireCo() {
+ return inqireCo;
+ }
+
+ /**
+ * inqireCo attribute 값을 설정한다.
+ * @param inqireCo the inqireCo to set
+ */
+ public void setInqireCo(int inqireCo) {
+ this.inqireCo = inqireCo;
+ }
+
+ /**
+ * replyAt attribute를 리턴한다.
+ * @return the replyAt
+ */
+ public String getReplyAt() {
+ return replyAt;
+ }
+
+ /**
+ * replyAt attribute 값을 설정한다.
+ * @param replyAt the replyAt to set
+ */
+ public void setReplyAt(String replyAt) {
+ this.replyAt = replyAt;
+ }
+
+ /**
+ * replyLc attribute를 리턴한다.
+ * @return the replyLc
+ */
+ public String getReplyLc() {
+ return replyLc;
+ }
+
+ /**
+ * replyLc attribute 값을 설정한다.
+ * @param replyLc the replyLc to set
+ */
+ public void setReplyLc(String replyLc) {
+ this.replyLc = replyLc;
+ }
+
+ /**
+ * sortOrdr attribute를 리턴한다.
+ * @return the sortOrdr
+ */
+ public long getSortOrdr() {
+ return sortOrdr;
+ }
+
+ /**
+ * sortOrdr attribute 값을 설정한다.
+ * @param sortOrdr the sortOrdr to set
+ */
+ public void setSortOrdr(long sortOrdr) {
+ this.sortOrdr = sortOrdr;
+ }
+
+ /**
+ * useAt attribute를 리턴한다.
+ * @return the useAt
+ */
+ public String getUseAt() {
+ return useAt;
+ }
+
+ /**
+ * useAt attribute 값을 설정한다.
+ * @param useAt the useAt to set
+ */
+ public void setUseAt(String useAt) {
+ this.useAt = useAt;
+ }
+
+ /**
+ * ntceEnddeView attribute를 리턴한다.
+ * @return the ntceEnddeView
+ */
+ public String getNtceEnddeView() {
+ return ntceEnddeView;
+ }
+
+ /**
+ * ntceEnddeView attribute 값을 설정한다.
+ * @param ntceEnddeView the ntceEnddeView to set
+ */
+ public void setNtceEnddeView(String ntceEnddeView) {
+ this.ntceEnddeView = ntceEnddeView;
+ }
+
+ /**
+ * ntceBgndeView attribute를 리턴한다.
+ * @return the ntceBgndeView
+ */
+ public String getNtceBgndeView() {
+ return ntceBgndeView;
+ }
+
+ /**
+ * ntceBgndeView attribute 값을 설정한다.
+ * @param ntceBgndeView the ntceBgndeView to set
+ */
+ public void setNtceBgndeView(String ntceBgndeView) {
+ this.ntceBgndeView = ntceBgndeView;
+ }
+
+ /**
+ * noticeAt attribute를 리턴한다.
+ * @return the noticeAt
+ */
+ public String getNoticeAt() {
+ return noticeAt;
+ }
+
+ /**
+ * noticeAt attribute 값을 설정한다.
+ * @param noticeAt the noticeAt to set
+ */
+ public void setNoticeAt(String noticeAt) {
+ this.noticeAt = noticeAt;
+ }
+
+ /**
+ * secretAt attribute를 리턴한다.
+ * @return the secretAt
+ */
+ public String getSecretAt() {
+ return secretAt;
+ }
+
+ /**
+ * secretAt attribute 값을 설정한다.
+ * @param secretAt the secretAt to set
+ */
+ public void setSecretAt(String secretAt) {
+ this.secretAt = secretAt;
+ }
+
+ /**
+ * sjBoldAt attribute를 리턴한다.
+ * @return the sjBoldAt
+ */
+ public String getSjBoldAt() {
+ return sjBoldAt;
+ }
+
+ /**
+ * sjBoldAt attribute 값을 설정한다.
+ * @param sjBoldAt the sjBoldAt to set
+ */
+ public void setSjBoldAt(String sjBoldAt) {
+ this.sjBoldAt = sjBoldAt;
+ }
+
+ public String getBlogAt() {
+ return blogAt;
+ }
+
+ public void setBlogAt(String blogAt) {
+ this.blogAt = blogAt;
+ }
+
+ public String getBlogId() {
+ return blogId;
+ }
+
+ public void setBlogId(String blogId) {
+ this.blogId = blogId;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString(){
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/BoardMaster.java b/src/main/java/egovframework/com/cop/bbs/service/BoardMaster.java
new file mode 100644
index 0000000..be9f1c4
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/BoardMaster.java
@@ -0,0 +1,553 @@
+package egovframework.com.cop.bbs.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 게시판 속성정보를 담기위한 엔티티 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.03.12 이삼섭 최초 생성
+ * 2009.06.26 한성곤 2단계 기능 추가 (댓글관리, 만족도조사)
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class BoardMaster implements Serializable {
+
+ /** 게시판 아이디 */
+ private String bbsId = "";
+
+ /** 게시판 소개 */
+ private String bbsIntrcn = "";
+
+ /** 게시판 명 */
+ private String bbsNm = "";
+
+ /** 게시판 유형코드 */
+ private String bbsTyCode = "";
+
+ /** 파일첨부가능여부 */
+ private String fileAtchPosblAt = "";
+
+ /** 최초등록자 아이디 */
+ private String frstRegisterId = "";
+
+ /** 최초등록시점 */
+ private String frstRegisterPnttm = "";
+
+ /** 최종수정자 아이디 */
+ public String lastUpdusrId = "";
+
+ /** 최종수정시점 */
+ private String lastUpdusrPnttm = "";
+
+ /** 첨부가능파일숫자 */
+ private int atchPosblFileNumber = 0;
+
+ /** 첨부가능파일사이즈 */
+ private String atchPosblFileSize = "";
+
+ /** 답장가능여부 */
+ private String replyPosblAt = "";
+
+ /** 템플릿 아이디 */
+ private String tmplatId = "";
+
+ /** 사용여부 */
+ private String useAt = "";
+
+ /** 사용플래그 */
+ private String bbsUseFlag = "";
+
+ /** 대상 아이디 */
+ private String trgetId = "";
+
+ /** 등록구분코드 */
+ private String registSeCode = "";
+
+ /** 유일 아이디 */
+ private String uniqId = "";
+
+ /** 템플릿 명 */
+ private String tmplatNm = "";
+
+ /** 커뮤니티 ID */
+ private String cmmntyId;
+
+ /** 블로그 ID */
+ private String blogId;
+
+ /** 블로그 사용 유무 */
+ private String blogAt;
+
+ //---------------------------------
+ // 2009.06.26 : 2단계 기능 추가
+ //---------------------------------
+ /** 추가 option (댓글-comment, 만족도조사-stsfdg) */
+ private String option = "";
+
+ /** 댓글 여부 */
+ private String commentAt = "";
+
+ /** 만족도조사 */
+ private String stsfdgAt = "";
+ ////-------------------------------
+
+ /**
+ * bbsId attribute를 리턴한다.
+ *
+ * @return the bbsId
+ */
+ public String getBbsId() {
+ return bbsId;
+ }
+
+ /**
+ * bbsId attribute 값을 설정한다.
+ *
+ * @param bbsId
+ * the bbsId to set
+ */
+ public void setBbsId(String bbsId) {
+ this.bbsId = bbsId;
+ }
+
+ /**
+ * bbsIntrcn attribute를 리턴한다.
+ *
+ * @return the bbsIntrcn
+ */
+ public String getBbsIntrcn() {
+ return bbsIntrcn;
+ }
+
+ /**
+ * bbsIntrcn attribute 값을 설정한다.
+ *
+ * @param bbsIntrcn
+ * the bbsIntrcn to set
+ */
+ public void setBbsIntrcn(String bbsIntrcn) {
+ this.bbsIntrcn = bbsIntrcn;
+ }
+
+ /**
+ * bbsNm attribute를 리턴한다.
+ *
+ * @return the bbsNm
+ */
+ public String getBbsNm() {
+ return bbsNm;
+ }
+
+ /**
+ * bbsNm attribute 값을 설정한다.
+ *
+ * @param bbsNm
+ * the bbsNm to set
+ */
+ public void setBbsNm(String bbsNm) {
+ this.bbsNm = bbsNm;
+ }
+
+ /**
+ * bbsTyCode attribute를 리턴한다.
+ *
+ * @return the bbsTyCode
+ */
+ public String getBbsTyCode() {
+ return bbsTyCode;
+ }
+
+ /**
+ * bbsTyCode attribute 값을 설정한다.
+ *
+ * @param bbsTyCode
+ * the bbsTyCode to set
+ */
+ public void setBbsTyCode(String bbsTyCode) {
+ this.bbsTyCode = bbsTyCode;
+ }
+
+ /**
+ * fileAtchPosblAt attribute를 리턴한다.
+ *
+ * @return the fileAtchPosblAt
+ */
+ public String getFileAtchPosblAt() {
+ return fileAtchPosblAt;
+ }
+
+ /**
+ * fileAtchPosblAt attribute 값을 설정한다.
+ *
+ * @param fileAtchPosblAt
+ * the fileAtchPosblAt to set
+ */
+ public void setFileAtchPosblAt(String fileAtchPosblAt) {
+ this.fileAtchPosblAt = fileAtchPosblAt;
+ }
+
+ /**
+ * frstRegisterId attribute를 리턴한다.
+ *
+ * @return the frstRegisterId
+ */
+ public String getFrstRegisterId() {
+ return frstRegisterId;
+ }
+
+ /**
+ * frstRegisterId attribute 값을 설정한다.
+ *
+ * @param frstRegisterId
+ * the frstRegisterId to set
+ */
+ public void setFrstRegisterId(String frstRegisterId) {
+ this.frstRegisterId = frstRegisterId;
+ }
+
+ /**
+ * frstRegisterPnttm attribute를 리턴한다.
+ *
+ * @return the frstRegisterPnttm
+ */
+ public String getFrstRegisterPnttm() {
+ return frstRegisterPnttm;
+ }
+
+ /**
+ * frstRegisterPnttm attribute 값을 설정한다.
+ *
+ * @param frstRegisterPnttm
+ * the frstRegisterPnttm to set
+ */
+ public void setFrstRegisterPnttm(String frstRegisterPnttm) {
+ this.frstRegisterPnttm = frstRegisterPnttm;
+ }
+
+ /**
+ * lastUpdusrId attribute를 리턴한다.
+ *
+ * @return the lastUpdusrId
+ */
+ public String getLastUpdusrId() {
+ return lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrId attribute 값을 설정한다.
+ *
+ * @param lastUpdusrId
+ * the lastUpdusrId to set
+ */
+ public void setLastUpdusrId(String lastUpdusrId) {
+ this.lastUpdusrId = lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute를 리턴한다.
+ *
+ * @return the lastUpdusrPnttm
+ */
+ public String getLastUpdusrPnttm() {
+ return lastUpdusrPnttm;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute 값을 설정한다.
+ *
+ * @param lastUpdusrPnttm
+ * the lastUpdusrPnttm to set
+ */
+ public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
+ this.lastUpdusrPnttm = lastUpdusrPnttm;
+ }
+
+ /**
+ * atchPosblFileNumber attribute를 리턴한다.
+ *
+ * @return the atchPosblFileNumber
+ */
+ public int getAtchPosblFileNumber() {
+ return atchPosblFileNumber;
+ }
+
+ /**
+ * atchPosblFileNumber attribute 값을 설정한다.
+ *
+ * @param atchPosblFileNumber
+ * the atchPosblFileNumber to set
+ */
+ public void setAtchPosblFileNumber(int atchPosblFileNumber) {
+ this.atchPosblFileNumber = atchPosblFileNumber;
+ }
+
+ /**
+ * atchPosblFileSize attribute를 리턴한다.
+ *
+ * @return the atchPosblFileSize
+ */
+ public String getAtchPosblFileSize() {
+ return atchPosblFileSize;
+ }
+
+ /**
+ * atchPosblFileSize attribute 값을 설정한다.
+ *
+ * @param atchPosblFileSize
+ * the atchPosblFileSize to set
+ */
+ public void setAtchPosblFileSize(String atchPosblFileSize) {
+ this.atchPosblFileSize = atchPosblFileSize;
+ }
+
+ /**
+ * replyPosblAt attribute를 리턴한다.
+ *
+ * @return the replyPosblAt
+ */
+ public String getReplyPosblAt() {
+ return replyPosblAt;
+ }
+
+ /**
+ * replyPosblAt attribute 값을 설정한다.
+ *
+ * @param replyPosblAt
+ * the replyPosblAt to set
+ */
+ public void setReplyPosblAt(String replyPosblAt) {
+ this.replyPosblAt = replyPosblAt;
+ }
+
+ /**
+ * tmplatId attribute를 리턴한다.
+ *
+ * @return the tmplatId
+ */
+ public String getTmplatId() {
+ return tmplatId;
+ }
+
+ /**
+ * tmplatId attribute 값을 설정한다.
+ *
+ * @param tmplatId
+ * the tmplatId to set
+ */
+ public void setTmplatId(String tmplatId) {
+ this.tmplatId = tmplatId;
+ }
+
+ /**
+ * useAt attribute를 리턴한다.
+ *
+ * @return the useAt
+ */
+ public String getUseAt() {
+ return useAt;
+ }
+
+ /**
+ * useAt attribute 값을 설정한다.
+ *
+ * @param useAt
+ * the useAt to set
+ */
+ public void setUseAt(String useAt) {
+ this.useAt = useAt;
+ }
+
+ /**
+ * bbsUseFlag attribute를 리턴한다.
+ *
+ * @return the bbsUseFlag
+ */
+ public String getBbsUseFlag() {
+ return bbsUseFlag;
+ }
+
+ /**
+ * bbsUseFlag attribute 값을 설정한다.
+ *
+ * @param bbsUseFlag
+ * the bbsUseFlag to set
+ */
+ public void setBbsUseFlag(String bbsUseFlag) {
+ this.bbsUseFlag = bbsUseFlag;
+ }
+
+ /**
+ * trgetId attribute를 리턴한다.
+ *
+ * @return the trgetId
+ */
+ public String getTrgetId() {
+ return trgetId;
+ }
+
+ /**
+ * trgetId attribute 값을 설정한다.
+ *
+ * @param trgetId
+ * the trgetId to set
+ */
+ public void setTrgetId(String trgetId) {
+ this.trgetId = trgetId;
+ }
+
+ /**
+ * registSeCode attribute를 리턴한다.
+ *
+ * @return the registSeCode
+ */
+ public String getRegistSeCode() {
+ return registSeCode;
+ }
+
+ /**
+ * registSeCode attribute 값을 설정한다.
+ *
+ * @param registSeCode
+ * the registSeCode to set
+ */
+ public void setRegistSeCode(String registSeCode) {
+ this.registSeCode = registSeCode;
+ }
+
+ /**
+ * uniqId attribute를 리턴한다.
+ *
+ * @return the uniqId
+ */
+ public String getUniqId() {
+ return uniqId;
+ }
+
+ /**
+ * uniqId attribute 값을 설정한다.
+ *
+ * @param uniqId
+ * the uniqId to set
+ */
+ public void setUniqId(String uniqId) {
+ this.uniqId = uniqId;
+ }
+
+ /**
+ * tmplatNm attribute를 리턴한다.
+ *
+ * @return the tmplatNm
+ */
+ public String getTmplatNm() {
+ return tmplatNm;
+ }
+
+ /**
+ * tmplatNm attribute 값을 설정한다.
+ *
+ * @param tmplatNm
+ * the tmplatNm to set
+ */
+ public void setTmplatNm(String tmplatNm) {
+ this.tmplatNm = tmplatNm;
+ }
+
+ /**
+ * option attribute를 리턴한다.
+ * @return the option
+ */
+ public String getOption() {
+ return option;
+ }
+
+ /**
+ * option attribute 값을 설정한다.
+ * @param option the option to set
+ */
+ public void setOption(String option) {
+ this.option = option;
+ }
+
+ /**
+ * commentAt attribute를 리턴한다.
+ * @return the commentAt
+ */
+ public String getCommentAt() {
+ return commentAt;
+ }
+
+ /**
+ * commentAt attribute 값을 설정한다.
+ * @param commentAt the commentAt to set
+ */
+ public void setCommentAt(String commentAt) {
+ this.commentAt = commentAt;
+ }
+
+ /**
+ * stsfdgAt attribute를 리턴한다.
+ * @return the stsfdgAt
+ */
+ public String getStsfdgAt() {
+ return stsfdgAt;
+ }
+
+ /**
+ * stsfdg attribute 값을 설정한다.
+ * @param stsfdgAt the stsfdgAt to set
+ */
+ public void setStsfdgAt(String stsfdgAt) {
+ this.stsfdgAt = stsfdgAt;
+ }
+
+ /**
+ * cmmntyId attribute를 리턴한다.
+ * @return the cmmntyId
+ */
+ public String getCmmntyId() {
+ return cmmntyId;
+ }
+
+ /**
+ * cmmntyId attribute 값을 설정한다.
+ * @param cmmntyId the cmmntyId to set
+ */
+ public void setCmmntyId(String cmmntyId) {
+ this.cmmntyId = cmmntyId;
+ }
+
+ public String getBlogId() {
+ return blogId;
+ }
+
+ public void setBlogId(String blogId) {
+ this.blogId = blogId;
+ }
+
+ public String getBlogAt() {
+ return blogAt;
+ }
+
+ public void setBlogAt(String blogAt) {
+ this.blogAt = blogAt;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/BoardMasterVO.java b/src/main/java/egovframework/com/cop/bbs/service/BoardMasterVO.java
new file mode 100644
index 0000000..d14bf38
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/BoardMasterVO.java
@@ -0,0 +1,450 @@
+package egovframework.com.cop.bbs.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 게시판 속성 정보를 관리하기 위한 VO 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.3.12 이삼섭 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class BoardMasterVO extends BoardMaster implements Serializable {
+
+ /** 검색시작일 */
+ private String searchBgnDe = "";
+
+ /** 검색조건 */
+ private String searchCnd = "";
+
+ /** 검색종료일 */
+ private String searchEndDe = "";
+
+ /** 검색단어 */
+ private String searchWrd = "";
+
+ /** 정렬순서(DESC,ASC) */
+ private String sortOrdr = "";
+
+ /** 검색사용여부 */
+ private String searchUseYn = "";
+
+ /** 현재페이지 */
+ private int pageIndex = 1;
+
+ /** 페이지갯수 */
+ private int pageUnit = 10;
+
+ /** 페이지사이즈 */
+ private int pageSize = 10;
+
+ /** firstIndex */
+ private int firstIndex = 1;
+
+ /** lastIndex */
+ private int lastIndex = 1;
+
+ /** recordCountPerPage */
+ private int recordCountPerPage = 10;
+
+ /** rowNo */
+ private int rowNo = 0;
+
+ /** 최초 등록자명 */
+ private String frstRegisterNm = "";
+
+ /** 게시판유형 코드명 */
+ private String bbsTyCodeNm = "";
+
+ /** 템플릿 명 */
+ private String tmplatNm = "";
+
+ /** 최종 수정자명 */
+ private String lastUpdusrNm = "";
+
+ /** 권한지정 여부 */
+ private String authFlag = "";
+
+ /** 템플릿경로 */
+ private String tmplatCours = "";
+
+ /**
+ * searchBgnDe attribute를 리턴한다.
+ *
+ * @return the searchBgnDe
+ */
+ public String getSearchBgnDe() {
+ return searchBgnDe;
+ }
+
+ /**
+ * searchBgnDe attribute 값을 설정한다.
+ *
+ * @param searchBgnDe
+ * the searchBgnDe to set
+ */
+ public void setSearchBgnDe(String searchBgnDe) {
+ this.searchBgnDe = searchBgnDe;
+ }
+
+ /**
+ * searchCnd attribute를 리턴한다.
+ *
+ * @return the searchCnd
+ */
+ public String getSearchCnd() {
+ return searchCnd;
+ }
+
+ /**
+ * searchCnd attribute 값을 설정한다.
+ *
+ * @param searchCnd
+ * the searchCnd to set
+ */
+ public void setSearchCnd(String searchCnd) {
+ this.searchCnd = searchCnd;
+ }
+
+ /**
+ * searchEndDe attribute를 리턴한다.
+ *
+ * @return the searchEndDe
+ */
+ public String getSearchEndDe() {
+ return searchEndDe;
+ }
+
+ /**
+ * searchEndDe attribute 값을 설정한다.
+ *
+ * @param searchEndDe
+ * the searchEndDe to set
+ */
+ public void setSearchEndDe(String searchEndDe) {
+ this.searchEndDe = searchEndDe;
+ }
+
+ /**
+ * searchWrd attribute를 리턴한다.
+ *
+ * @return the searchWrd
+ */
+ public String getSearchWrd() {
+ return searchWrd;
+ }
+
+ /**
+ * searchWrd attribute 값을 설정한다.
+ *
+ * @param searchWrd
+ * the searchWrd to set
+ */
+ public void setSearchWrd(String searchWrd) {
+ this.searchWrd = searchWrd;
+ }
+
+ /**
+ * sortOrdr attribute를 리턴한다.
+ *
+ * @return the sortOrdr
+ */
+ public String getSortOrdr() {
+ return sortOrdr;
+ }
+
+ /**
+ * sortOrdr attribute 값을 설정한다.
+ *
+ * @param sortOrdr
+ * the sortOrdr to set
+ */
+ public void setSortOrdr(String sortOrdr) {
+ this.sortOrdr = sortOrdr;
+ }
+
+ /**
+ * searchUseYn attribute를 리턴한다.
+ *
+ * @return the searchUseYn
+ */
+ public String getSearchUseYn() {
+ return searchUseYn;
+ }
+
+ /**
+ * searchUseYn attribute 값을 설정한다.
+ *
+ * @param searchUseYn
+ * the searchUseYn to set
+ */
+ public void setSearchUseYn(String searchUseYn) {
+ this.searchUseYn = searchUseYn;
+ }
+
+ /**
+ * pageIndex attribute를 리턴한다.
+ *
+ * @return the pageIndex
+ */
+ public int getPageIndex() {
+ return pageIndex;
+ }
+
+ /**
+ * pageIndex attribute 값을 설정한다.
+ *
+ * @param pageIndex
+ * the pageIndex to set
+ */
+ public void setPageIndex(int pageIndex) {
+ this.pageIndex = pageIndex;
+ }
+
+ /**
+ * pageUnit attribute를 리턴한다.
+ *
+ * @return the pageUnit
+ */
+ public int getPageUnit() {
+ return pageUnit;
+ }
+
+ /**
+ * pageUnit attribute 값을 설정한다.
+ *
+ * @param pageUnit
+ * the pageUnit to set
+ */
+ public void setPageUnit(int pageUnit) {
+ this.pageUnit = pageUnit;
+ }
+
+ /**
+ * pageSize attribute를 리턴한다.
+ *
+ * @return the pageSize
+ */
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ /**
+ * pageSize attribute 값을 설정한다.
+ *
+ * @param pageSize
+ * the pageSize to set
+ */
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ /**
+ * firstIndex attribute를 리턴한다.
+ *
+ * @return the firstIndex
+ */
+ public int getFirstIndex() {
+ return firstIndex;
+ }
+
+ /**
+ * firstIndex attribute 값을 설정한다.
+ *
+ * @param firstIndex
+ * the firstIndex to set
+ */
+ public void setFirstIndex(int firstIndex) {
+ this.firstIndex = firstIndex;
+ }
+
+ /**
+ * lastIndex attribute를 리턴한다.
+ *
+ * @return the lastIndex
+ */
+ public int getLastIndex() {
+ return lastIndex;
+ }
+
+ /**
+ * lastIndex attribute 값을 설정한다.
+ *
+ * @param lastIndex
+ * the lastIndex to set
+ */
+ public void setLastIndex(int lastIndex) {
+ this.lastIndex = lastIndex;
+ }
+
+ /**
+ * recordCountPerPage attribute를 리턴한다.
+ *
+ * @return the recordCountPerPage
+ */
+ public int getRecordCountPerPage() {
+ return recordCountPerPage;
+ }
+
+ /**
+ * recordCountPerPage attribute 값을 설정한다.
+ *
+ * @param recordCountPerPage
+ * the recordCountPerPage to set
+ */
+ public void setRecordCountPerPage(int recordCountPerPage) {
+ this.recordCountPerPage = recordCountPerPage;
+ }
+
+ /**
+ * rowNo attribute를 리턴한다.
+ *
+ * @return the rowNo
+ */
+ public int getRowNo() {
+ return rowNo;
+ }
+
+ /**
+ * rowNo attribute 값을 설정한다.
+ *
+ * @param rowNo
+ * the rowNo to set
+ */
+ public void setRowNo(int rowNo) {
+ this.rowNo = rowNo;
+ }
+
+ /**
+ * frstRegisterNm attribute를 리턴한다.
+ *
+ * @return the frstRegisterNm
+ */
+ public String getFrstRegisterNm() {
+ return frstRegisterNm;
+ }
+
+ /**
+ * frstRegisterNm attribute 값을 설정한다.
+ *
+ * @param frstRegisterNm
+ * the frstRegisterNm to set
+ */
+ public void setFrstRegisterNm(String frstRegisterNm) {
+ this.frstRegisterNm = frstRegisterNm;
+ }
+
+ /**
+ * bbsTyCodeNm attribute를 리턴한다.
+ *
+ * @return the bbsTyCodeNm
+ */
+ public String getBbsTyCodeNm() {
+ return bbsTyCodeNm;
+ }
+
+ /**
+ * bbsTyCodeNm attribute 값을 설정한다.
+ *
+ * @param bbsTyCodeNm
+ * the bbsTyCodeNm to set
+ */
+ public void setBbsTyCodeNm(String bbsTyCodeNm) {
+ this.bbsTyCodeNm = bbsTyCodeNm;
+ }
+
+ /**
+ * tmplatNm attribute를 리턴한다.
+ *
+ * @return the tmplatNm
+ */
+ public String getTmplatNm() {
+ return tmplatNm;
+ }
+
+ /**
+ * tmplatNm attribute 값을 설정한다.
+ *
+ * @param tmplatNm
+ * the tmplatNm to set
+ */
+ public void setTmplatNm(String tmplatNm) {
+ this.tmplatNm = tmplatNm;
+ }
+
+ /**
+ * lastUpdusrNm attribute를 리턴한다.
+ *
+ * @return the lastUpdusrNm
+ */
+ public String getLastUpdusrNm() {
+ return lastUpdusrNm;
+ }
+
+ /**
+ * lastUpdusrNm attribute 값을 설정한다.
+ *
+ * @param lastUpdusrNm
+ * the lastUpdusrNm to set
+ */
+ public void setLastUpdusrNm(String lastUpdusrNm) {
+ this.lastUpdusrNm = lastUpdusrNm;
+ }
+
+ /**
+ * authFlag attribute를 리턴한다.
+ *
+ * @return the authFlag
+ */
+ public String getAuthFlag() {
+ return authFlag;
+ }
+
+ /**
+ * authFlag attribute 값을 설정한다.
+ *
+ * @param authFlag
+ * the authFlag to set
+ */
+ public void setAuthFlag(String authFlag) {
+ this.authFlag = authFlag;
+ }
+
+ /**
+ * tmplatCours attribute를 리턴한다.
+ *
+ * @return the tmplatCours
+ */
+ public String getTmplatCours() {
+ return tmplatCours;
+ }
+
+ /**
+ * tmplatCours attribute 값을 설정한다.
+ *
+ * @param tmplatCours
+ * the tmplatCours to set
+ */
+ public void setTmplatCours(String tmplatCours) {
+ this.tmplatCours = tmplatCours;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/BoardVO.java b/src/main/java/egovframework/com/cop/bbs/service/BoardVO.java
new file mode 100644
index 0000000..9bcb519
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/BoardVO.java
@@ -0,0 +1,675 @@
+package egovframework.com.cop.bbs.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 게시물 관리를 위한 VO 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.3.19 이삼섭 최초 생성
+ * 2009.06.29 한성곤 2단계 기능 추가 (댓글관리, 만족도조사)
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class BoardVO extends Board implements Serializable {
+
+ /** 검색시작일 */
+ private String searchBgnDe = "";
+
+ /** 검색조건 */
+ private String searchCnd = "";
+
+ /** 검색종료일 */
+ private String searchEndDe = "";
+
+ /** 검색단어 */
+ private String searchWrd = "";
+
+ /** 정렬순서(DESC,ASC) */
+ private long sortOrdr = 0L;
+
+ /** 검색사용여부 */
+ private String searchUseYn = "";
+
+ /** 현재페이지 */
+ private int pageIndex = 1;
+
+ /** 페이지갯수 */
+ private int pageUnit = 10;
+
+ /** 페이지사이즈 */
+ private int pageSize = 10;
+
+ /** 첫페이지 인덱스 */
+ private int firstIndex = 1;
+
+ /** 마지막페이지 인덱스 */
+ private int lastIndex = 1;
+
+ /** 페이지당 레코드 개수 */
+ private int recordCountPerPage = 10;
+
+ /** 레코드 번호 */
+ private int rowNo = 0;
+
+ /** 최초 등록자명 */
+ private String frstRegisterNm = "";
+
+ /** 최종 수정자명 */
+ private String lastUpdusrNm = "";
+
+ /** 유효여부 */
+ private String isExpired = "N";
+
+ /** 상위 정렬 순서 */
+ private String parntsSortOrdr = "";
+
+ /** 상위 답변 위치 */
+ private String parntsReplyLc = "";
+
+ /** 게시판 유형코드 */
+ private String bbsTyCode = "";
+
+ /** 게시판 속성코드 */
+ private String bbsAttrbCode = "";
+
+ /** 게시판 명 */
+ private String bbsNm = "";
+
+ /** 파일첨부가능여부 */
+ private String fileAtchPosblAt = "";
+
+ /** 첨부가능파일숫자 */
+ private int posblAtchFileNumber = 0;
+
+ /** 답장가능여부 */
+ private String replyPosblAt = "";
+
+ /** 조회 수 증가 여부 */
+ private boolean plusCount = false;
+
+ /** 익명등록 여부 */
+ private String anonymousAt = "";
+
+ /** 하위 페이지 인덱스 (댓글 및 만족도 조사 여부 확인용) */
+ private String subPageIndex = "";
+
+ /** 게시글 댓글갯수 */
+ private String commentCo = "";
+
+ /** 볼드체 여부 */
+ private String sjBoldAt;
+
+ /** 공지 여부 */
+ private String noticeAt;
+
+ /** 비밀글 여부 */
+ private String secretAt;
+
+ /**
+ * searchBgnDe attribute를 리턴한다.
+ *
+ * @return the searchBgnDe
+ */
+ public String getSearchBgnDe() {
+ return searchBgnDe;
+ }
+
+ /**
+ * searchBgnDe attribute 값을 설정한다.
+ *
+ * @param searchBgnDe
+ * the searchBgnDe to set
+ */
+ public void setSearchBgnDe(String searchBgnDe) {
+ this.searchBgnDe = searchBgnDe;
+ }
+
+ /**
+ * searchCnd attribute를 리턴한다.
+ *
+ * @return the searchCnd
+ */
+ public String getSearchCnd() {
+ return searchCnd;
+ }
+
+ /**
+ * searchCnd attribute 값을 설정한다.
+ *
+ * @param searchCnd
+ * the searchCnd to set
+ */
+ public void setSearchCnd(String searchCnd) {
+ this.searchCnd = searchCnd;
+ }
+
+ /**
+ * searchEndDe attribute를 리턴한다.
+ *
+ * @return the searchEndDe
+ */
+ public String getSearchEndDe() {
+ return searchEndDe;
+ }
+
+ /**
+ * searchEndDe attribute 값을 설정한다.
+ *
+ * @param searchEndDe
+ * the searchEndDe to set
+ */
+ public void setSearchEndDe(String searchEndDe) {
+ this.searchEndDe = searchEndDe;
+ }
+
+ /**
+ * searchWrd attribute를 리턴한다.
+ *
+ * @return the searchWrd
+ */
+ public String getSearchWrd() {
+ return searchWrd;
+ }
+
+ /**
+ * searchWrd attribute 값을 설정한다.
+ *
+ * @param searchWrd
+ * the searchWrd to set
+ */
+ public void setSearchWrd(String searchWrd) {
+ this.searchWrd = searchWrd;
+ }
+
+ /**
+ * sortOrdr attribute를 리턴한다.
+ *
+ * @return the sortOrdr
+ */
+ public long getSortOrdr() {
+ return sortOrdr;
+ }
+
+ /**
+ * sortOrdr attribute 값을 설정한다.
+ *
+ * @param sortOrdr
+ * the sortOrdr to set
+ */
+ public void setSortOrdr(long sortOrdr) {
+ this.sortOrdr = sortOrdr;
+ }
+
+ /**
+ * searchUseYn attribute를 리턴한다.
+ *
+ * @return the searchUseYn
+ */
+ public String getSearchUseYn() {
+ return searchUseYn;
+ }
+
+ /**
+ * searchUseYn attribute 값을 설정한다.
+ *
+ * @param searchUseYn
+ * the searchUseYn to set
+ */
+ public void setSearchUseYn(String searchUseYn) {
+ this.searchUseYn = searchUseYn;
+ }
+
+ /**
+ * pageIndex attribute를 리턴한다.
+ *
+ * @return the pageIndex
+ */
+ public int getPageIndex() {
+ return pageIndex;
+ }
+
+ /**
+ * pageIndex attribute 값을 설정한다.
+ *
+ * @param pageIndex
+ * the pageIndex to set
+ */
+ public void setPageIndex(int pageIndex) {
+ this.pageIndex = pageIndex;
+ }
+
+ /**
+ * pageUnit attribute를 리턴한다.
+ *
+ * @return the pageUnit
+ */
+ public int getPageUnit() {
+ return pageUnit;
+ }
+
+ /**
+ * pageUnit attribute 값을 설정한다.
+ *
+ * @param pageUnit
+ * the pageUnit to set
+ */
+ public void setPageUnit(int pageUnit) {
+ this.pageUnit = pageUnit;
+ }
+
+ /**
+ * pageSize attribute를 리턴한다.
+ *
+ * @return the pageSize
+ */
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ /**
+ * pageSize attribute 값을 설정한다.
+ *
+ * @param pageSize
+ * the pageSize to set
+ */
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ /**
+ * firstIndex attribute를 리턴한다.
+ *
+ * @return the firstIndex
+ */
+ public int getFirstIndex() {
+ return firstIndex;
+ }
+
+ /**
+ * firstIndex attribute 값을 설정한다.
+ *
+ * @param firstIndex
+ * the firstIndex to set
+ */
+ public void setFirstIndex(int firstIndex) {
+ this.firstIndex = firstIndex;
+ }
+
+ /**
+ * lastIndex attribute를 리턴한다.
+ *
+ * @return the lastIndex
+ */
+ public int getLastIndex() {
+ return lastIndex;
+ }
+
+ /**
+ * lastIndex attribute 값을 설정한다.
+ *
+ * @param lastIndex
+ * the lastIndex to set
+ */
+ public void setLastIndex(int lastIndex) {
+ this.lastIndex = lastIndex;
+ }
+
+ /**
+ * recordCountPerPage attribute를 리턴한다.
+ *
+ * @return the recordCountPerPage
+ */
+ public int getRecordCountPerPage() {
+ return recordCountPerPage;
+ }
+
+ /**
+ * recordCountPerPage attribute 값을 설정한다.
+ *
+ * @param recordCountPerPage
+ * the recordCountPerPage to set
+ */
+ public void setRecordCountPerPage(int recordCountPerPage) {
+ this.recordCountPerPage = recordCountPerPage;
+ }
+
+ /**
+ * rowNo attribute를 리턴한다.
+ *
+ * @return the rowNo
+ */
+ public int getRowNo() {
+ return rowNo;
+ }
+
+ /**
+ * rowNo attribute 값을 설정한다.
+ *
+ * @param rowNo
+ * the rowNo to set
+ */
+ public void setRowNo(int rowNo) {
+ this.rowNo = rowNo;
+ }
+
+ /**
+ * frstRegisterNm attribute를 리턴한다.
+ *
+ * @return the frstRegisterNm
+ */
+ public String getFrstRegisterNm() {
+ return frstRegisterNm;
+ }
+
+ /**
+ * frstRegisterNm attribute 값을 설정한다.
+ *
+ * @param frstRegisterNm
+ * the frstRegisterNm to set
+ */
+ public void setFrstRegisterNm(String frstRegisterNm) {
+ this.frstRegisterNm = frstRegisterNm;
+ }
+
+ /**
+ * lastUpdusrNm attribute를 리턴한다.
+ *
+ * @return the lastUpdusrNm
+ */
+ public String getLastUpdusrNm() {
+ return lastUpdusrNm;
+ }
+
+ /**
+ * lastUpdusrNm attribute 값을 설정한다.
+ *
+ * @param lastUpdusrNm
+ * the lastUpdusrNm to set
+ */
+ public void setLastUpdusrNm(String lastUpdusrNm) {
+ this.lastUpdusrNm = lastUpdusrNm;
+ }
+
+ /**
+ * isExpired attribute를 리턴한다.
+ *
+ * @return the isExpired
+ */
+ public String getIsExpired() {
+ return isExpired;
+ }
+
+ /**
+ * isExpired attribute 값을 설정한다.
+ *
+ * @param isExpired
+ * the isExpired to set
+ */
+ public void setIsExpired(String isExpired) {
+ this.isExpired = isExpired;
+ }
+
+ /**
+ * parntsSortOrdr attribute를 리턴한다.
+ *
+ * @return the parntsSortOrdr
+ */
+ public String getParntsSortOrdr() {
+ return parntsSortOrdr;
+ }
+
+ /**
+ * parntsSortOrdr attribute 값을 설정한다.
+ *
+ * @param parntsSortOrdr
+ * the parntsSortOrdr to set
+ */
+ public void setParntsSortOrdr(String parntsSortOrdr) {
+ this.parntsSortOrdr = parntsSortOrdr;
+ }
+
+ /**
+ * parntsReplyLc attribute를 리턴한다.
+ *
+ * @return the parntsReplyLc
+ */
+ public String getParntsReplyLc() {
+ return parntsReplyLc;
+ }
+
+ /**
+ * parntsReplyLc attribute 값을 설정한다.
+ *
+ * @param parntsReplyLc
+ * the parntsReplyLc to set
+ */
+ public void setParntsReplyLc(String parntsReplyLc) {
+ this.parntsReplyLc = parntsReplyLc;
+ }
+
+ /**
+ * bbsTyCode attribute를 리턴한다.
+ *
+ * @return the bbsTyCode
+ */
+ public String getBbsTyCode() {
+ return bbsTyCode;
+ }
+
+ /**
+ * bbsTyCode attribute 값을 설정한다.
+ *
+ * @param bbsTyCode
+ * the bbsTyCode to set
+ */
+ public void setBbsTyCode(String bbsTyCode) {
+ this.bbsTyCode = bbsTyCode;
+ }
+
+ /**
+ * bbsAttrbCode attribute를 리턴한다.
+ *
+ * @return the bbsAttrbCode
+ */
+ public String getBbsAttrbCode() {
+ return bbsAttrbCode;
+ }
+
+ /**
+ * bbsAttrbCode attribute 값을 설정한다.
+ *
+ * @param bbsAttrbCode
+ * the bbsAttrbCode to set
+ */
+ public void setBbsAttrbCode(String bbsAttrbCode) {
+ this.bbsAttrbCode = bbsAttrbCode;
+ }
+
+ /**
+ * bbsNm attribute를 리턴한다.
+ *
+ * @return the bbsNm
+ */
+ public String getBbsNm() {
+ return bbsNm;
+ }
+
+ /**
+ * bbsNm attribute 값을 설정한다.
+ *
+ * @param bbsNm
+ * the bbsNm to set
+ */
+ public void setBbsNm(String bbsNm) {
+ this.bbsNm = bbsNm;
+ }
+
+ /**
+ * fileAtchPosblAt attribute를 리턴한다.
+ *
+ * @return the fileAtchPosblAt
+ */
+ public String getFileAtchPosblAt() {
+ return fileAtchPosblAt;
+ }
+
+ /**
+ * fileAtchPosblAt attribute 값을 설정한다.
+ *
+ * @param fileAtchPosblAt
+ * the fileAtchPosblAt to set
+ */
+ public void setFileAtchPosblAt(String fileAtchPosblAt) {
+ this.fileAtchPosblAt = fileAtchPosblAt;
+ }
+
+ /**
+ * posblAtchFileNumber attribute를 리턴한다.
+ *
+ * @return the posblAtchFileNumber
+ */
+ public int getPosblAtchFileNumber() {
+ return posblAtchFileNumber;
+ }
+
+ /**
+ * posblAtchFileNumber attribute 값을 설정한다.
+ *
+ * @param posblAtchFileNumber
+ * the posblAtchFileNumber to set
+ */
+ public void setPosblAtchFileNumber(int posblAtchFileNumber) {
+ this.posblAtchFileNumber = posblAtchFileNumber;
+ }
+
+ /**
+ * replyPosblAt attribute를 리턴한다.
+ *
+ * @return the replyPosblAt
+ */
+ public String getReplyPosblAt() {
+ return replyPosblAt;
+ }
+
+ /**
+ * replyPosblAt attribute 값을 설정한다.
+ *
+ * @param replyPosblAt
+ * the replyPosblAt to set
+ */
+ public void setReplyPosblAt(String replyPosblAt) {
+ this.replyPosblAt = replyPosblAt;
+ }
+
+ /**
+ * plusCount attribute를 리턴한다.
+ * @return the plusCount
+ */
+ public boolean isPlusCount() {
+ return plusCount;
+ }
+
+ /**
+ * plusCount attribute 값을 설정한다.
+ * @param plusCount the plusCount to set
+ */
+ public void setPlusCount(boolean plusCount) {
+ this.plusCount = plusCount;
+ }
+
+ /**
+ * subPageIndex attribute를 리턴한다.
+ * @return the subPageIndex
+ */
+ public String getSubPageIndex() {
+ return subPageIndex;
+ }
+
+ /**
+ * subPageIndex attribute 값을 설정한다.
+ * @param subPageIndex the subPageIndex to set
+ */
+ public void setSubPageIndex(String subPageIndex) {
+ this.subPageIndex = subPageIndex;
+ }
+
+ /**
+ * anonymousAt attribute를 리턴한다.
+ * @return the anonymousAt
+ */
+ public String getAnonymousAt() {
+ return anonymousAt;
+ }
+
+ /**
+ * anonymousAt attribute 값을 설정한다.
+ * @param anonymousAt the anonymousAt to set
+ */
+ public void setAnonymousAt(String anonymousAt) {
+ this.anonymousAt = anonymousAt;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+
+ /**
+ * commentCo attribute를 리턴한다.
+ * @return the commentCo
+ */
+ public String getCommentCo() {
+ return commentCo;
+ }
+
+
+ /**
+ * commentCo attribute 값을 설정한다.
+ * @param commentCo the commentCo to set
+ */
+
+ public void setCommentCo(String commentCo) {
+ this.commentCo = commentCo;
+ }
+
+ public String getSjBoldAt() {
+ return sjBoldAt;
+ }
+
+ public void setSjBoldAt(String sjBoldAt) {
+ this.sjBoldAt = sjBoldAt;
+ }
+
+ public String getNoticeAt() {
+ return noticeAt;
+ }
+
+ public void setNoticeAt(String noticeAt) {
+ this.noticeAt = noticeAt;
+ }
+
+ public String getSecretAt() {
+ return secretAt;
+ }
+
+ public void setSecretAt(String secretAt) {
+ this.secretAt = secretAt;
+ }
+
+
+
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/EgovArticleService.java b/src/main/java/egovframework/com/cop/bbs/service/EgovArticleService.java
new file mode 100644
index 0000000..d5b9dea
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/EgovArticleService.java
@@ -0,0 +1,40 @@
+package egovframework.com.cop.bbs.service;
+
+import java.util.List;
+import java.util.Map;
+
+import org.egovframe.rte.fdl.cmmn.exception.FdlException;
+
+public interface EgovArticleService {
+
+ Map selectArticleList(BoardVO boardVO);
+
+ BoardVO selectArticleDetail(BoardVO boardVO);
+
+ void insertArticle(Board board) throws FdlException;
+
+ void updateArticle(Board board);
+
+ void deleteArticle(Board board) throws Exception;
+
+ List selectNoticeArticleList(BoardVO boardVO);
+
+ Map selectGuestArticleList(BoardVO vo);
+
+ /*
+ * 블로그 관련
+ */
+ BoardVO selectArticleCnOne(BoardVO boardVO);
+
+ List selectBlogNmList(BoardVO boardVO);
+
+ Map selectBlogListManager(BoardVO boardVO);
+
+ List selectArticleDetailDefault(BoardVO boardVO);
+
+ int selectArticleDetailDefaultCnt(BoardVO boardVO);
+
+ List selectArticleDetailCn(BoardVO boardVO);
+
+ int selectLoginUser(BoardVO boardVO);
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/EgovBBSMasterService.java b/src/main/java/egovframework/com/cop/bbs/service/EgovBBSMasterService.java
new file mode 100644
index 0000000..4e39612
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/EgovBBSMasterService.java
@@ -0,0 +1,44 @@
+package egovframework.com.cop.bbs.service;
+
+import java.util.List;
+import java.util.Map;
+
+import egovframework.com.cop.bbs.service.BlogUser;
+import egovframework.com.cop.bbs.service.BlogVO;
+import egovframework.com.cop.bbs.service.Blog;
+import org.egovframe.rte.fdl.cmmn.exception.FdlException;
+
+public interface EgovBBSMasterService {
+
+ Map selectNotUsedBdMstrList(BoardMasterVO boardMasterVO);
+
+ void deleteBBSMasterInf(BoardMaster boardMaster);
+
+ void updateBBSMasterInf(BoardMaster boardMaster) throws Exception;
+
+ BoardMasterVO selectBBSMasterInf(BoardMasterVO boardMasterVO) throws Exception;
+
+ Map selectBBSMasterInfs(BoardMasterVO boardMasterVO);
+
+ void insertBBSMasterInf(BoardMaster boardMaster) throws Exception;
+
+ /*
+ * 블로그 관련
+ */
+ Map selectBlogMasterInfs(BoardMasterVO boardMasterVO);
+
+ String checkBlogUser(BlogVO blogVO);
+
+ BlogVO checkBlogUser2(BlogVO blogVO);
+
+ void insertBoardBlogUserRqst(BlogUser blogUser);
+
+ void insertBlogMaster(Blog blog) throws FdlException;
+
+ BlogVO selectBlogDetail(BlogVO blogVO) throws Exception;
+
+ List selectBlogListPortlet(BlogVO blogVO) throws Exception;
+
+ List selectBBSListPortlet(BoardMasterVO boardMasterVO) throws Exception;
+
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/EgovBBSSatisfactionService.java b/src/main/java/egovframework/com/cop/bbs/service/EgovBBSSatisfactionService.java
new file mode 100644
index 0000000..dbbb3fa
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/EgovBBSSatisfactionService.java
@@ -0,0 +1,81 @@
+package egovframework.com.cop.bbs.service;
+
+import java.util.Map;
+
+/**
+ * 만족도조사를 위한 서비스 인터페이스 클래스
+ * @author 공통컴포넌트개발팀 한성곤
+ * @since 2009.06.29
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.06.29 한성곤 최초 생성
+ *
+ *
+ */
+public interface EgovBBSSatisfactionService {
+ /**
+ * 만족도조사 사용 가능 여부를 확인한다.
+ *
+ * @param bbsId
+ * @return
+ * @throws Exception
+ */
+ public boolean canUseSatisfaction(String bbsId) throws Exception;
+
+ /**
+ * 만족도조사에 대한 목록을 조회 한다.
+ *
+ * @param satisfactionVO
+ * @return
+ * @throws Exception
+ */
+ public Map selectSatisfactionList(SatisfactionVO satisfactionVO) throws Exception;
+
+ /**
+ * 만족도조사를 등록한다.
+ *
+ * @param satisfaction
+ * @throws Exception
+ */
+ public void insertSatisfaction(Satisfaction satisfaction) throws Exception;
+
+ /**
+ * 만족도조사를 삭제한다.
+ *
+ * @param satisfactionVO
+ * @throws Exception
+ */
+ public void deleteSatisfaction(SatisfactionVO satisfactionVO) throws Exception;
+
+ /**
+ * 만족도조사에 대한 내용을 조회한다.
+ *
+ * @param satisfactionVO
+ * @return
+ * @throws Exception
+ */
+ public Satisfaction selectSatisfaction(SatisfactionVO satisfactionVO) throws Exception;
+
+ /**
+ * 만족도조사에 대한 내용을 수정한다.
+ *
+ * @param satisfaction
+ * @throws Exception
+ */
+ public void updateSatisfaction(Satisfaction satisfaction) throws Exception;
+
+ /**
+ * 만족도조사 패스워드를 가져온다.
+ *
+ * @param satisfaction
+ * @return
+ * @throws Exception
+ */
+ public String getSatisfactionPassword(Satisfaction satisfaction) throws Exception;
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/Satisfaction.java b/src/main/java/egovframework/com/cop/bbs/service/Satisfaction.java
new file mode 100644
index 0000000..fa5d7f4
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/Satisfaction.java
@@ -0,0 +1,316 @@
+package egovframework.com.cop.bbs.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 만족도조사 서비스 데이터 처리 모델
+ * @author 공통컴포넌트개발팀 한성곤
+ * @since 2009.06.29
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.06.29 한성곤 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class Satisfaction implements Serializable {
+ /** 만족도 번호 */
+ private String stsfdgNo = "";
+
+ /** 게시판 ID */
+ private String bbsId = "";
+
+ /** 게시물 번호 */
+ private long nttId = 0L;
+
+ /** 작성자 ID */
+ private String wrterId = "";
+
+ /** 작성자명 */
+ private String wrterNm = "";
+
+ /** 패스워드 */
+ private String stsfdgPassword = "";
+
+ /** 만족도 내용 */
+ private String stsfdgCn = "";
+
+ /** 만족도 */
+ private int stsfdg = 0;
+
+ /** 사용 여부 */
+ private String useAt = "";
+
+ /** 최초등록자 아이디 */
+ private String frstRegisterId = "";
+
+ /** 최초 등록자명 */
+ private String frstRegisterNm = "";
+
+ /** 최초등록시점 */
+ private String frstRegisterPnttm = "";
+
+ /** 최종수정자 아이디 */
+ private String lastUpdusrId = "";
+
+ /** 최종수정시점 */
+ private String lastUpdusrPnttm = "";
+
+ /** 확인 패스워드 */
+ private String confirmPassword = "";
+
+ /**
+ * stsfdgNo attribute를 리턴한다.
+ * @return the stsfdgNo
+ */
+ public String getStsfdgNo() {
+ return stsfdgNo;
+ }
+
+ /**
+ * stsfdgNo attribute 값을 설정한다.
+ * @param stsfdgNo the stsfdgNo to set
+ */
+ public void setStsfdgNo(String stsfdgNo) {
+ this.stsfdgNo = stsfdgNo;
+ }
+
+ /**
+ * bbsId attribute를 리턴한다.
+ * @return the bbsId
+ */
+ public String getBbsId() {
+ return bbsId;
+ }
+
+ /**
+ * bbsId attribute 값을 설정한다.
+ * @param bbsId the bbsId to set
+ */
+ public void setBbsId(String bbsId) {
+ this.bbsId = bbsId;
+ }
+
+ /**
+ * nttId attribute를 리턴한다.
+ * @return the nttId
+ */
+ public long getNttId() {
+ return nttId;
+ }
+
+ /**
+ * nttId attribute 값을 설정한다.
+ * @param nttId the nttId to set
+ */
+ public void setNttId(long nttId) {
+ this.nttId = nttId;
+ }
+
+ /**
+ * wrterId attribute를 리턴한다.
+ * @return the wrterId
+ */
+ public String getWrterId() {
+ return wrterId;
+ }
+
+ /**
+ * wrterId attribute 값을 설정한다.
+ * @param wrterId the wrterId to set
+ */
+ public void setWrterId(String wrterId) {
+ this.wrterId = wrterId;
+ }
+
+ /**
+ * wrterNm attribute를 리턴한다.
+ * @return the wrterNm
+ */
+ public String getWrterNm() {
+ return wrterNm;
+ }
+
+ /**
+ * wrterNm attribute 값을 설정한다.
+ * @param wrterNm the wrterNm to set
+ */
+ public void setWrterNm(String wrterNm) {
+ this.wrterNm = wrterNm;
+ }
+
+ /**
+ * stsfdgPassword attribute를 리턴한다.
+ * @return the stsfdgPassword
+ */
+ public String getStsfdgPassword() {
+ return stsfdgPassword;
+ }
+
+ /**
+ * stsfdgPassword attribute 값을 설정한다.
+ * @param stsfdgPassword the stsfdgPassword to set
+ */
+ public void setStsfdgPassword(String stsfdgPassword) {
+ this.stsfdgPassword = stsfdgPassword;
+ }
+
+ /**
+ * stsfdgCn attribute를 리턴한다.
+ * @return the stsfdgCn
+ */
+ public String getStsfdgCn() {
+ return stsfdgCn;
+ }
+
+ /**
+ * stsfdgCn attribute 값을 설정한다.
+ * @param stsfdgCn the stsfdgCn to set
+ */
+ public void setStsfdgCn(String stsfdgCn) {
+ this.stsfdgCn = stsfdgCn;
+ }
+
+ /**
+ * stsfdg attribute를 리턴한다.
+ * @return the stsfdg
+ */
+ public int getStsfdg() {
+ return stsfdg;
+ }
+
+ /**
+ * stsfdg attribute 값을 설정한다.
+ * @param stsfdg the stsfdg to set
+ */
+ public void setStsfdg(int stsfdg) {
+ this.stsfdg = stsfdg;
+ }
+
+ /**
+ * useAt attribute를 리턴한다.
+ * @return the useAt
+ */
+ public String getUseAt() {
+ return useAt;
+ }
+
+ /**
+ * useAt attribute 값을 설정한다.
+ * @param useAt the useAt to set
+ */
+ public void setUseAt(String useAt) {
+ this.useAt = useAt;
+ }
+
+ /**
+ * frstRegisterId attribute를 리턴한다.
+ * @return the frstRegisterId
+ */
+ public String getFrstRegisterId() {
+ return frstRegisterId;
+ }
+
+ /**
+ * frstRegisterId attribute 값을 설정한다.
+ * @param frstRegisterId the frstRegisterId to set
+ */
+ public void setFrstRegisterId(String frstRegisterId) {
+ this.frstRegisterId = frstRegisterId;
+ }
+
+ /**
+ * frstRegisterNm attribute를 리턴한다.
+ * @return the frstRegisterNm
+ */
+ public String getFrstRegisterNm() {
+ return frstRegisterNm;
+ }
+
+ /**
+ * frstRegisterNm attribute 값을 설정한다.
+ * @param frstRegisterNm the frstRegisterNm to set
+ */
+ public void setFrstRegisterNm(String frstRegisterNm) {
+ this.frstRegisterNm = frstRegisterNm;
+ }
+
+ /**
+ * frstRegisterPnttm attribute를 리턴한다.
+ * @return the frstRegisterPnttm
+ */
+ public String getFrstRegisterPnttm() {
+ return frstRegisterPnttm;
+ }
+
+ /**
+ * frstRegisterPnttm attribute 값을 설정한다.
+ * @param frstRegisterPnttm the frstRegisterPnttm to set
+ */
+ public void setFrstRegisterPnttm(String frstRegisterPnttm) {
+ this.frstRegisterPnttm = frstRegisterPnttm;
+ }
+
+ /**
+ * lastUpdusrId attribute를 리턴한다.
+ * @return the lastUpdusrId
+ */
+ public String getLastUpdusrId() {
+ return lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrId attribute 값을 설정한다.
+ * @param lastUpdusrId the lastUpdusrId to set
+ */
+ public void setLastUpdusrId(String lastUpdusrId) {
+ this.lastUpdusrId = lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute를 리턴한다.
+ * @return the lastUpdusrPnttm
+ */
+ public String getLastUpdusrPnttm() {
+ return lastUpdusrPnttm;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute 값을 설정한다.
+ * @param lastUpdusrPnttm the lastUpdusrPnttm to set
+ */
+ public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
+ this.lastUpdusrPnttm = lastUpdusrPnttm;
+ }
+
+ /**
+ * confirmPassword attribute를 리턴한다.
+ * @return the confirmPassword
+ */
+ public String getConfirmPassword() {
+ return confirmPassword;
+ }
+
+ /**
+ * confirmPassword attribute 값을 설정한다.
+ * @param confirmPassword the confirmPassword to set
+ */
+ public void setConfirmPassword(String confirmPassword) {
+ this.confirmPassword = confirmPassword;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/SatisfactionVO.java b/src/main/java/egovframework/com/cop/bbs/service/SatisfactionVO.java
new file mode 100644
index 0000000..63eafc2
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/SatisfactionVO.java
@@ -0,0 +1,219 @@
+package egovframework.com.cop.bbs.service;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 만족도조사 서비스를 위한 VO 클래스
+ * @author 공통컴포넌트개발팀 한성곤
+ * @since 2009.06.29
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.06.29 한성곤 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class SatisfactionVO extends Satisfaction {
+ /** 정렬순서(DESC,ASC) */
+ private long sortOrdr = 0L;
+
+ /** 현재페이지 */
+ private int subPageIndex = 1;
+
+ /** 페이지갯수 */
+ private int subPageUnit = 10;
+
+ /** 페이지사이즈 */
+ private int subPageSize = 10;
+
+ /** 첫페이지 인덱스 */
+ private int subFirstIndex = 1;
+
+ /** 마지막페이지 인덱스 */
+ private int subLastIndex = 1;
+
+ /** 페이지당 레코드 개수 */
+ private int subRecordCountPerPage = 10;
+
+ /** 레코드 번호 */
+ private int subRowNo = 0;
+
+ /** 호출 TYPE (head or body)*/
+ private String type = "";
+
+ /** 수정 처리 여부 */
+ private boolean isModified = false;
+
+ /**
+ * sortOrdr attribute를 리턴한다.
+ * @return the sortOrdr
+ */
+ public long getSortOrdr() {
+ return sortOrdr;
+ }
+
+ /**
+ * sortOrdr attribute 값을 설정한다.
+ * @param sortOrdr the sortOrdr to set
+ */
+ public void setSortOrdr(long sortOrdr) {
+ this.sortOrdr = sortOrdr;
+ }
+
+ /**
+ * subPageIndex attribute를 리턴한다.
+ * @return the subPageIndex
+ */
+ public int getSubPageIndex() {
+ return subPageIndex;
+ }
+
+ /**
+ * subPageIndex attribute 값을 설정한다.
+ * @param subPageIndex the subPageIndex to set
+ */
+ public void setSubPageIndex(int subPageIndex) {
+ this.subPageIndex = subPageIndex;
+ }
+
+ /**
+ * subPageUnit attribute를 리턴한다.
+ * @return the subPageUnit
+ */
+ public int getSubPageUnit() {
+ return subPageUnit;
+ }
+
+ /**
+ * subPageUnit attribute 값을 설정한다.
+ * @param subPageUnit the subPageUnit to set
+ */
+ public void setSubPageUnit(int subPageUnit) {
+ this.subPageUnit = subPageUnit;
+ }
+
+ /**
+ * subPageSize attribute를 리턴한다.
+ * @return the subPageSize
+ */
+ public int getSubPageSize() {
+ return subPageSize;
+ }
+
+ /**
+ * subPageSize attribute 값을 설정한다.
+ * @param subPageSize the subPageSize to set
+ */
+ public void setSubPageSize(int subPageSize) {
+ this.subPageSize = subPageSize;
+ }
+
+ /**
+ * subFirstIndex attribute를 리턴한다.
+ * @return the subFirstIndex
+ */
+ public int getSubFirstIndex() {
+ return subFirstIndex;
+ }
+
+ /**
+ * subFirstIndex attribute 값을 설정한다.
+ * @param subFirstIndex the subFirstIndex to set
+ */
+ public void setSubFirstIndex(int subFirstIndex) {
+ this.subFirstIndex = subFirstIndex;
+ }
+
+ /**
+ * subLastIndex attribute를 리턴한다.
+ * @return the subLastIndex
+ */
+ public int getSubLastIndex() {
+ return subLastIndex;
+ }
+
+ /**
+ * subLastIndex attribute 값을 설정한다.
+ * @param subLastIndex the subLastIndex to set
+ */
+ public void setSubLastIndex(int subLastIndex) {
+ this.subLastIndex = subLastIndex;
+ }
+
+ /**
+ * subRecordCountPerPage attribute를 리턴한다.
+ * @return the subRecordCountPerPage
+ */
+ public int getSubRecordCountPerPage() {
+ return subRecordCountPerPage;
+ }
+
+ /**
+ * subRecordCountPerPage attribute 값을 설정한다.
+ * @param subRecordCountPerPage the subRecordCountPerPage to set
+ */
+ public void setSubRecordCountPerPage(int subRecordCountPerPage) {
+ this.subRecordCountPerPage = subRecordCountPerPage;
+ }
+
+ /**
+ * subRowNo attribute를 리턴한다.
+ * @return the subRowNo
+ */
+ public int getSubRowNo() {
+ return subRowNo;
+ }
+
+ /**
+ * subRowNo attribute 값을 설정한다.
+ * @param subRowNo the subRowNo to set
+ */
+ public void setSubRowNo(int subRowNo) {
+ this.subRowNo = subRowNo;
+ }
+
+ /**
+ * type attribute를 리턴한다.
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * type attribute 값을 설정한다.
+ * @param type the type to set
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * isModified attribute를 리턴한다.
+ * @return the isModified
+ */
+ public boolean isModified() {
+ return isModified;
+ }
+
+ /**
+ * isModified attribute 값을 설정한다.
+ * @param isModified the isModified to set
+ */
+ public void setModified(boolean isModified) {
+ this.isModified = isModified;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/impl/BBSAddedOptionsDAO.java b/src/main/java/egovframework/com/cop/bbs/service/impl/BBSAddedOptionsDAO.java
new file mode 100644
index 0000000..8be3b71
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/impl/BBSAddedOptionsDAO.java
@@ -0,0 +1,54 @@
+package egovframework.com.cop.bbs.service.impl;
+
+import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
+import egovframework.com.cop.bbs.service.BoardMaster;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+
+import org.springframework.stereotype.Repository;
+
+/**
+ * 2단계 기능 추가 (댓글관리, 만족도조사) 관리를 위한 데이터 접근 클래스
+ * @author 공통컴포넌트개발팀 한성곤
+ * @since 2009.06.26
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.06.26 한성곤 최초 생성
+ *
+ *
+ */
+@Repository("BBSAddedOptionsDAO")
+public class BBSAddedOptionsDAO extends EgovComAbstractDAO {
+
+ /**
+ * 신규 게시판 추가기능 정보를 등록한다.
+ *
+ * @param BoardMaster
+ */
+ public String insertAddedOptionsInf(BoardMaster boardMaster) throws Exception {
+ return Integer.toString(insert("BBSAddedOptions.insertAddedOptionsInf", boardMaster));
+ }
+
+ /**
+ * 게시판 추가기능 정보 한 건을 상세조회 한다.
+ *
+ * @param BoardMasterVO
+ */
+ public BoardMasterVO selectAddedOptionsInf(BoardMaster vo) throws Exception {
+ return (BoardMasterVO)selectOne("BBSAddedOptions.selectAddedOptionsInf", vo);
+ }
+
+ /**
+ * 게시판 추가기능 정보를 수정한다.
+ *
+ * @param BoardMaster
+ */
+ public void updateAddedOptionsInf(BoardMaster boardMaster) throws Exception {
+ update("BBSAddedOptions.updateAddedOptionsInf", boardMaster);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/impl/EgovArticleDAO.java b/src/main/java/egovframework/com/cop/bbs/service/impl/EgovArticleDAO.java
new file mode 100644
index 0000000..35db476
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/impl/EgovArticleDAO.java
@@ -0,0 +1,100 @@
+package egovframework.com.cop.bbs.service.impl;
+
+import java.util.List;
+
+import org.springframework.stereotype.Repository;
+
+import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
+import egovframework.com.cop.bbs.service.Board;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.bbs.service.BoardVO;
+
+@Repository("EgovArticleDAO")
+public class EgovArticleDAO extends EgovComAbstractDAO {
+
+ public List> selectArticleList(BoardVO boardVO) {
+ return list("BBSArticle.selectArticleList", boardVO);
+ }
+
+ public int selectArticleListCnt(BoardVO boardVO) {
+ return (Integer)selectOne("BBSArticle.selectArticleListCnt", boardVO);
+ }
+
+ public int selectMaxInqireCo(BoardVO boardVO) {
+ return (Integer)selectOne("BBSArticle.selectMaxInqireCo", boardVO);
+ }
+
+ public void updateInqireCo(BoardVO boardVO) {
+ update("BBSArticle.updateInqireCo", boardVO);
+ }
+
+ public BoardVO selectArticleDetail(BoardVO boardVO) {
+ return (BoardVO) selectOne("BBSArticle.selectArticleDetail", boardVO);
+ }
+
+ public void replyArticle(Board board) {
+ insert("BBSArticle.replyArticle", board);
+ }
+
+ public void insertArticle(Board board) {
+ insert("BBSArticle.insertArticle", board);
+ }
+
+ public void updateArticle(Board board) {
+ update("BBSArticle.updateArticle", board);
+ }
+
+ public void deleteArticle(Board board) {
+ update("BBSArticle.deleteArticle", board);
+
+ }
+
+ public List selectNoticeArticleList(BoardVO boardVO) {
+ return (List) list("BBSArticle.selectNoticeArticleList", boardVO);
+ }
+
+ public List> selectGuestArticleList(BoardVO vo) {
+ return list("BBSArticle.selectGuestArticleList", vo);
+ }
+
+ public int selectGuestArticleListCnt(BoardVO vo) {
+ return (Integer)selectOne("BBSArticle.selectGuestArticleListCnt", vo);
+ }
+
+ /*
+ * 블로그 관련
+ */
+ public BoardVO selectArticleCnOne(BoardVO boardVO) {
+ return (BoardVO) selectOne("BBSArticle.selectArticleCnOne", boardVO);
+ }
+
+ public List selectBlogNmList(BoardVO boardVO) {
+ return (List) list("BBSArticle.selectBlogNmList", boardVO);
+ }
+
+ public List> selectBlogListManager(BoardVO vo) {
+ return list("BBSArticle.selectBlogListManager", vo);
+ }
+
+ public int selectBlogListManagerCnt(BoardVO vo) {
+ return (Integer)selectOne("BBSArticle.selectBlogListManagerCnt", vo);
+ }
+
+ public List selectArticleDetailDefault(BoardVO boardVO) {
+ return (List) list("BBSArticle.selectArticleDetailDefault", boardVO);
+ }
+
+ public int selectArticleDetailDefaultCnt(BoardVO boardVO) {
+ return (Integer)selectOne("BBSArticle.selectArticleDetailDefaultCnt", boardVO);
+ }
+
+ public List selectArticleDetailCn(BoardVO boardVO) {
+ return (List) list("BBSArticle.selectArticleDetailCn", boardVO);
+ }
+
+ public int selectLoginUser(BoardVO boardVO) {
+ return (Integer)selectOne("BBSArticle.selectLoginUser", boardVO);
+ }
+
+
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/impl/EgovArticleServiceImpl.java b/src/main/java/egovframework/com/cop/bbs/service/impl/EgovArticleServiceImpl.java
new file mode 100644
index 0000000..50bda59
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/impl/EgovArticleServiceImpl.java
@@ -0,0 +1,166 @@
+package egovframework.com.cop.bbs.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+import egovframework.com.cmm.service.EgovFileMngService;
+import egovframework.com.cmm.service.FileVO;
+import egovframework.com.cop.bbs.service.Board;
+import egovframework.com.cop.bbs.service.BoardVO;
+import egovframework.com.cop.bbs.service.EgovArticleService;
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import org.egovframe.rte.fdl.cmmn.exception.FdlException;
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+import org.egovframe.rte.fdl.property.EgovPropertyService;
+
+@Service("EgovArticleService")
+public class EgovArticleServiceImpl extends EgovAbstractServiceImpl implements EgovArticleService {
+
+ @Resource(name = "EgovArticleDAO")
+ private EgovArticleDAO egovArticleDao;
+
+ @Resource(name = "EgovFileMngService")
+ private EgovFileMngService fileService;
+
+ @Resource(name = "propertiesService")
+ protected EgovPropertyService propertyService;
+
+ @Resource(name = "egovNttIdGnrService")
+ private EgovIdGnrService nttIdgenService;
+
+ @Override
+ public Map selectArticleList(BoardVO boardVO) {
+ List> list = egovArticleDao.selectArticleList(boardVO);
+
+
+ int cnt = egovArticleDao.selectArticleListCnt(boardVO);
+
+ Map map = new HashMap();
+
+ map.put("resultList", list);
+ map.put("resultCnt", Integer.toString(cnt));
+
+ return map;
+ }
+
+ @Override
+ public BoardVO selectArticleDetail(BoardVO boardVO) {
+ int iniqireCo = egovArticleDao.selectMaxInqireCo(boardVO);
+
+ boardVO.setInqireCo(iniqireCo);
+ egovArticleDao.updateInqireCo(boardVO);
+
+ return egovArticleDao.selectArticleDetail(boardVO);
+ }
+
+ @Override
+ public BoardVO selectArticleCnOne(BoardVO boardVO) {
+ return egovArticleDao.selectArticleCnOne(boardVO);
+ }
+
+ @Override
+ public List selectArticleDetailDefault(BoardVO boardVO) {
+ return egovArticleDao.selectArticleDetailDefault(boardVO);
+ }
+
+ @Override
+ public int selectArticleDetailDefaultCnt(BoardVO boardVO){
+ return egovArticleDao.selectArticleDetailDefaultCnt(boardVO);
+ }
+
+ @Override
+ public List selectArticleDetailCn(BoardVO boardVO) {
+ return egovArticleDao.selectArticleDetailCn(boardVO);
+ }
+
+ @Override
+ public void insertArticle(Board board) throws FdlException {
+
+ if ("Y".equals(board.getReplyAt())) {
+ // 답글인 경우 1. Parnts를 세팅, 2.Parnts의 sortOrdr을 현재글의 sortOrdr로 가져오도록, 3.nttNo는 현재 게시판의 순서대로
+ // replyLc는 부모글의 ReplyLc + 1
+
+ board.setNttId(nttIdgenService.getNextIntegerId()); // 답글에 대한 nttId 생성
+ egovArticleDao.replyArticle(board);
+
+ } else {
+ // 답글이 아닌경우 Parnts = 0, replyLc는 = 0, sortOrdr = nttNo(Query에서 처리)
+ board.setParnts("0");
+ board.setReplyLc("0");
+ board.setReplyAt("N");
+ board.setNttId(nttIdgenService.getNextIntegerId());//2011.09.22
+
+ egovArticleDao.insertArticle(board);
+ }
+ }
+
+ @Override
+ public void updateArticle(Board board) {
+ egovArticleDao.updateArticle(board);
+ }
+
+ @Override
+ public void deleteArticle(Board board) throws Exception {
+ FileVO fvo = new FileVO();
+
+ fvo.setAtchFileId(board.getAtchFileId());
+
+ board.setNttSj("이 글은 작성자에 의해서 삭제되었습니다.");
+
+ egovArticleDao.deleteArticle(board);
+
+ if (!"".equals(fvo.getAtchFileId()) || fvo.getAtchFileId() != null) {
+ fileService.deleteAllFileInf(fvo);
+ }
+
+ }
+
+ @Override
+ public List selectNoticeArticleList(BoardVO boardVO) {
+ return egovArticleDao.selectNoticeArticleList(boardVO);
+ }
+
+ @Override
+ public List selectBlogNmList(BoardVO boardVO) {
+ return egovArticleDao.selectBlogNmList(boardVO);
+ }
+
+ @Override
+ public Map selectGuestArticleList(BoardVO vo) {
+ List> list = egovArticleDao.selectGuestArticleList(vo);
+
+
+ int cnt = egovArticleDao.selectGuestArticleListCnt(vo);
+
+ Map map = new HashMap();
+
+ map.put("resultList", list);
+ map.put("resultCnt", Integer.toString(cnt));
+
+ return map;
+ }
+
+ @Override
+ public int selectLoginUser(BoardVO boardVO){
+ return egovArticleDao.selectLoginUser(boardVO);
+ }
+
+ @Override
+ public Map selectBlogListManager(BoardVO vo) {
+ List> result = egovArticleDao.selectBlogListManager(vo);
+ int cnt = egovArticleDao.selectBlogListManagerCnt(vo);
+
+ Map map = new HashMap();
+
+ map.put("resultList", result);
+ map.put("resultCnt", Integer.toString(cnt));
+
+ return map;
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/impl/EgovBBSMasterDAO.java b/src/main/java/egovframework/com/cop/bbs/service/impl/EgovBBSMasterDAO.java
new file mode 100644
index 0000000..57fa644
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/impl/EgovBBSMasterDAO.java
@@ -0,0 +1,80 @@
+package egovframework.com.cop.bbs.service.impl;
+
+import java.util.List;
+
+import org.springframework.stereotype.Repository;
+
+import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
+import egovframework.com.cop.bbs.service.BoardMaster;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.cmy.service.CommunityVO;
+import egovframework.com.cop.bbs.service.BlogVO;
+import egovframework.com.cop.bbs.service.Blog;
+import egovframework.com.cop.bbs.service.BlogUser;
+
+@Repository("EgovBBSMasterDAO")
+public class EgovBBSMasterDAO extends EgovComAbstractDAO {
+
+ public List> selectBBSMasterInfs(BoardMasterVO boardMasterVO) {
+ return list("BBSMaster.selectBBSMasterList", boardMasterVO);
+ }
+
+ public int selectBBSMasterInfsCnt(BoardMasterVO boardMasterVO) {
+ return (Integer)selectOne("BBSMaster.selectBBSMasterListTotCnt", boardMasterVO);
+ }
+
+ public BoardMasterVO selectBBSMasterDetail(BoardMasterVO boardMasterVO) {
+ return (BoardMasterVO) selectOne("BBSMaster.selectBBSMasterDetail", boardMasterVO);
+ }
+
+ public void insertBBSMasterInf(BoardMaster boardMaster) {
+ insert("BBSMaster.insertBBSMaster", boardMaster);
+ }
+
+ public void updateBBSMaster(BoardMaster boardMaster) {
+ update("BBSMaster.updateBBSMaster", boardMaster);
+ }
+
+ public void deleteBBSMaster(BoardMaster boardMaster) {
+ update("BBSMaster.deleteBBSMaster", boardMaster);
+ }
+
+ /*
+ * 블로그 관련
+ */
+ public List> selectBlogMasterInfs(BoardMasterVO boardMasterVO) {
+ return list("BBSMaster.selectBlogMasterList", boardMasterVO);
+ }
+
+ public int selectBlogMasterInfsCnt(BoardMasterVO boardMasterVO) {
+ return (Integer)selectOne("BBSMaster.selectBlogMasterListTotCnt", boardMasterVO);
+ }
+
+ public int checkExistUser(BlogVO blogVO) {
+ return (Integer)selectOne("BBSMaster.checkExistUser", blogVO);
+ }
+
+ public BlogVO checkExistUser2(BlogVO blogVO) {
+ return (BlogVO) selectOne("BBSMaster.checkExistUser2", blogVO);
+ }
+
+ public void insertBoardBlogUserRqst(BlogUser blogUser) {
+ insert("BBSMaster.insertBoardBlogUserRqst", blogUser);
+ }
+
+ public void insertBlogMaster(Blog blog) {
+ insert("BBSMaster.insertBlogMaster", blog);
+ }
+
+ public BlogVO selectBlogDetail(BlogVO blogVO) {
+ return (BlogVO) selectOne("BBSMaster.selectBlogDetail", blogVO);
+ }
+
+ public List selectBlogListPortlet(BlogVO blogVO) throws Exception{
+ return (List) list("BBSMaster.selectBlogListPortlet", blogVO);
+ }
+
+ public List selectBBSListPortlet(BoardMasterVO boardMasterVO) {
+ return (List) list("BBSMaster.selectBBSListPortlet", boardMasterVO);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/service/impl/EgovBBSMasterServiceImpl.java b/src/main/java/egovframework/com/cop/bbs/service/impl/EgovBBSMasterServiceImpl.java
new file mode 100644
index 0000000..1f7d0f6
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/service/impl/EgovBBSMasterServiceImpl.java
@@ -0,0 +1,177 @@
+package egovframework.com.cop.bbs.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+import egovframework.com.cop.bbs.service.BoardMaster;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.bbs.service.EgovBBSMasterService;
+import egovframework.com.cmm.EgovComponentChecker;
+import egovframework.com.cop.bbs.service.Blog;
+import egovframework.com.cop.bbs.service.BlogUser;
+import egovframework.com.cop.bbs.service.BlogVO;
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import org.egovframe.rte.fdl.cmmn.exception.FdlException;
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+
+@Service("EgovBBSMasterService")
+public class EgovBBSMasterServiceImpl extends EgovAbstractServiceImpl implements EgovBBSMasterService {
+
+ @Resource(name = "EgovBBSMasterDAO")
+ private EgovBBSMasterDAO egovBBSMasterDao;
+
+ @Resource(name = "egovBBSMstrIdGnrService")
+ private EgovIdGnrService idgenService;
+
+ //---------------------------------
+ // 2009.06.26 : 2단계 기능 추가
+ //---------------------------------
+ @Resource(name = "BBSAddedOptionsDAO")
+ private BBSAddedOptionsDAO addedOptionsDAO;
+ ////-------------------------------
+
+ @Override
+ public Map selectNotUsedBdMstrList(BoardMasterVO boardMasterVO) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void deleteBBSMasterInf(BoardMaster boardMaster) {
+ egovBBSMasterDao.deleteBBSMaster(boardMaster);
+ }
+
+ @Override
+ public void updateBBSMasterInf(BoardMaster boardMaster) throws Exception {
+ egovBBSMasterDao.updateBBSMaster(boardMaster);
+
+ //---------------------------------
+ // 2009.06.26 : 2단계 기능 추가
+ //---------------------------------
+ if (boardMaster.getOption().equals("comment") || boardMaster.getOption().equals("stsfdg")) {
+ addedOptionsDAO.insertAddedOptionsInf(boardMaster);
+ }
+
+ }
+
+ @Override
+ public BoardMasterVO selectBBSMasterInf(BoardMasterVO boardMasterVO) throws Exception {
+ BoardMasterVO resultVO = egovBBSMasterDao.selectBBSMasterDetail(boardMasterVO);
+ if (resultVO == null)
+ throw processException("info.nodata.msg");
+
+ if(EgovComponentChecker.hasComponent("EgovBBSCommentService") || EgovComponentChecker.hasComponent("EgovBBSSatisfactionService")){//2011.09.15
+ BoardMasterVO options = addedOptionsDAO.selectAddedOptionsInf(boardMasterVO);
+
+ if (options != null) {
+ if (options.getCommentAt().equals("Y")) {
+ resultVO.setOption("comment");
+ }
+
+ if (options.getStsfdgAt().equals("Y")) {
+ resultVO.setOption("stsfdg");
+ }
+ } else {
+ resultVO.setOption("na"); // 미지정 상태로 수정 가능 (이미 지정된 경우는 수정 불가로 처리)
+ }
+ }
+
+ return resultVO;
+ }
+
+ @Override
+ public Map selectBBSMasterInfs(BoardMasterVO boardMasterVO) {
+ List> result = egovBBSMasterDao.selectBBSMasterInfs(boardMasterVO);
+ int cnt = egovBBSMasterDao.selectBBSMasterInfsCnt(boardMasterVO);
+
+ Map map = new HashMap();
+
+ map.put("resultList", result);
+ map.put("resultCnt", Integer.toString(cnt));
+
+ return map;
+ }
+
+ @Override
+ public Map selectBlogMasterInfs(BoardMasterVO boardMasterVO) {
+ List> result = egovBBSMasterDao.selectBlogMasterInfs(boardMasterVO);
+ int cnt = egovBBSMasterDao.selectBlogMasterInfsCnt(boardMasterVO);
+
+ Map map = new HashMap();
+
+ map.put("resultList", result);
+ map.put("resultCnt", Integer.toString(cnt));
+
+ return map;
+ }
+
+ @Override
+ public void insertBBSMasterInf(BoardMaster boardMaster) throws Exception {
+
+ //게시판 ID 채번
+ String bbsId = idgenService.getNextStringId();
+ boardMaster.setBbsId(bbsId);
+
+ egovBBSMasterDao.insertBBSMasterInf(boardMaster);
+
+ //---------------------------------
+ // 2009.06.26 : 2단계 기능 추가
+ //---------------------------------
+ if (boardMaster.getOption().equals("comment") || boardMaster.getOption().equals("stsfdg")) {
+ addedOptionsDAO.insertAddedOptionsInf(boardMaster);
+ }
+
+ }
+
+ @Override
+ public String checkBlogUser(BlogVO blogVO) {
+
+ int userCnt = egovBBSMasterDao.checkExistUser(blogVO);
+
+ if (userCnt == 0) {
+ return "";
+ } else {
+ return "EXIST";
+ }
+ }
+
+ @Override
+ public BlogVO checkBlogUser2(BlogVO blogVO) {
+ BlogVO userBlog = egovBBSMasterDao.checkExistUser2(blogVO);
+ return userBlog;
+ }
+
+ @Override
+ public void insertBoardBlogUserRqst(BlogUser blogUser) {
+ egovBBSMasterDao.insertBoardBlogUserRqst(blogUser);
+ }
+
+ @Override
+ public void insertBlogMaster(Blog blog) throws FdlException {
+ egovBBSMasterDao.insertBlogMaster(blog);
+ }
+
+ @Override
+ public BlogVO selectBlogDetail(BlogVO blogVO) throws Exception {
+ BlogVO resultVO = egovBBSMasterDao.selectBlogDetail(blogVO);
+ if (resultVO == null)
+ throw processException("info.nodata.msg");
+ return resultVO;
+ }
+
+ @Override
+ public List selectBlogListPortlet(BlogVO blogVO) throws Exception{
+ return egovBBSMasterDao.selectBlogListPortlet(blogVO);
+ }
+
+ @Override
+ public List selectBBSListPortlet(BoardMasterVO boardMasterVO) throws Exception {
+ return egovBBSMasterDao.selectBBSListPortlet(boardMasterVO);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/web/EgovArticleController.java b/src/main/java/egovframework/com/cop/bbs/web/EgovArticleController.java
new file mode 100644
index 0000000..9abe9e6
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/web/EgovArticleController.java
@@ -0,0 +1,1397 @@
+package egovframework.com.cop.bbs.web;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import org.springmodules.validation.commons.DefaultBeanValidator;
+
+import egovframework.com.cmm.EgovMessageSource;
+import egovframework.com.cmm.EgovWebUtil;
+import egovframework.com.cmm.LoginVO;
+import egovframework.com.cmm.service.EgovFileMngService;
+import egovframework.com.cmm.service.EgovFileMngUtil;
+import egovframework.com.cmm.service.FileVO;
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+import egovframework.com.cmm.util.EgovXssChecker;
+import egovframework.com.cop.bbs.service.BlogVO;
+import egovframework.com.cop.bbs.service.Board;
+import egovframework.com.cop.bbs.service.BoardMaster;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.bbs.service.BoardVO;
+import egovframework.com.cop.bbs.service.EgovArticleService;
+import egovframework.com.cop.bbs.service.EgovBBSMasterService;
+import egovframework.com.cop.bbs.service.EgovBBSSatisfactionService;
+import egovframework.com.cop.cmt.service.CommentVO;
+import egovframework.com.cop.cmt.service.EgovArticleCommentService;
+import egovframework.com.cop.tpl.service.EgovTemplateManageService;
+import egovframework.com.cop.tpl.service.TemplateInfVO;
+import org.egovframe.rte.fdl.property.EgovPropertyService;
+import egovframework.com.utl.fcc.service.EgovStringUtil;
+import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
+
+/**
+ * 게시물 관리를 위한 컨트롤러 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ---------- ------- ---------------------------
+ * 2009.03.19 이삼섭 최초 생성
+ * 2009.06.29 한성곤 2단계 기능 추가 (댓글관리, 만족도조사)
+ * 2011.07.01 안민정 댓글, 스크랩, 만족도 조사 기능의 종속성 제거
+ * 2011.08.26 정진오 IncludedInfo annotation 추가
+ * 2011.09.07 서준식 유효 게시판 게시일 지나도 게시물이 조회되던 오류 수정
+ * 2016.06.13 김연호 표준프레임워크 3.6 개선
+ * 2019.05.17 신용호 KISA 취약점 조치 및 보완
+ * 2020.10.27 신용호 파일 업로드 수정 (multiRequest.getFiles)
+ *
+ *
+ */
+
+@Controller
+public class EgovArticleController {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovArticleController.class);
+
+ @Resource(name = "EgovArticleService")
+ private EgovArticleService egovArticleService;
+
+ @Resource(name = "EgovBBSMasterService")
+ private EgovBBSMasterService egovBBSMasterService;
+
+ @Resource(name = "EgovFileMngService")
+ private EgovFileMngService fileMngService;
+
+ @Resource(name = "EgovFileMngUtil")
+ private EgovFileMngUtil fileUtil;
+
+ @Resource(name = "propertiesService")
+ protected EgovPropertyService propertyService;
+
+ @Resource(name="egovMessageSource")
+ EgovMessageSource egovMessageSource;
+
+ @Resource(name = "EgovArticleCommentService")
+ protected EgovArticleCommentService egovArticleCommentService;
+
+ @Resource(name = "EgovBBSSatisfactionService")
+ private EgovBBSSatisfactionService bbsSatisfactionService;
+
+ @Resource(name = "EgovTemplateManageService")
+ private EgovTemplateManageService egovTemplateManageService;
+
+ @Autowired
+ private DefaultBeanValidator beanValidator;
+
+ //protected Logger log = Logger.getLogger(this.getClass());
+
+ /**
+ * XSS 방지 처리.
+ *
+ * @param data
+ * @return
+ */
+ protected String unscript(String data) {
+ if (data == null || data.trim().equals("")) {
+ return "";
+ }
+
+ String ret = data;
+
+ ret = ret.replaceAll("<(S|s)(C|c)(R|r)(I|i)(P|p)(T|t)", "<script");
+ ret = ret.replaceAll("(S|s)(C|c)(R|r)(I|i)(P|p)(T|t)", "</script");
+
+ ret = ret.replaceAll("<(O|o)(B|b)(J|j)(E|e)(C|c)(T|t)", "<object");
+ ret = ret.replaceAll("(O|o)(B|b)(J|j)(E|e)(C|c)(T|t)", "</object");
+
+ ret = ret.replaceAll("<(A|a)(P|p)(P|p)(L|l)(E|e)(T|t)", "<applet");
+ ret = ret.replaceAll("(A|a)(P|p)(P|p)(L|l)(E|e)(T|t)", "</applet");
+
+ ret = ret.replaceAll("<(E|e)(M|m)(B|b)(E|e)(D|d)", "<embed");
+ ret = ret.replaceAll("(E|e)(M|m)(B|b)(E|e)(D|d)", "<embed");
+
+ ret = ret.replaceAll("<(F|f)(O|o)(R|r)(M|m)", "<form");
+ ret = ret.replaceAll("(F|f)(O|o)(R|r)(M|m)", "<form");
+
+ return ret;
+ }
+
+ /**
+ * 게시물에 대한 목록을 조회한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectArticleList.do")
+ public String selectArticleList(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); //KISA 보안취약점 조치 (2018-12-10, 이정은)
+
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ BoardMasterVO vo = new BoardMasterVO();
+
+ vo.setBbsId(boardVO.getBbsId());
+ vo.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+ BoardMasterVO master = egovBBSMasterService.selectBBSMasterInf(vo);
+
+ //방명록은 방명록 게시판으로 이동
+ if(master.getBbsTyCode().equals("BBST03")){
+ return "forward:/cop/bbs/selectGuestArticleList.do";
+ }
+
+
+ boardVO.setPageUnit(propertyService.getInt("pageUnit"));
+ boardVO.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+
+ paginationInfo.setCurrentPageNo(boardVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(boardVO.getPageUnit());
+ paginationInfo.setPageSize(boardVO.getPageSize());
+
+ boardVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ boardVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ boardVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovArticleService.selectArticleList(boardVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ //공지사항 추출
+ List noticeList = egovArticleService.selectNoticeArticleList(boardVO);
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ //-------------------------------
+ // 기본 BBS template 지정
+ //-------------------------------
+ if (master.getTmplatCours() == null || master.getTmplatCours().equals("")) {
+ master.setTmplatCours("/css/egovframework/com/cop/tpl/egovBaseTemplate.css");
+ }
+ ////-----------------------------
+
+ if(user != null) {
+ model.addAttribute("sessionUniqId", user.getUniqId());
+ }
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("articleVO", boardVO);
+ model.addAttribute("boardMasterVO", master);
+ model.addAttribute("paginationInfo", paginationInfo);
+ model.addAttribute("noticeList", noticeList);
+ return "egovframework/com/cop/bbs/EgovArticleList";
+ }
+
+
+
+ /**
+ * 게시물에 대한 상세 정보를 조회한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectArticleDetail.do")
+ public String selectArticleDetail(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); //KISA 보안취약점 조치 (2018-12-10, 이정은)
+
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+
+ boardVO.setLastUpdusrId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+ BoardVO vo = egovArticleService.selectArticleDetail(boardVO);
+
+ model.addAttribute("result", vo);
+ model.addAttribute("sessionUniqId", (user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ //비밀글은 작성자만 볼수 있음
+ if(!EgovStringUtil.isEmpty(vo.getSecretAt()) && vo.getSecretAt().equals("Y") && !((user == null || user.getUniqId() == null) ? "" : user.getUniqId()).equals(vo.getFrstRegisterId()))
+ return"forward:/cop/bbs/selectArticleList.do";
+
+ //----------------------------
+ // template 처리 (기본 BBS template 지정 포함)
+ //----------------------------
+ BoardMasterVO master = new BoardMasterVO();
+
+ master.setBbsId(boardVO.getBbsId());
+ master.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardMasterVO masterVo = egovBBSMasterService.selectBBSMasterInf(master);
+
+ if (masterVo.getTmplatCours() == null || masterVo.getTmplatCours().equals("")) {
+ masterVo.setTmplatCours("/css/egovframework/com/cop/tpl/egovBaseTemplate.css");
+ }
+
+ ////-----------------------------
+
+ //----------------------------
+ // 2009.06.29 : 2단계 기능 추가
+ // 2011.07.01 : 댓글, 만족도 조사 기능의 종속성 제거
+ //----------------------------
+ if (egovArticleCommentService != null){
+ if (egovArticleCommentService.canUseComment(boardVO.getBbsId())) {
+ model.addAttribute("useComment", "true");
+ }
+ }
+ if (bbsSatisfactionService != null) {
+ if (bbsSatisfactionService.canUseSatisfaction(boardVO.getBbsId())) {
+ model.addAttribute("useSatisfaction", "true");
+ }
+ }
+ ////--------------------------
+
+ model.addAttribute("boardMasterVO", masterVo);
+
+ return "egovframework/com/cop/bbs/EgovArticleDetail";
+ }
+
+ /**
+ * 게시물 등록을 위한 등록페이지로 이동한다.
+ *
+ * @param boardVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/insertArticleView.do")
+ public String insertArticleView(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ BoardMasterVO bdMstr = new BoardMasterVO();
+ BoardVO board = new BoardVO();
+ if (isAuthenticated) {
+
+ BoardMasterVO vo = new BoardMasterVO();
+ vo.setBbsId(boardVO.getBbsId());
+ vo.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ bdMstr = egovBBSMasterService.selectBBSMasterInf(vo);
+ }
+
+ //----------------------------
+ // 기본 BBS template 지정
+ //----------------------------
+ if (bdMstr.getTmplatCours() == null || bdMstr.getTmplatCours().equals("")) {
+ bdMstr.setTmplatCours("/css/egovframework/com/cop/tpl/egovBaseTemplate.css");
+ }
+
+ model.addAttribute("articleVO", boardVO);
+ model.addAttribute("boardMasterVO", bdMstr);
+ ////-----------------------------
+
+ return "egovframework/com/cop/bbs/EgovArticleRegist";
+ }
+
+ /**
+ * 게시물을 등록한다.
+ *
+ * @param boardVO
+ * @param board
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/insertArticle.do")
+ public String insertArticle(final MultipartHttpServletRequest multiRequest, @ModelAttribute("searchVO") BoardVO boardVO,
+ @ModelAttribute("bdMstr") BoardMaster bdMstr, @ModelAttribute("board") BoardVO board, BindingResult bindingResult,
+ ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) { //KISA 보안취약점 조치 (2018-12-10, 이정은)
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ beanValidator.validate(board, bindingResult);
+ if (bindingResult.hasErrors()) {
+
+ BoardMasterVO master = new BoardMasterVO();
+
+ master.setBbsId(boardVO.getBbsId());
+ master.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ master = egovBBSMasterService.selectBBSMasterInf(master);
+
+
+ //----------------------------
+ // 기본 BBS template 지정
+ //----------------------------
+ if (master.getTmplatCours() == null || master.getTmplatCours().equals("")) {
+ master.setTmplatCours("css/egovframework/com/cop/tpl/egovBaseTemplate.css");
+ }
+
+ model.addAttribute("boardMasterVO", master);
+ ////-----------------------------
+
+ return "egovframework/com/cop/bbs/EgovArticleRegist";
+ }
+
+ if (isAuthenticated) {
+ List result = null;
+ String atchFileId = "";
+
+ //final Map files = multiRequest.getFileMap();
+ final List files = multiRequest.getFiles("file_1");
+ if (!files.isEmpty()) {
+ result = fileUtil.parseFileInf(files, "BBS_", 0, "", "");
+ atchFileId = fileMngService.insertFileInfs(result);
+ }
+ board.setAtchFileId(atchFileId);
+ board.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+ board.setBbsId(boardVO.getBbsId());
+ board.setBlogId(boardVO.getBlogId());
+
+
+ //익명등록 처리
+ if(board.getAnonymousAt() != null && board.getAnonymousAt().equals("Y")){
+ board.setNtcrId("anonymous"); //게시물 통계 집계를 위해 등록자 ID 저장
+ board.setNtcrNm("익명"); //게시물 통계 집계를 위해 등록자 Name 저장
+ board.setFrstRegisterId("anonymous");
+
+ } else {
+ board.setNtcrId((user == null || user.getUniqId() == null) ? "" : user.getUniqId()); //게시물 통계 집계를 위해 등록자 ID 저장
+ board.setNtcrNm((user == null || user.getName() == null) ? "" : user.getName()); //게시물 통계 집계를 위해 등록자 Name 저장
+
+ }
+
+ board.setNttCn(unscript(board.getNttCn())); // XSS 방지
+ egovArticleService.insertArticle(board);
+ }
+ //status.setComplete();
+ if(boardVO.getBlogAt().equals("Y")){
+ return "forward:/cop/bbs/selectArticleBlogList.do";
+ }else{
+ return "forward:/cop/bbs/selectArticleList.do";
+ }
+
+ }
+
+ /**
+ * 게시물에 대한 답변 등록을 위한 등록페이지로 이동한다.
+ *
+ * @param boardVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/replyArticleView.do")
+ public String addReplyBoardArticle(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();//KISA 보안취약점 조치 (2018-12-10, 이정은)
+
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ BoardMasterVO master = new BoardMasterVO();
+ BoardVO articleVO = new BoardVO();
+ master.setBbsId(boardVO.getBbsId());
+ master.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ master = egovBBSMasterService.selectBBSMasterInf(master);
+ boardVO = egovArticleService.selectArticleDetail(boardVO);
+
+ //----------------------------
+ // 기본 BBS template 지정
+ //----------------------------
+ if (master.getTmplatCours() == null || master.getTmplatCours().equals("")) {
+ master.setTmplatCours("/css/egovframework/com/cop/tpl/egovBaseTemplate.css");
+ }
+
+ model.addAttribute("boardMasterVO", master);
+ model.addAttribute("result", boardVO);
+
+ model.addAttribute("articleVO", articleVO);
+
+ if(boardVO.getBlogAt().equals("chkBlog")){
+ return "egovframework/com/cop/bbs/EgovArticleBlogReply";
+ }else{
+ return "egovframework/com/cop/bbs/EgovArticleReply";
+ }
+ }
+
+ /**
+ * 게시물에 대한 답변을 등록한다.
+ *
+ * @param boardVO
+ * @param board
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/replyArticle.do")
+ public String replyBoardArticle(final MultipartHttpServletRequest multiRequest, @ModelAttribute("searchVO") BoardVO boardVO,
+ @ModelAttribute("bdMstr") BoardMaster bdMstr, @ModelAttribute("board") BoardVO board, BindingResult bindingResult, ModelMap model
+ ) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) { //KISA 보안취약점 조치 (2018-12-10, 이정은)
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ beanValidator.validate(board, bindingResult);
+ if (bindingResult.hasErrors()) {
+ BoardMasterVO master = new BoardMasterVO();
+
+ master.setBbsId(boardVO.getBbsId());
+ master.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ master = egovBBSMasterService.selectBBSMasterInf(master);
+
+
+ //----------------------------
+ // 기본 BBS template 지정
+ //----------------------------
+ if (master.getTmplatCours() == null || master.getTmplatCours().equals("")) {
+ master.setTmplatCours("/css/egovframework/com/cop/tpl/egovBaseTemplate.css");
+ }
+
+ model.addAttribute("articleVO", boardVO);
+ model.addAttribute("boardMasterVO", master);
+ ////-----------------------------
+
+ return "egovframework/com/cop/bbs/EgovArticleReply";
+ }
+
+ if (isAuthenticated) {
+ //final Map files = multiRequest.getFileMap();
+ final List files = multiRequest.getFiles("file_1");
+ String atchFileId = "";
+
+ if (!files.isEmpty()) {
+ List result = fileUtil.parseFileInf(files, "BBS_", 0, "", "");
+ atchFileId = fileMngService.insertFileInfs(result);
+ }
+
+ board.setAtchFileId(atchFileId);
+ board.setReplyAt("Y");
+ board.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+ board.setBbsId(board.getBbsId());
+ board.setParnts(Long.toString(boardVO.getNttId()));
+ board.setSortOrdr(boardVO.getSortOrdr());
+ board.setReplyLc(Integer.toString(Integer.parseInt(boardVO.getReplyLc()) + 1));
+
+ //익명등록 처리
+ if(board.getAnonymousAt() != null && board.getAnonymousAt().equals("Y")){
+ board.setNtcrId("anonymous"); //게시물 통계 집계를 위해 등록자 ID 저장
+ board.setNtcrNm("익명"); //게시물 통계 집계를 위해 등록자 Name 저장
+ board.setFrstRegisterId("anonymous");
+
+ } else {
+ board.setNtcrId((user == null || user.getId() == null) ? "" : user.getId()); //게시물 통계 집계를 위해 등록자 ID 저장
+ board.setNtcrNm((user == null || user.getName() == null) ? "" : user.getName()); //게시물 통계 집계를 위해 등록자 Name 저장
+
+ }
+ board.setNttCn(unscript(board.getNttCn())); // XSS 방지
+
+ egovArticleService.insertArticle(board);
+ }
+
+ return "forward:/cop/bbs/selectArticleList.do";
+ }
+
+ /**
+ * 게시물 수정을 위한 수정페이지로 이동한다.
+ *
+ * @param boardVO
+ * @param vo
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/updateArticleView.do")
+ public String updateArticleView(@ModelAttribute("searchVO") BoardVO boardVO, @ModelAttribute("board") BoardVO vo, ModelMap model)
+ throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ boardVO.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardMasterVO bmvo = new BoardMasterVO();
+ BoardVO bdvo = new BoardVO();
+
+ vo.setBbsId(boardVO.getBbsId());
+
+ bmvo.setBbsId(boardVO.getBbsId());
+ bmvo.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ if (isAuthenticated) {
+ bmvo = egovBBSMasterService.selectBBSMasterInf(bmvo);
+ bdvo = egovArticleService.selectArticleDetail(boardVO);
+ }
+
+ //----------------------------
+ // 기본 BBS template 지정
+ //----------------------------
+ if (bmvo.getTmplatCours() == null || bmvo.getTmplatCours().equals("")) {
+ bmvo.setTmplatCours("/css/egovframework/com/cop/tpl/egovBaseTemplate.css");
+ }
+
+ //익명 등록글인 경우 수정 불가
+ if(bdvo.getNtcrId().equals("anonymous")){
+ model.addAttribute("result", bdvo);
+ model.addAttribute("boardMasterVO", bmvo);
+ return "egovframework/com/cop/bbs/EgovArticleDetail";
+ }
+
+ model.addAttribute("articleVO", bdvo);
+ model.addAttribute("boardMasterVO", bmvo);
+
+ if(boardVO.getBlogAt().equals("chkBlog")){
+ return "egovframework/com/cop/bbs/EgovArticleBlogUpdt";
+ }else{
+ return "egovframework/com/cop/bbs/EgovArticleUpdt";
+ }
+
+ }
+
+ /**
+ * 게시물에 대한 내용을 수정한다.
+ *
+ * @param boardVO
+ * @param board
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/updateArticle.do")
+ public String updateBoardArticle(final MultipartHttpServletRequest multiRequest, @ModelAttribute("searchVO") BoardVO boardVO,
+ @ModelAttribute("bdMstr") BoardMaster bdMstr, @ModelAttribute("board") Board board, BindingResult bindingResult, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) { //KISA 보안취약점 조치 (2018-12-10, 이정은)
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ //--------------------------------------------------------------------------------------------
+ // @ XSS 대응 권한체크 체크 START
+ // param1 : 사용자고유ID(uniqId,esntlId)
+ //--------------------------------------------------------
+ LOGGER.debug("@ XSS 권한체크 START ----------------------------------------------");
+ //step1 DB에서 해당 게시물의 uniqId 조회
+ BoardVO vo = egovArticleService.selectArticleDetail(boardVO);
+
+ //step2 EgovXssChecker 공통모듈을 이용한 권한체크
+ EgovXssChecker.checkerUserXss(multiRequest, vo.getFrstRegisterId());
+ LOGGER.debug("@ XSS 권한체크 END ------------------------------------------------");
+ //--------------------------------------------------------
+ // @ XSS 대응 권한체크 체크 END
+ //--------------------------------------------------------------------------------------------
+
+ String atchFileId = boardVO.getAtchFileId();
+
+ beanValidator.validate(board, bindingResult);
+ if (bindingResult.hasErrors()) {
+
+ boardVO.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardMasterVO bmvo = new BoardMasterVO();
+ BoardVO bdvo = new BoardVO();
+
+ bmvo.setBbsId(boardVO.getBbsId());
+ bmvo.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ bmvo = egovBBSMasterService.selectBBSMasterInf(bmvo);
+ bdvo = egovArticleService.selectArticleDetail(boardVO);
+
+ model.addAttribute("articleVO", bdvo);
+ model.addAttribute("boardMasterVO", bmvo);
+
+ return "egovframework/com/cop/bbs/EgovArticleUpdt";
+ }
+
+ if (isAuthenticated) {
+
+ //final Map files = multiRequest.getFileMap();
+ final List files = multiRequest.getFiles("file_1");
+ if (!files.isEmpty()) {
+ if (atchFileId == null || "".equals(atchFileId)) {
+ List result = fileUtil.parseFileInf(files, "BBS_", 0, atchFileId, "");
+ atchFileId = fileMngService.insertFileInfs(result);
+ board.setAtchFileId(atchFileId);
+ } else {
+ FileVO fvo = new FileVO();
+ fvo.setAtchFileId(atchFileId);
+ int cnt = fileMngService.getMaxFileSN(fvo);
+ List _result = fileUtil.parseFileInf(files, "BBS_", cnt, atchFileId, "");
+ fileMngService.updateFileInfs(_result);
+ }
+ }
+
+ board.setLastUpdusrId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ board.setNtcrNm(""); // dummy 오류 수정 (익명이 아닌 경우 validator 처리를 위해 dummy로 지정됨)
+ board.setPassword(""); // dummy 오류 수정 (익명이 아닌 경우 validator 처리를 위해 dummy로 지정됨)
+
+ board.setNttCn(unscript(board.getNttCn())); // XSS 방지
+
+ egovArticleService.updateArticle(board);
+ }
+
+ return "forward:/cop/bbs/selectArticleList.do";
+ }
+
+ /**
+ * 게시물에 대한 내용을 삭제한다.
+ *
+ * @param boardVO
+ * @param board
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/deleteArticle.do")
+ public String deleteBoardArticle(HttpServletRequest request, @ModelAttribute("searchVO") BoardVO boardVO, @ModelAttribute("board") Board board,
+ @ModelAttribute("bdMstr") BoardMaster bdMstr, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ //--------------------------------------------------------------------------------------------
+ // @ XSS 대응 권한체크 체크 START
+ // param1 : 사용자고유ID(uniqId,esntlId)
+ //--------------------------------------------------------
+ LOGGER.debug("@ XSS 권한체크 START ----------------------------------------------");
+ //step1 DB에서 해당 게시물의 uniqId 조회
+ BoardVO vo = egovArticleService.selectArticleDetail(boardVO);
+
+ //step2 EgovXssChecker 공통모듈을 이용한 권한체크
+ EgovXssChecker.checkerUserXss(request, vo.getFrstRegisterId());
+ LOGGER.debug("@ XSS 권한체크 END ------------------------------------------------");
+ //--------------------------------------------------------
+ // @ XSS 대응 권한체크 체크 END
+ //--------------------------------------------------------------------------------------------
+
+ BoardVO bdvo = egovArticleService.selectArticleDetail(boardVO);
+ //익명 등록글인 경우 수정 불가
+ if(bdvo.getNtcrId().equals("anonymous")){
+ model.addAttribute("result", bdvo);
+ model.addAttribute("boardMasterVO", bdMstr);
+ return "egovframework/com/cop/bbs/EgovArticleDetail";
+ }
+
+ if (isAuthenticated) {
+ board.setLastUpdusrId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ egovArticleService.deleteArticle(board);
+ }
+
+ if(boardVO.getBlogAt().equals("chkBlog")){
+ return "forward:/cop/bbs/selectArticleBlogList.do";
+ }else{
+ return "forward:/cop/bbs/selectArticleList.do";
+ }
+ }
+
+ /**
+ * 방명록에 대한 목록을 조회한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectGuestArticleList.do")
+ public String selectGuestArticleList(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) { //KISA 보안취약점 조치 (2018-12-10, 이정은)
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ // 수정 및 삭제 기능 제어를 위한 처리
+ model.addAttribute("sessionUniqId", (user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardVO vo = new BoardVO();
+
+ vo.setBbsId(boardVO.getBbsId());
+ vo.setBbsNm(boardVO.getBbsNm());
+ vo.setNtcrNm((user == null || user.getName() == null) ? "" : user.getName());
+ vo.setNtcrId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardMasterVO masterVo = new BoardMasterVO();
+
+ masterVo.setBbsId(vo.getBbsId());
+ masterVo.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardMasterVO mstrVO = egovBBSMasterService.selectBBSMasterInf(masterVo);
+
+ vo.setPageIndex(boardVO.getPageIndex());
+ vo.setPageUnit(propertyService.getInt("pageUnit"));
+ vo.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+ paginationInfo.setCurrentPageNo(vo.getPageIndex());
+ paginationInfo.setRecordCountPerPage(vo.getPageUnit());
+ paginationInfo.setPageSize(vo.getPageSize());
+
+ vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ vo.setLastIndex(paginationInfo.getLastRecordIndex());
+ vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovArticleService.selectGuestArticleList(vo);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("user", user);
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("boardMasterVO", mstrVO);
+ model.addAttribute("articleVO", vo);
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "egovframework/com/cop/bbs/EgovGuestArticleList";
+ }
+
+
+ /**
+ * 방명록에 대한 내용을 등록한다.
+ *
+ * @param boardVO
+ * @param board
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/insertGuestArticle.do")
+ public String insertGuestList(@ModelAttribute("searchVO") BoardVO boardVO, @ModelAttribute("Board") Board board, BindingResult bindingResult,
+ ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) { //KISA 보안취약점 조치 (2018-12-10, 이정은)
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ beanValidator.validate(board, bindingResult);
+ if (bindingResult.hasErrors()) {
+
+ BoardVO vo = new BoardVO();
+
+ vo.setBbsId(boardVO.getBbsId());
+ vo.setBbsNm(boardVO.getBbsNm());
+ vo.setNtcrNm(user == null ? "" : EgovStringUtil.isNullToString(user.getName()));
+ vo.setNtcrId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardMasterVO masterVo = new BoardMasterVO();
+
+ masterVo.setBbsId(vo.getBbsId());
+ masterVo.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardMasterVO mstrVO = egovBBSMasterService.selectBBSMasterInf(masterVo);
+
+ vo.setPageUnit(propertyService.getInt("pageUnit"));
+ vo.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+ paginationInfo.setCurrentPageNo(vo.getPageIndex());
+ paginationInfo.setRecordCountPerPage(vo.getPageUnit());
+ paginationInfo.setPageSize(vo.getPageSize());
+
+ vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ vo.setLastIndex(paginationInfo.getLastRecordIndex());
+ vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovArticleService.selectGuestArticleList(vo);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("boardMasterVO", mstrVO);
+ model.addAttribute("articleVO", vo);
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "egovframework/com/cop/bbs/EgovGuestArticleList";
+
+ }
+
+ if (isAuthenticated) {
+ board.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ egovArticleService.insertArticle(board);
+
+ boardVO.setNttCn("");
+ boardVO.setPassword("");
+ boardVO.setNtcrId("");
+ boardVO.setNttId(0);
+ }
+
+ return "forward:/cop/bbs/selectGuestArticleList.do";
+ }
+
+ /**
+ * 방명록에 대한 내용을 삭제한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/deleteGuestArticle.do")
+ public String deleteGuestList(@ModelAttribute("searchVO") BoardVO boardVO, @ModelAttribute("articleVO") Board board, ModelMap model) throws Exception {
+ @SuppressWarnings("unused")
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if (isAuthenticated) {
+ egovArticleService.deleteArticle(boardVO);
+ }
+
+ return "forward:/cop/bbs/selectGuestArticleList.do";
+ }
+
+ /**
+ * 방명록 수정을 위한 특정 내용을 조회한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/updateGuestArticleView.do")
+ public String updateGuestArticleView(@ModelAttribute("searchVO") BoardVO boardVO, @ModelAttribute("boardMasterVO") BoardMasterVO brdMstrVO,
+ ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) { //KISA 보안취약점 조치 (2018-12-10, 이정은)
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ // 수정 및 삭제 기능 제어를 위한 처리
+ model.addAttribute("sessionUniqId", (user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardVO vo = egovArticleService.selectArticleDetail(boardVO);
+
+ boardVO.setBbsId(boardVO.getBbsId());
+ boardVO.setBbsNm(boardVO.getBbsNm());
+ boardVO.setNtcrNm((user == null || user.getName() == null) ? "" : user.getName());
+
+ boardVO.setPageUnit(propertyService.getInt("pageUnit"));
+ boardVO.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+ paginationInfo.setCurrentPageNo(boardVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(boardVO.getPageUnit());
+ paginationInfo.setPageSize(boardVO.getPageSize());
+
+ boardVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ boardVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ boardVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovArticleService.selectGuestArticleList(boardVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("articleVO", vo);
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "egovframework/com/cop/bbs/EgovGuestArticleList";
+ }
+
+ /**
+ * 방명록을 수정하고 게시판 메인페이지를 조회한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/updateGuestArticle.do")
+ public String updateGuestArticle(@ModelAttribute("searchVO") BoardVO boardVO, @ModelAttribute Board board, BindingResult bindingResult,
+ ModelMap model) throws Exception {
+
+ //BBST02, BBST04
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) { //KISA 보안취약점 조치 (2018-12-10, 이정은)
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ beanValidator.validate(board, bindingResult);
+ if (bindingResult.hasErrors()) {
+
+ BoardVO vo = new BoardVO();
+
+ vo.setBbsId(boardVO.getBbsId());
+ vo.setBbsNm(boardVO.getBbsNm());
+ vo.setNtcrNm((user == null || user.getName() == null) ? "" : user.getName());
+ vo.setNtcrId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardMasterVO masterVo = new BoardMasterVO();
+
+ masterVo.setBbsId(vo.getBbsId());
+ masterVo.setUniqId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ BoardMasterVO mstrVO = egovBBSMasterService.selectBBSMasterInf(masterVo);
+
+ vo.setPageUnit(propertyService.getInt("pageUnit"));
+ vo.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+ paginationInfo.setCurrentPageNo(vo.getPageIndex());
+ paginationInfo.setRecordCountPerPage(vo.getPageUnit());
+ paginationInfo.setPageSize(vo.getPageSize());
+
+ vo.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ vo.setLastIndex(paginationInfo.getLastRecordIndex());
+ vo.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovArticleService.selectGuestArticleList(vo);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("boardMasterVO", mstrVO);
+ model.addAttribute("articleVO", vo);
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "egovframework/com/cop/bbs/EgovGuestArticleList";
+ }
+
+ if (isAuthenticated) {
+ egovArticleService.updateArticle(board);
+ boardVO.setNttCn("");
+ boardVO.setPassword("");
+ boardVO.setNtcrId("");
+ boardVO.setNttId(0);
+ }
+
+ return "forward:/cop/bbs/selectGuestArticleList.do";
+ }
+
+ /*********************
+ * 블로그관련
+ * ********************/
+
+ /**
+ * 블로그 게시판에 대한 목록을 조회한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectArticleBlogList.do")
+ public String selectArticleBlogList(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); //KISA 보안취약점 조치 (2018-12-10, 이정은)
+
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ BlogVO blogVo = new BlogVO();
+ blogVo.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+ blogVo.setBbsId(boardVO.getBbsId());
+ blogVo.setBlogId(boardVO.getBlogId());
+ BlogVO master = egovBBSMasterService.selectBlogDetail(blogVo);
+
+ boardVO.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ //블로그 카테고리관리 권한(로그인 한 사용자만 가능)
+ int loginUserCnt = egovArticleService.selectLoginUser(boardVO);
+
+ //블로그 게시판 제목 추출
+ List blogNameList = egovArticleService.selectBlogNmList(boardVO);
+
+ if(user != null) {
+ model.addAttribute("sessionUniqId", (user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+ }
+
+ model.addAttribute("articleVO", boardVO);
+ model.addAttribute("boardMasterVO", master);
+ model.addAttribute("blogNameList", blogNameList);
+ model.addAttribute("loginUserCnt", loginUserCnt);
+
+ return "egovframework/com/cop/bbs/EgovArticleBlogList";
+ }
+
+ /**
+ * 블로그 게시물에 대한 상세 타이틀을 조회한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectArticleBlogDetail.do")
+ public ModelAndView selectArticleBlogDetail(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); //KISA 보안취약점 조치 (2018-12-10, 이정은)
+
+ if(!isAuthenticated) {
+ throw new IllegalAccessException("Login Required!");
+ }
+
+ BoardVO vo = new BoardVO();
+
+ boardVO.setLastUpdusrId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ boardVO.setPageUnit(propertyService.getInt("pageUnit"));
+ boardVO.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+
+ paginationInfo.setCurrentPageNo(boardVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(boardVO.getPageUnit());
+ paginationInfo.setPageSize(boardVO.getPageSize());
+
+ boardVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ boardVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ boardVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ List blogSubJectList = egovArticleService.selectArticleDetailDefault(boardVO);
+ vo = egovArticleService.selectArticleCnOne(boardVO);
+
+ int totCnt = egovArticleService.selectArticleDetailDefaultCnt(boardVO);
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ ModelAndView mav = new ModelAndView("jsonView");
+ mav.addObject("blogSubJectList", blogSubJectList);
+ mav.addObject("paginationInfo", paginationInfo);
+
+ if(vo.getNttCn() != null){
+ mav.addObject("blogCnOne", vo);
+ }
+
+ //비밀글은 작성자만 볼수 있음
+ if(!EgovStringUtil.isEmpty(vo.getSecretAt()) && vo.getSecretAt().equals("Y") && !((user == null || user.getUniqId() == null) ? "" : user.getUniqId()).equals(vo.getFrstRegisterId()))
+ mav.setViewName("forward:/cop/bbs/selectArticleList.do");
+ return mav;
+ }
+
+ /**
+ * 블로그 게시물에 대한 상세 내용을 조회한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectArticleBlogDetailCn.do")
+ public ModelAndView selectArticleBlogDetailCn(@ModelAttribute("searchVO") BoardVO boardVO, @ModelAttribute("commentVO") CommentVO commentVO, ModelMap model) throws Exception {
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+
+ boardVO.setLastUpdusrId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); //KISA 보안취약점 조치 (2018-12-10, 이정은)
+
+ if(!isAuthenticated) {
+ throw new IllegalAccessException("Login Required!");
+ }
+
+ BoardVO vo = egovArticleService.selectArticleDetail(boardVO);
+
+ //----------------------------
+ // 댓글 처리
+ //----------------------------
+ CommentVO articleCommentVO = new CommentVO();
+ commentVO.setWrterNm((user == null || user.getName() == null) ? "" : user.getName());
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+ paginationInfo.setCurrentPageNo(commentVO.getSubPageIndex());
+ paginationInfo.setRecordCountPerPage(commentVO.getSubPageUnit());
+ paginationInfo.setPageSize(commentVO.getSubPageSize());
+
+ commentVO.setSubFirstIndex(paginationInfo.getFirstRecordIndex());
+ commentVO.setSubLastIndex(paginationInfo.getLastRecordIndex());
+ commentVO.setSubRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovArticleCommentService.selectArticleCommentList(commentVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ //댓글 처리 END
+ //----------------------------
+
+ List blogCnList = egovArticleService.selectArticleDetailCn(boardVO);
+ ModelAndView mav = new ModelAndView("jsonView");
+
+ // 수정 처리된 후 댓글 등록 화면으로 처리되기 위한 구현
+ if (commentVO.isModified()) {
+ commentVO.setCommentNo("");
+ commentVO.setCommentCn("");
+ }
+
+ // 수정을 위한 처리
+ if (!commentVO.getCommentNo().equals("")) {
+ mav.setViewName ("forward:/cop/cmt/updateArticleCommentView.do");
+ }
+
+ mav.addObject("blogCnList", blogCnList);
+ mav.addObject("resultUnder", vo);
+ mav.addObject("paginationInfo", paginationInfo);
+ mav.addObject("resultList", map.get("resultList"));
+ mav.addObject("resultCnt", map.get("resultCnt"));
+ mav.addObject("articleCommentVO", articleCommentVO); // validator 용도
+
+ commentVO.setCommentCn(""); // 등록 후 댓글 내용 처리
+
+ //비밀글은 작성자만 볼수 있음
+ if(!EgovStringUtil.isEmpty(vo.getSecretAt()) && vo.getSecretAt().equals("Y") && !((user == null || user.getUniqId() == null) ? "" : user.getUniqId()).equals(vo.getFrstRegisterId()))
+ mav.setViewName("forward:/cop/bbs/selectArticleList.do");
+ return mav;
+
+ }
+
+ /**
+ * 개인블로그 관리
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectBlogListManager.do")
+ public String selectBlogMasterList(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+
+
+ boardVO.setPageUnit(propertyService.getInt("pageUnit"));
+ boardVO.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+
+ paginationInfo.setCurrentPageNo(boardVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(boardVO.getPageUnit());
+ paginationInfo.setPageSize(boardVO.getPageSize());
+
+ boardVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ boardVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ boardVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+ boardVO.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ Map map = egovArticleService.selectBlogListManager(boardVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "egovframework/com/cop/bbs/EgovBlogListManager";
+ }
+
+ /**
+ * 템플릿에 대한 미리보기용 게시물 목록을 조회한다.
+ *
+ * @param boardVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/previewBoardList.do")
+ public String previewBoardArticles(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+ //LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+
+ String template = boardVO.getSearchWrd(); // 템플릿 URL
+
+ BoardMasterVO master = new BoardMasterVO();
+
+ master.setBbsNm("미리보기 게시판");
+
+ boardVO.setPageUnit(propertyService.getInt("pageUnit"));
+ boardVO.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+
+ paginationInfo.setCurrentPageNo(boardVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(boardVO.getPageUnit());
+ paginationInfo.setPageSize(boardVO.getPageSize());
+
+ boardVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ boardVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ boardVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ BoardVO target = null;
+ List list = new ArrayList();
+
+ target = new BoardVO();
+ target.setNttSj("게시판 기능 설명");
+ target.setFrstRegisterId("ID");
+ target.setFrstRegisterNm("관리자");
+ target.setFrstRegisterPnttm("2019-01-01");
+ target.setInqireCo(7);
+ target.setParnts("0");
+ target.setReplyAt("N");
+ target.setReplyLc("0");
+ target.setUseAt("Y");
+
+ list.add(target);
+
+ target = new BoardVO();
+ target.setNttSj("게시판 부가 기능 설명");
+ target.setFrstRegisterId("ID");
+ target.setFrstRegisterNm("관리자");
+ target.setFrstRegisterPnttm("2019-01-01");
+ target.setInqireCo(7);
+ target.setParnts("0");
+ target.setReplyAt("N");
+ target.setReplyLc("0");
+ target.setUseAt("Y");
+
+ list.add(target);
+
+ boardVO.setSearchWrd("");
+
+ int totCnt = list.size();
+
+ //공지사항 추출
+ List noticeList = egovArticleService.selectNoticeArticleList(boardVO);
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ master.setTmplatCours(template);
+
+ model.addAttribute("resultList", list);
+ model.addAttribute("resultCnt", Integer.toString(totCnt));
+ model.addAttribute("articleVO", boardVO);
+ model.addAttribute("boardMasterVO", master);
+ model.addAttribute("paginationInfo", paginationInfo);
+ model.addAttribute("noticeList", noticeList);
+
+ model.addAttribute("preview", "true");
+
+ return "egovframework/com/cop/bbs/EgovArticleList";
+ }
+
+ /**
+ * 미리보기 커뮤니티 메인페이지를 조회한다.
+ *
+ * @param cmmntyVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/previewBlogMainPage.do")
+ public String previewBlogMainPage(@ModelAttribute("searchVO") BoardVO boardVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); //KISA 보안취약점 조치 (2018-12-10, 이정은)
+
+ String tmplatCours = boardVO.getSearchWrd();
+
+ BlogVO master = new BlogVO();
+ master.setBlogNm("미리보기 블로그");
+ master.setBlogIntrcn("미리보기를 위한 블로그입니다.");
+ master.setUseAt("Y");
+ master.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ boardVO.setFrstRegisterId((user == null || user.getUniqId() == null) ? "" : user.getUniqId());
+
+ //블로그 카테고리관리 권한(로그인 한 사용자만 가능)
+ int loginUserCnt = egovArticleService.selectLoginUser(boardVO);
+
+ //블로그 게시판 제목 추출
+ List blogNameList = new ArrayList();
+
+ BoardVO target = null;
+ target = new BoardVO();
+ target.setBbsNm("블로그게시판#1");
+
+ blogNameList.add(target);
+
+
+ if(user != null) {
+ model.addAttribute("sessionUniqId", user.getUniqId());
+ }
+
+ model.addAttribute("articleVO", boardVO);
+ model.addAttribute("boardMasterVO", master);
+ model.addAttribute("blogNameList", blogNameList);
+ model.addAttribute("loginUserCnt", 1);
+
+ model.addAttribute("preview", "true");
+
+ // 안전한 경로 문자열로 조치
+ tmplatCours = EgovWebUtil.filePathBlackList(tmplatCours);
+
+ // 화이트 리스트 체크
+ List templateWhiteList = egovTemplateManageService.selectTemplateWhiteList();
+ LOGGER.debug("Template > WhiteList Count = {}",templateWhiteList.size());
+ if ( tmplatCours == null ) tmplatCours = "";
+ for(TemplateInfVO templateInfVO : templateWhiteList){
+ LOGGER.debug("Template > whiteList TmplatCours = "+templateInfVO.getTmplatCours());
+ if ( tmplatCours.equals(templateInfVO.getTmplatCours()) ) {
+ return tmplatCours;
+ }
+ }
+
+ LOGGER.debug("Template > WhiteList mismatch! Please check Admin page!");
+ return "egovframework/com/cmm/egovError";
+ }
+
+
+}
diff --git a/src/main/java/egovframework/com/cop/bbs/web/EgovBBSMasterController.java b/src/main/java/egovframework/com/cop/bbs/web/EgovBBSMasterController.java
new file mode 100644
index 0000000..2c8c568
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/bbs/web/EgovBBSMasterController.java
@@ -0,0 +1,518 @@
+package egovframework.com.cop.bbs.web;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.ModelAndView;
+import org.springmodules.validation.commons.DefaultBeanValidator;
+
+import egovframework.com.cmm.ComDefaultCodeVO;
+import egovframework.com.cmm.EgovComponentChecker;
+import egovframework.com.cmm.EgovMessageSource;
+import egovframework.com.cmm.LoginVO;
+import egovframework.com.cmm.annotation.IncludedInfo;
+import egovframework.com.cmm.service.EgovCmmUseService;
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+import egovframework.com.cop.bbs.service.Blog;
+import egovframework.com.cop.bbs.service.BlogUserVO;
+import egovframework.com.cop.bbs.service.BlogVO;
+import egovframework.com.cop.bbs.service.BoardMaster;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.bbs.service.EgovBBSMasterService;
+import egovframework.com.utl.fcc.service.EgovStringUtil;
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+import org.egovframe.rte.fdl.property.EgovPropertyService;
+import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
+
+
+/**
+ * 게시판 속성관리를 위한 컨트롤러 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.3.12 이삼섭 최초 생성
+ * 2009.06.26 한성곤 2단계 기능 추가 (댓글관리, 만족도조사)
+ * 2011.07.21 안민정 커뮤니티 관련 메소드 분리 (->EgovBBSAttributeManageController)
+ * 2011.8.26 정진오 IncludedInfo annotation 추가
+ * 2011.09.15 서준식 2단계 기능 추가 (댓글관리, 만족도조사) 적용방법 변경
+ * 2016.06.13 김연호 표준프레임워크 v3.6 개선
+ *
+ */
+
+@Controller
+public class EgovBBSMasterController {
+
+ @Resource(name = "EgovBBSMasterService")
+ private EgovBBSMasterService egovBBSMasterService;
+
+ @Resource(name = "EgovCmmUseService")
+ private EgovCmmUseService cmmUseService;
+
+ @Resource(name = "propertiesService")
+ protected EgovPropertyService propertyService;
+
+ @Resource(name = "egovBBSMstrIdGnrService")
+ private EgovIdGnrService idgenServiceBbs;
+
+ @Resource(name = "egovBlogIdGnrService")
+ private EgovIdGnrService idgenServiceBlog;
+
+ /** EgovMessageSource */
+ @Resource(name = "egovMessageSource")
+ EgovMessageSource egovMessageSource;
+
+
+
+ @Autowired
+ private DefaultBeanValidator beanValidator;
+
+ //Logger log = Logger.getLogger(this.getClass());
+
+ /**
+ * 신규 게시판 마스터 등록을 위한 등록페이지로 이동한다.
+ *
+ * @param boardMasterVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/insertBBSMasterView.do")
+ public String insertBBSMasterView(@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, ModelMap model) throws Exception {
+ BoardMasterVO boardMaster = new BoardMasterVO();
+ //공통코드(게시판유형)
+ ComDefaultCodeVO vo = new ComDefaultCodeVO();
+ vo.setCodeId("COM101");
+ List> codeResult = cmmUseService.selectCmmCodeDetail(vo);
+ model.addAttribute("bbsTyCode", codeResult);
+ model.addAttribute("boardMasterVO", boardMaster);
+
+
+ //---------------------------------
+ // 2011.09.15 : 2단계 기능 추가 반영 방법 변경
+ //---------------------------------
+
+
+ if(EgovComponentChecker.hasComponent("EgovArticleCommentService")){
+ model.addAttribute("useComment", "true");
+ }
+ if(EgovComponentChecker.hasComponent("EgovBBSSatisfactionService")){
+ model.addAttribute("useSatisfaction", "true");
+ }
+
+ return "egovframework/com/cop/bbs/EgovBBSMasterRegist";
+ }
+
+ /**
+ * 신규 게시판 마스터 정보를 등록한다.
+ *
+ * @param boardMasterVO
+ * @param boardMaster
+ * @param status
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/insertBBSMaster.do")
+ public String insertBBSMaster(@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, @ModelAttribute("boardMaster") BoardMaster boardMaster,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ beanValidator.validate(boardMaster, bindingResult);
+ if (bindingResult.hasErrors()) {
+ ComDefaultCodeVO vo = new ComDefaultCodeVO();
+
+ //게시판유형코드
+ vo.setCodeId("COM101");
+ List> codeResult = cmmUseService.selectCmmCodeDetail(vo);
+ model.addAttribute("bbsTyCode", codeResult);
+
+ return "egovframework/com/cop/bbs/EgovBBSMasterRegist";
+ }
+
+ if (isAuthenticated) {
+ boardMaster.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ if((boardMasterVO == null ? "" : EgovStringUtil.isNullToString(boardMasterVO.getBlogAt())).equals("Y")){
+ boardMaster.setBlogAt("Y");
+ }else{
+ boardMaster.setBlogAt("N");
+ }
+ egovBBSMasterService.insertBBSMasterInf(boardMaster);
+ }
+ if(boardMaster.getBlogAt().equals("Y")){
+ return "forward:/cop/bbs/selectArticleBlogList.do";
+ }else{
+ return "forward:/cop/bbs/selectBBSMasterInfs.do";
+ }
+
+ }
+
+ /**
+ * 게시판 마스터 목록을 조회한다.
+ *
+ * @param boardMasterVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @IncludedInfo(name="게시판관리",order = 180 ,gid = 40)
+ @RequestMapping("/cop/bbs/selectBBSMasterInfs.do")
+ public String selectBBSMasterInfs(@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, ModelMap model) throws Exception {
+ boardMasterVO.setPageUnit(propertyService.getInt("pageUnit"));
+ boardMasterVO.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+
+ paginationInfo.setCurrentPageNo(boardMasterVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(boardMasterVO.getPageUnit());
+ paginationInfo.setPageSize(boardMasterVO.getPageSize());
+
+ boardMasterVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ boardMasterVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ boardMasterVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovBBSMasterService.selectBBSMasterInfs(boardMasterVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "egovframework/com/cop/bbs/EgovBBSMasterList";
+ }
+
+ /**
+ * 블로그에 대한 목록을 조회한다.
+ *
+ * @param blogVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @IncludedInfo(name="블로그관리", order = 170 ,gid = 40)
+ @RequestMapping("/cop/bbs/selectBlogList.do")
+ public String selectBlogMasterList(@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ //KISA 보안취약점 조치 (2018-12-10, 신용호)
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ boardMasterVO.setPageUnit(propertyService.getInt("pageUnit"));
+ boardMasterVO.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+
+ paginationInfo.setCurrentPageNo(boardMasterVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(boardMasterVO.getPageUnit());
+ paginationInfo.setPageSize(boardMasterVO.getPageSize());
+
+ boardMasterVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ boardMasterVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ boardMasterVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+ boardMasterVO.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ Map map = egovBBSMasterService.selectBlogMasterInfs(boardMasterVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "egovframework/com/cop/bbs/EgovBlogList";
+ }
+
+ /**
+ * 블로그 등록을 위한 등록페이지로 이동한다.
+ *
+ * @param blogVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/insertBlogMasterView.do")
+ public String insertBlogMasterView(@ModelAttribute("searchVO") BlogVO blogVO, ModelMap model) throws Exception {
+ model.addAttribute("blogMasterVO", new BlogVO());
+ return "egovframework/com/cop/bbs/EgovBlogRegist";
+ }
+
+ /**
+ * 블로그 생성 유무를 판단한다.
+ *
+ * @param blogVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectChkBloguser.do")
+ public ModelAndView chkBlogUser(@ModelAttribute("searchVO") BlogVO blogVO, ModelMap model) throws Exception {
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) {
+ throw new IllegalAccessException("Login Required!");
+ }
+
+ model.addAttribute("blogMasterVO", new BlogVO());
+
+ String userVal="";
+ blogVO.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ userVal = egovBBSMasterService.checkBlogUser(blogVO);
+
+ ModelAndView mav = new ModelAndView("jsonView");
+ mav.addObject("userChk", userVal);
+ return mav;
+ }
+
+ /**
+ * 블로그 정보를 등록한다.
+ *
+ * @param blogVO
+ * @param blog
+ * @param status
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/insertBlogMaster.do")
+ public String insertBlogMaster(@ModelAttribute("searchVO") BlogVO blogVO, @ModelAttribute("blogMaster") Blog blog,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) { //KISA 보안약점 조치 (2018-12-10, 신용호)
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ blogVO.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ BlogVO vo = egovBBSMasterService.checkBlogUser2(blogVO);
+
+ if(vo != null) {
+ model.addAttribute("blogMasterVO", new BlogVO());
+ model.addAttribute("message", egovMessageSource.getMessage("comCopBlog.validate.blogUserCheck"));
+ return "egovframework/com/cop/bbs/EgovBlogRegist";
+ }
+
+ beanValidator.validate(blog, bindingResult);
+
+ if (bindingResult.hasErrors()) {
+ return "egovframework/com/cop/bbs/EgovBlogRegist";
+ }
+
+ String blogId = idgenServiceBlog.getNextStringId(); //블로그 아이디 채번
+ String bbsId = idgenServiceBbs.getNextStringId(); //게시판 아이디 채번
+
+ blog.setRegistSeCode("REGC02");
+ blog.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ blog.setBbsId(bbsId);
+ blog.setBlogId(blogId);
+ blog.setBlogAt("Y");
+ egovBBSMasterService.insertBlogMaster(blog);
+
+ if (isAuthenticated) {
+ //블로그 개설자의 정보를 등록한다.
+ BlogUserVO blogUserVO = new BlogUserVO();
+ blogUserVO.setBlogId(blogId);
+ blogUserVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ blogUserVO.setMngrAt("Y");
+ blogUserVO.setMberSttus("P");
+ blogUserVO.setUseAt("Y");
+ blogUserVO.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ egovBBSMasterService.insertBoardBlogUserRqst(blogUserVO);
+ }
+ return "forward:/cop/bbs/selectBlogList.do";
+ }
+
+ /**
+ * 게시판 마스터 상세내용을 조회한다.
+ *
+ * @param boardMasterVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectBBSMasterDetail.do")
+ public String selectBBSMasterDetail(@ModelAttribute("searchVO") BoardMasterVO searchVO, ModelMap model) throws Exception {
+ BoardMasterVO vo = egovBBSMasterService.selectBBSMasterInf(searchVO);
+ model.addAttribute("result", vo);
+
+ //---------------------------------
+ // 2011.09.15 : 2단계 기능 추가 반영 방법 변경
+ //---------------------------------
+
+ if(EgovComponentChecker.hasComponent("EgovArticleCommentService")){
+ model.addAttribute("useComment", "true");
+ }
+ if(EgovComponentChecker.hasComponent("EgovBBSSatisfactionService")){
+ model.addAttribute("useSatisfaction", "true");
+ }
+
+ return "egovframework/com/cop/bbs/EgovBBSMasterDetail";
+ }
+
+ /**
+ * 게시판 마스터정보를 수정하기 위한 전 처리
+ * @param bbsId
+ * @param searchVO
+ * @param model
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/updateBBSMasterView.do")
+ public String updateBBSMasterView(@RequestParam("bbsId") String bbsId ,
+ @ModelAttribute("searchVO") BoardMaster searchVO, ModelMap model)
+ throws Exception {
+
+
+ BoardMasterVO boardMasterVO = new BoardMasterVO();
+
+
+ //게시판유형코드
+ ComDefaultCodeVO vo = new ComDefaultCodeVO();
+ vo.setCodeId("COM101");
+ List> codeResult = cmmUseService.selectCmmCodeDetail(vo);
+ model.addAttribute("bbsTyCode", codeResult);
+
+ // Primary Key 값 세팅
+ boardMasterVO.setBbsId(bbsId);
+
+ model.addAttribute("boardMasterVO", egovBBSMasterService.selectBBSMasterInf(boardMasterVO));
+
+ //---------------------------------
+ // 2011.09.15 : 2단계 기능 추가 반영 방법 변경
+ //---------------------------------
+
+ if(EgovComponentChecker.hasComponent("EgovArticleCommentService")){
+ model.addAttribute("useComment", "true");
+ }
+ if(EgovComponentChecker.hasComponent("EgovBBSSatisfactionService")){
+ model.addAttribute("useSatisfaction", "true");
+ }
+
+ return "egovframework/com/cop/bbs/EgovBBSMasterUpdt";
+ }
+
+
+ /**
+ * 게시판 마스터 정보를 수정한다.
+ *
+ * @param boardMasterVO
+ * @param boardMaster
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/updateBBSMaster.do")
+ public String updateBBSMaster(@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, @ModelAttribute("boardMaster") BoardMaster boardMaster,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ beanValidator.validate(boardMaster, bindingResult);
+ if (bindingResult.hasErrors()) {
+ BoardMasterVO vo = egovBBSMasterService.selectBBSMasterInf(boardMasterVO);
+
+ model.addAttribute("result", vo);
+
+ ComDefaultCodeVO comVo = new ComDefaultCodeVO();
+ comVo.setCodeId("COM101");
+ List> codeResult = cmmUseService.selectCmmCodeDetail(comVo);
+ model.addAttribute("bbsTyCode", codeResult);
+
+ return "egovframework/com/cop/bbs/EgovBBSMasterUpdt";
+ }
+
+ if (isAuthenticated) {
+ boardMaster.setLastUpdusrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ egovBBSMasterService.updateBBSMasterInf(boardMaster);
+ }
+
+ return "forward:/cop/bbs/selectBBSMasterInfs.do";
+ }
+
+ /**
+ * 게시판 마스터 정보를 삭제한다.
+ *
+ * @param boardMasterVO
+ * @param boardMaster
+ * @param status
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/deleteBBSMaster.do")
+ public String deleteBBSMaster(@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, @ModelAttribute("boardMaster") BoardMaster boardMaster
+ ) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if (isAuthenticated) {
+ boardMaster.setLastUpdusrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ egovBBSMasterService.deleteBBSMasterInf(boardMaster);
+ }
+ // status.setComplete();
+ return "forward:/cop/bbs/selectBBSMasterInfs.do";
+ }
+
+ /**
+ * 포트릿을 위한 블로그 목록 정보를 조회한다.
+ *
+ * @param blogVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectBlogListPortlet.do")
+ public String selectBlogListPortlet(@ModelAttribute("searchVO") BlogVO blogVO, ModelMap model) throws Exception {
+ List result = egovBBSMasterService.selectBlogListPortlet(blogVO);
+
+ model.addAttribute("resultList", result);
+
+ return "egovframework/com/cop/bbs/EgovBlogListPortlet";
+ }
+
+ /**
+ * 포트릿을 위한 게시판 목록 정보를 조회한다.
+ *
+ * @param blogVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/bbs/selectBBSListPortlet.do")
+ public String selectBBSListPortlet(@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, ModelMap model) throws Exception {
+ List result = egovBBSMasterService.selectBBSListPortlet(boardMasterVO);
+
+ model.addAttribute("resultList", result);
+
+ return "egovframework/com/cop/bbs/EgovBBSListPortlet";
+ }
+
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmt/service/Comment.java b/src/main/java/egovframework/com/cop/cmt/service/Comment.java
new file mode 100644
index 0000000..20ff495
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmt/service/Comment.java
@@ -0,0 +1,297 @@
+package egovframework.com.cop.cmt.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 댓글관리 서비스 데이터 처리 모델
+ * @author 공통컴포넌트개발팀 한성곤
+ * @since 2009.06.29
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.06.29 한성곤 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class Comment implements Serializable {
+ /** 댓글번호 */
+ private String commentNo = "";
+
+ /** 게시판 ID */
+ private String bbsId = "";
+
+ /** 게시물 번호 */
+ private long nttId = 0L;
+
+ /** 작성자 ID */
+ private String wrterId = "";
+
+ /** 작성자명 */
+ private String wrterNm = "";
+
+ /** 패스워드 */
+ private String commentPassword = "";
+
+ /** 댓글 내용 */
+ private String commentCn = "";
+
+ /** 사용 여부 */
+ private String useAt = "";
+
+ /** 최초등록자 아이디 */
+ private String frstRegisterId = "";
+
+ /** 최초 등록자명 */
+ private String frstRegisterNm = "";
+
+ /** 최초등록시점 */
+ private String frstRegisterPnttm = "";
+
+ /** 최종수정자 아이디 */
+ private String lastUpdusrId = "";
+
+ /** 최종수정시점 */
+ private String lastUpdusrPnttm = "";
+
+ /** 확인 패스워드 */
+ private String confirmPassword = "";
+
+ /**
+ * commentNo attribute를 리턴한다.
+ * @return the commentNo
+ */
+ public String getCommentNo() {
+ return commentNo;
+ }
+
+ /**
+ * commentNo attribute 값을 설정한다.
+ * @param commentNo the commentNo to set
+ */
+ public void setCommentNo(String commentNo) {
+ this.commentNo = commentNo;
+ }
+
+ /**
+ * bbsId attribute를 리턴한다.
+ * @return the bbsId
+ */
+ public String getBbsId() {
+ return bbsId;
+ }
+
+ /**
+ * bbsId attribute 값을 설정한다.
+ * @param bbsId the bbsId to set
+ */
+ public void setBbsId(String bbsId) {
+ this.bbsId = bbsId;
+ }
+
+ /**
+ * nttId attribute를 리턴한다.
+ * @return the nttId
+ */
+ public long getNttId() {
+ return nttId;
+ }
+
+ /**
+ * nttId attribute 값을 설정한다.
+ * @param nttId the nttId to set
+ */
+ public void setNttId(long nttId) {
+ this.nttId = nttId;
+ }
+
+ /**
+ * wrterId attribute를 리턴한다.
+ * @return the wrterId
+ */
+ public String getWrterId() {
+ return wrterId;
+ }
+
+ /**
+ * wrterId attribute 값을 설정한다.
+ * @param wrterId the wrterId to set
+ */
+ public void setWrterId(String wrterId) {
+ this.wrterId = wrterId;
+ }
+
+ /**
+ * wrterNm attribute를 리턴한다.
+ * @return the wrterNm
+ */
+ public String getWrterNm() {
+ return wrterNm;
+ }
+
+ /**
+ * wrterNm attribute 값을 설정한다.
+ * @param wrterNm the wrterNm to set
+ */
+ public void setWrterNm(String wrterNm) {
+ this.wrterNm = wrterNm;
+ }
+
+ /**
+ * commentPassword attribute를 리턴한다.
+ * @return the commentPassword
+ */
+ public String getCommentPassword() {
+ return commentPassword;
+ }
+
+ /**
+ * commentPassword attribute 값을 설정한다.
+ * @param commentPassword the commentPassword to set
+ */
+ public void setCommentPassword(String commentPassword) {
+ this.commentPassword = commentPassword;
+ }
+
+ /**
+ * commentCn attribute를 리턴한다.
+ * @return the commentCn
+ */
+ public String getCommentCn() {
+ return commentCn;
+ }
+
+ /**
+ * commentCn attribute 값을 설정한다.
+ * @param commentCn the commentCn to set
+ */
+ public void setCommentCn(String commentCn) {
+ this.commentCn = commentCn;
+ }
+
+ /**
+ * useAt attribute를 리턴한다.
+ * @return the useAt
+ */
+ public String getUseAt() {
+ return useAt;
+ }
+
+ /**
+ * useAt attribute 값을 설정한다.
+ * @param useAt the useAt to set
+ */
+ public void setUseAt(String useAt) {
+ this.useAt = useAt;
+ }
+
+ /**
+ * frstRegisterId attribute를 리턴한다.
+ * @return the frstRegisterId
+ */
+ public String getFrstRegisterId() {
+ return frstRegisterId;
+ }
+
+ /**
+ * frstRegisterId attribute 값을 설정한다.
+ * @param frstRegisterId the frstRegisterId to set
+ */
+ public void setFrstRegisterId(String frstRegisterId) {
+ this.frstRegisterId = frstRegisterId;
+ }
+
+ /**
+ * frstRegisterPnttm attribute를 리턴한다.
+ * @return the frstRegisterPnttm
+ */
+ public String getFrstRegisterPnttm() {
+ return frstRegisterPnttm;
+ }
+
+ /**
+ * frstRegisterPnttm attribute 값을 설정한다.
+ * @param frstRegisterPnttm the frstRegisterPnttm to set
+ */
+ public void setFrstRegisterPnttm(String frstRegisterPnttm) {
+ this.frstRegisterPnttm = frstRegisterPnttm;
+ }
+
+ /**
+ * lastUpdusrId attribute를 리턴한다.
+ * @return the lastUpdusrId
+ */
+ public String getLastUpdusrId() {
+ return lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrId attribute 값을 설정한다.
+ * @param lastUpdusrId the lastUpdusrId to set
+ */
+ public void setLastUpdusrId(String lastUpdusrId) {
+ this.lastUpdusrId = lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute를 리턴한다.
+ * @return the lastUpdusrPnttm
+ */
+ public String getLastUpdusrPnttm() {
+ return lastUpdusrPnttm;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute 값을 설정한다.
+ * @param lastUpdusrPnttm the lastUpdusrPnttm to set
+ */
+ public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
+ this.lastUpdusrPnttm = lastUpdusrPnttm;
+ }
+
+ /**
+ * frstRegisterNm attribute를 리턴한다.
+ * @return the frstRegisterNm
+ */
+ public String getFrstRegisterNm() {
+ return frstRegisterNm;
+ }
+
+ /**
+ * frstRegisterNm attribute 값을 설정한다.
+ * @param frstRegisterNm the frstRegisterNm to set
+ */
+ public void setFrstRegisterNm(String frstRegisterNm) {
+ this.frstRegisterNm = frstRegisterNm;
+ }
+
+ /**
+ * confirmPassword attribute를 리턴한다.
+ * @return the confirmPassword
+ */
+ public String getConfirmPassword() {
+ return confirmPassword;
+ }
+
+ /**
+ * confirmPassword attribute 값을 설정한다.
+ * @param confirmPassword the confirmPassword to set
+ */
+ public void setConfirmPassword(String confirmPassword) {
+ this.confirmPassword = confirmPassword;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/cmt/service/CommentVO.java b/src/main/java/egovframework/com/cop/cmt/service/CommentVO.java
new file mode 100644
index 0000000..7ee4501
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmt/service/CommentVO.java
@@ -0,0 +1,219 @@
+package egovframework.com.cop.cmt.service;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 댓글관리 서비스를 위한 VO 클래스
+ * @author 공통컴포넌트개발팀 한성곤
+ * @since 2009.06.29
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.06.29 한성곤 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class CommentVO extends Comment {
+ /** 정렬순서(DESC,ASC) */
+ private long sortOrdr = 0L;
+
+ /** 현재페이지 */
+ private int subPageIndex = 1;
+
+ /** 페이지갯수 */
+ private int subPageUnit = 5;
+
+ /** 페이지사이즈 */
+ private int subPageSize = 5;
+
+ /** 첫페이지 인덱스 */
+ private int subFirstIndex = 1;
+
+ /** 마지막페이지 인덱스 */
+ private int subLastIndex = 1;
+
+ /** 페이지당 레코드 개수 */
+ private int subRecordCountPerPage = 5;
+
+ /** 레코드 번호 */
+ private int subRowNo = 0;
+
+ /** 호출 TYPE (head or body)*/
+ private String type = "";
+
+ /** 수정 처리 여부 */
+ private boolean isModified = false;
+
+ /**
+ * sortOrdr attribute를 리턴한다.
+ * @return the sortOrdr
+ */
+ public long getSortOrdr() {
+ return sortOrdr;
+ }
+
+ /**
+ * sortOrdr attribute 값을 설정한다.
+ * @param sortOrdr the sortOrdr to set
+ */
+ public void setSortOrdr(long sortOrdr) {
+ this.sortOrdr = sortOrdr;
+ }
+
+ /**
+ * subPageIndex attribute를 리턴한다.
+ * @return the subPageIndex
+ */
+ public int getSubPageIndex() {
+ return subPageIndex;
+ }
+
+ /**
+ * subPageIndex attribute 값을 설정한다.
+ * @param subPageIndex the subPageIndex to set
+ */
+ public void setSubPageIndex(int subPageIndex) {
+ this.subPageIndex = subPageIndex;
+ }
+
+ /**
+ * subPageUnit attribute를 리턴한다.
+ * @return the subPageUnit
+ */
+ public int getSubPageUnit() {
+ return subPageUnit;
+ }
+
+ /**
+ * subPageUnit attribute 값을 설정한다.
+ * @param subPageUnit the subPageUnit to set
+ */
+ public void setSubPageUnit(int subPageUnit) {
+ this.subPageUnit = subPageUnit;
+ }
+
+ /**
+ * subPageSize attribute를 리턴한다.
+ * @return the subPageSize
+ */
+ public int getSubPageSize() {
+ return subPageSize;
+ }
+
+ /**
+ * subPageSize attribute 값을 설정한다.
+ * @param subPageSize the subPageSize to set
+ */
+ public void setSubPageSize(int subPageSize) {
+ this.subPageSize = subPageSize;
+ }
+
+ /**
+ * subFirstIndex attribute를 리턴한다.
+ * @return the subFirstIndex
+ */
+ public int getSubFirstIndex() {
+ return subFirstIndex;
+ }
+
+ /**
+ * subFirstIndex attribute 값을 설정한다.
+ * @param subFirstIndex the subFirstIndex to set
+ */
+ public void setSubFirstIndex(int subFirstIndex) {
+ this.subFirstIndex = subFirstIndex;
+ }
+
+ /**
+ * subLastIndex attribute를 리턴한다.
+ * @return the subLastIndex
+ */
+ public int getSubLastIndex() {
+ return subLastIndex;
+ }
+
+ /**
+ * subLastIndex attribute 값을 설정한다.
+ * @param subLastIndex the subLastIndex to set
+ */
+ public void setSubLastIndex(int subLastIndex) {
+ this.subLastIndex = subLastIndex;
+ }
+
+ /**
+ * subRecordCountPerPage attribute를 리턴한다.
+ * @return the subRecordCountPerPage
+ */
+ public int getSubRecordCountPerPage() {
+ return subRecordCountPerPage;
+ }
+
+ /**
+ * subRecordCountPerPage attribute 값을 설정한다.
+ * @param subRecordCountPerPage the subRecordCountPerPage to set
+ */
+ public void setSubRecordCountPerPage(int subRecordCountPerPage) {
+ this.subRecordCountPerPage = subRecordCountPerPage;
+ }
+
+ /**
+ * subRowNo attribute를 리턴한다.
+ * @return the subRowNo
+ */
+ public int getSubRowNo() {
+ return subRowNo;
+ }
+
+ /**
+ * subRowNo attribute 값을 설정한다.
+ * @param subRowNo the subRowNo to set
+ */
+ public void setSubRowNo(int subRowNo) {
+ this.subRowNo = subRowNo;
+ }
+
+ /**
+ * type attribute를 리턴한다.
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * type attribute 값을 설정한다.
+ * @param type the type to set
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * isModified attribute를 리턴한다.
+ * @return the isModified
+ */
+ public boolean isModified() {
+ return isModified;
+ }
+
+ /**
+ * isModified attribute 값을 설정한다.
+ * @param isModified the isModified to set
+ */
+ public void setModified(boolean isModified) {
+ this.isModified = isModified;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/cmt/service/EgovArticleCommentService.java b/src/main/java/egovframework/com/cop/cmt/service/EgovArticleCommentService.java
new file mode 100644
index 0000000..e1df72e
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmt/service/EgovArticleCommentService.java
@@ -0,0 +1,21 @@
+package egovframework.com.cop.cmt.service;
+
+import java.util.Map;
+
+import org.egovframe.rte.fdl.cmmn.exception.FdlException;
+
+public interface EgovArticleCommentService {
+
+ public boolean canUseComment(String bbsId) throws Exception;
+
+ Map selectArticleCommentList(CommentVO commentVO);
+
+ void insertArticleComment(Comment comment) throws FdlException;
+
+ void deleteArticleComment(CommentVO commentVO);
+
+ CommentVO selectArticleCommentDetail(CommentVO commentVO);
+
+ void updateArticleComment(Comment comment);
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmt/service/impl/EgovArticleCommentDAO.java b/src/main/java/egovframework/com/cop/cmt/service/impl/EgovArticleCommentDAO.java
new file mode 100644
index 0000000..c07f75f
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmt/service/impl/EgovArticleCommentDAO.java
@@ -0,0 +1,38 @@
+package egovframework.com.cop.cmt.service.impl;
+
+import java.util.List;
+
+import org.springframework.stereotype.Repository;
+
+import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
+import egovframework.com.cop.cmt.service.Comment;
+import egovframework.com.cop.cmt.service.CommentVO;
+
+@Repository("EgovArticleCommentDAO")
+public class EgovArticleCommentDAO extends EgovComAbstractDAO{
+
+ public List> selectArticleCommentList(CommentVO commentVO) {
+ return list("ArticleComment.selectArticleCommentList", commentVO);
+ }
+
+ public int selectArticleCommentListCnt(CommentVO commentVO) {
+ return (Integer)selectOne("ArticleComment.selectArticleCommentListCnt", commentVO);
+ }
+
+ public void insertArticleComment(Comment comment) {
+ insert("ArticleComment.insertArticleComment", comment);
+ }
+
+ public void deleteArticleComment(CommentVO commentVO) {
+ update("ArticleComment.deleteArticleComment", commentVO);
+ }
+
+ public CommentVO selectArticleCommentDetail(CommentVO commentVO) {
+ return (CommentVO) selectOne("ArticleComment.selectArticleCommentDetail", commentVO);
+ }
+
+ public void updateArticleComment(Comment comment) {
+ update("ArticleComment.updateArticleComment", comment);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmt/service/impl/EgovArticleCommentServiceImpl.java b/src/main/java/egovframework/com/cop/cmt/service/impl/EgovArticleCommentServiceImpl.java
new file mode 100644
index 0000000..db565a3
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmt/service/impl/EgovArticleCommentServiceImpl.java
@@ -0,0 +1,95 @@
+package egovframework.com.cop.cmt.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+import egovframework.com.cop.bbs.service.BoardMaster;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.bbs.service.impl.BBSAddedOptionsDAO;
+import egovframework.com.cop.cmt.service.Comment;
+import egovframework.com.cop.cmt.service.CommentVO;
+import egovframework.com.cop.cmt.service.EgovArticleCommentService;
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import org.egovframe.rte.fdl.cmmn.exception.FdlException;
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+
+@Service("EgovArticleCommentService")
+public class EgovArticleCommentServiceImpl extends EgovAbstractServiceImpl implements EgovArticleCommentService {
+
+ @Resource(name = "BBSAddedOptionsDAO")
+ private BBSAddedOptionsDAO addedOptionsDAO;
+
+ @Resource(name = "EgovArticleCommentDAO")
+ private EgovArticleCommentDAO egovArticleCommentDao;
+
+ @Resource(name = "egovAnswerNoGnrService")
+ private EgovIdGnrService egovAnswerNoGnrService;
+
+ /**
+ * 댓글 사용 가능 여부를 확인한다.
+ */
+ public boolean canUseComment(String bbsId) throws Exception {
+ //String flag = EgovProperties.getProperty("Globals.addedOptions");
+ //if (flag != null && flag.trim().equalsIgnoreCase("true")) {//2011.09.15
+ BoardMaster vo = new BoardMaster();
+
+ vo.setBbsId(bbsId);
+
+ BoardMasterVO options = addedOptionsDAO.selectAddedOptionsInf(vo);
+
+ if (options == null) {
+ return false;
+ }
+
+ if (options.getCommentAt().equals("Y")) {
+ return true;
+ }
+ //}
+
+ return false;
+ }
+
+ @Override
+ public Map selectArticleCommentList(CommentVO commentVO) {
+ List> result = egovArticleCommentDao.selectArticleCommentList(commentVO);
+ int cnt = egovArticleCommentDao.selectArticleCommentListCnt(commentVO);
+
+ Map map = new HashMap();
+
+ map.put("resultList", result);
+ map.put("resultCnt", Integer.toString(cnt));
+
+ return map;
+ }
+
+
+ @Override
+ public void insertArticleComment(Comment comment) throws FdlException {
+ comment.setCommentNo(egovAnswerNoGnrService.getNextLongId() + "");//2011.10.18
+ egovArticleCommentDao.insertArticleComment(comment);
+ }
+
+
+ @Override
+ public void deleteArticleComment(CommentVO commentVO) {
+ egovArticleCommentDao.deleteArticleComment(commentVO);
+ }
+
+
+ @Override
+ public CommentVO selectArticleCommentDetail(CommentVO commentVO) {
+ return egovArticleCommentDao.selectArticleCommentDetail(commentVO);
+ }
+
+
+ @Override
+ public void updateArticleComment(Comment comment) {
+ egovArticleCommentDao.updateArticleComment(comment);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmt/web/EgovArticleCommentController.java b/src/main/java/egovframework/com/cop/cmt/web/EgovArticleCommentController.java
new file mode 100644
index 0000000..dddbd1b
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmt/web/EgovArticleCommentController.java
@@ -0,0 +1,298 @@
+package egovframework.com.cop.cmt.web;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springmodules.validation.commons.DefaultBeanValidator;
+
+import egovframework.com.cmm.EgovMessageSource;
+import egovframework.com.cmm.LoginVO;
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+import egovframework.com.cop.cmt.service.Comment;
+import egovframework.com.cop.cmt.service.CommentVO;
+import egovframework.com.cop.cmt.service.EgovArticleCommentService;
+import egovframework.com.utl.fcc.service.EgovStringUtil;
+import org.egovframe.rte.fdl.property.EgovPropertyService;
+import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
+
+/**
+ * 댓글 관리를 위한 컨트롤러 클래스
+ * @author 공통서비스개발팀 신용호
+ * @since 2016.07.22
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2016.07.22 신용호 최초 생성
+ * 2018.06.27 신용호 댓글 등록후 처리 예외 수정
+ *
+ */
+
+@Controller
+public class EgovArticleCommentController {
+
+ @Resource(name = "EgovArticleCommentService")
+ protected EgovArticleCommentService egovArticleCommentService;
+
+ @Resource(name="propertiesService")
+ protected EgovPropertyService propertyService;
+
+ @Resource(name="egovMessageSource")
+ EgovMessageSource egovMessageSource;
+
+ @Autowired
+ private DefaultBeanValidator beanValidator;
+
+ //protected Logger log = Logger.getLogger(this.getClass());
+
+ /**
+ * 댓글관리 목록 조회를 제공한다.
+ *
+ * @param boardVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmt/selectArticleCommentList.do")
+ public String selectArticleCommentList(@ModelAttribute("searchVO") CommentVO commentVO, ModelMap model) throws Exception {
+
+ CommentVO articleCommentVO = new CommentVO();
+
+ // 수정 처리된 후 댓글 등록 화면으로 처리되기 위한 구현
+ if (commentVO.isModified()) {
+ commentVO.setCommentNo("");
+ commentVO.setCommentCn("");
+ }
+
+ // 수정을 위한 처리
+ if (!commentVO.getCommentNo().equals("")) {
+ return "forward:/cop/cmt/updateArticleCommentView.do";
+ }
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ model.addAttribute("sessionUniqId", user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ commentVO.setWrterNm(user == null ? "" : EgovStringUtil.isNullToString(user.getName()));
+
+// commentVO.setSubPageUnit(propertyService.getInt("pageUnit"));
+// commentVO.setSubPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+ paginationInfo.setCurrentPageNo(commentVO.getSubPageIndex());
+ paginationInfo.setRecordCountPerPage(commentVO.getSubPageUnit());
+ paginationInfo.setPageSize(commentVO.getSubPageSize());
+
+ commentVO.setSubFirstIndex(paginationInfo.getFirstRecordIndex());
+ commentVO.setSubLastIndex(paginationInfo.getLastRecordIndex());
+ commentVO.setSubRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovArticleCommentService.selectArticleCommentList(commentVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("paginationInfo", paginationInfo);
+ model.addAttribute("type", "body"); // 댓글 페이지 body import용
+
+ model.addAttribute("articleCommentVO", articleCommentVO); // validator 용도
+
+ commentVO.setCommentCn(""); // 등록 후 댓글 내용 처리
+
+ return "egovframework/com/cop/cmt/EgovArticleCommentList";
+ }
+
+
+ /**
+ * 댓글을 등록한다.
+ *
+ * @param commentVO
+ * @param comment
+ * @param bindingResult
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmt/insertArticleComment.do")
+ public String insertArticleComment(@ModelAttribute("searchVO") CommentVO commentVO, @ModelAttribute("comment") Comment comment,
+ BindingResult bindingResult, ModelMap model, @RequestParam HashMap map) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ beanValidator.validate(comment, bindingResult);
+ if (bindingResult.hasErrors()) {
+ model.addAttribute("msg", "댓글내용은 필수 입력값입니다.");
+
+ return "forward:/cop/bbs/selectArticleDetail.do";
+ }
+
+ if (isAuthenticated) {
+ comment.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ comment.setWrterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ comment.setWrterNm(user == null ? "" : EgovStringUtil.isNullToString(user.getName()));
+
+
+ egovArticleCommentService.insertArticleComment(comment);
+
+ commentVO.setCommentCn("");
+ commentVO.setCommentNo("");
+ }
+
+ String chkBlog = map.get("blogAt");
+
+ if("Y".equals(chkBlog)){
+ return "forward:/cop/bbs/selectArticleBlogList.do";
+ }else{
+ return "forward:/cop/bbs/selectArticleDetail.do";
+ }
+
+ }
+
+
+ /**
+ * 댓글을 삭제한다.
+ *
+ * @param commentVO
+ * @param comment
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmt/deleteArticleComment.do")
+ public String deleteArticleComment(@ModelAttribute("searchVO") CommentVO commentVO, @ModelAttribute("comment") Comment comment,
+ ModelMap model, @RequestParam HashMap map) throws Exception {
+ @SuppressWarnings("unused")
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if (isAuthenticated) {
+ egovArticleCommentService.deleteArticleComment(commentVO);
+ }
+
+ commentVO.setCommentCn("");
+ commentVO.setCommentNo("");
+
+ String chkBlog = map.get("blogAt");
+
+ if("Y".equals(chkBlog)){
+ return "forward:/cop/bbs/selectArticleBlogList.do";
+ }else{
+ return "forward:/cop/bbs/selectArticleDetail.do";
+ }
+ }
+
+
+ /**
+ * 댓글 수정 페이지로 이동한다.
+ *
+ * @param commentVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmt/updateArticleCommentView.do")
+ public String updateArticleCommentView(@ModelAttribute("searchVO") CommentVO commentVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ //KISA 보안취약점 조치 (2018-12-10, 신용호)
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ CommentVO articleCommentVO = new CommentVO();
+
+ commentVO.setWrterNm(user == null ? "" : EgovStringUtil.isNullToString(user.getName()));
+
+ commentVO.setSubPageUnit(propertyService.getInt("pageUnit"));
+ commentVO.setSubPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+ paginationInfo.setCurrentPageNo(commentVO.getSubPageIndex());
+ paginationInfo.setRecordCountPerPage(commentVO.getSubPageUnit());
+ paginationInfo.setPageSize(commentVO.getSubPageSize());
+
+ commentVO.setSubFirstIndex(paginationInfo.getFirstRecordIndex());
+ commentVO.setSubLastIndex(paginationInfo.getLastRecordIndex());
+ commentVO.setSubRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovArticleCommentService.selectArticleCommentList(commentVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("paginationInfo", paginationInfo);
+ model.addAttribute("type", "body"); // body import
+
+ articleCommentVO = egovArticleCommentService.selectArticleCommentDetail(commentVO);
+
+ model.addAttribute("articleCommentVO", articleCommentVO);
+
+
+ return "egovframework/com/cop/cmt/EgovArticleCommentList";
+ }
+
+
+ /**
+ * 댓글을 수정한다.
+ *
+ * @param commentVO
+ * @param comment
+ * @param bindingResult
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmt/updateArticleComment.do")
+ public String updateArticleComment(@ModelAttribute("searchVO") CommentVO commentVO, @ModelAttribute("comment") Comment comment,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ beanValidator.validate(comment, bindingResult);
+ if (bindingResult.hasErrors()) {
+ model.addAttribute("msg", "내용은 필수 입력 값입니다.");
+
+ return "forward:/cop/bbs/selectArticleDetail.do";
+ }
+
+ if (isAuthenticated) {
+ comment.setLastUpdusrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ egovArticleCommentService.updateArticleComment(comment);
+
+ commentVO.setCommentCn("");
+ commentVO.setCommentNo("");
+ }
+
+ return "forward:/cop/bbs/selectArticleDetail.do";
+ }
+
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/Community.java b/src/main/java/egovframework/com/cop/cmy/service/Community.java
new file mode 100644
index 0000000..7ca408a
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/Community.java
@@ -0,0 +1,319 @@
+package egovframework.com.cop.cmy.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 커뮤니티 관리를 위한 모델 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.4.2 이삼섭 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class Community implements Serializable {
+
+ /** 커뮤니티 아이디 */
+ private String cmmntyId = "";
+
+ /** 커뮤니티 소개 */
+ private String cmmntyIntrcn = "";
+
+ /** 커뮤니티 명 */
+ private String cmmntyNm = "";
+
+ /** 최초등록자 아이디 */
+ private String frstRegisterId = "";
+
+ /** 최초등록시점 */
+ private String frstRegisterPnttm = "";
+
+ /** 최종수정자 아이디 */
+ private String lastUpdusrId = "";
+
+ /** 최종수정시점 */
+ private String lastUpdusrPnttm = "";
+
+ /** 등록구분코드 */
+ private String registSeCode = "";
+
+ /** 템플릿 아이디 */
+ private String tmplatId = "";
+
+ /** 템플릿 아이디 */
+ private String useAt = "";
+
+ /** 사용자 아이디 */
+ private String emplyrId = "";
+
+ /** 사용자명 */
+ private String userNm = "";
+
+ /** 템플릿 명 */
+ private String tmplatNm = "";
+
+ /**
+ * cmmntyId attribute를 리턴한다.
+ *
+ * @return the cmmntyId
+ */
+ public String getCmmntyId() {
+ return cmmntyId;
+ }
+
+ /**
+ * cmmntyId attribute 값을 설정한다.
+ *
+ * @param cmmntyId
+ * the cmmntyId to set
+ */
+ public void setCmmntyId(String cmmntyId) {
+ this.cmmntyId = cmmntyId;
+ }
+
+ /**
+ * cmmntyIntrcn attribute를 리턴한다.
+ *
+ * @return the cmmntyIntrcn
+ */
+ public String getCmmntyIntrcn() {
+ return cmmntyIntrcn;
+ }
+
+ /**
+ * cmmntyIntrcn attribute 값을 설정한다.
+ *
+ * @param cmmntyIntrcn
+ * the cmmntyIntrcn to set
+ */
+ public void setCmmntyIntrcn(String cmmntyIntrcn) {
+ this.cmmntyIntrcn = cmmntyIntrcn;
+ }
+
+ /**
+ * cmmntyNm attribute를 리턴한다.
+ *
+ * @return the cmmntyNm
+ */
+ public String getCmmntyNm() {
+ return cmmntyNm;
+ }
+
+ /**
+ * cmmntyNm attribute 값을 설정한다.
+ *
+ * @param cmmntyNm
+ * the cmmntyNm to set
+ */
+ public void setCmmntyNm(String cmmntyNm) {
+ this.cmmntyNm = cmmntyNm;
+ }
+
+ /**
+ * frstRegisterId attribute를 리턴한다.
+ *
+ * @return the frstRegisterId
+ */
+ public String getFrstRegisterId() {
+ return frstRegisterId;
+ }
+
+ /**
+ * frstRegisterId attribute 값을 설정한다.
+ *
+ * @param frstRegisterId
+ * the frstRegisterId to set
+ */
+ public void setFrstRegisterId(String frstRegisterId) {
+ this.frstRegisterId = frstRegisterId;
+ }
+
+ /**
+ * frstRegisterPnttm attribute를 리턴한다.
+ *
+ * @return the frstRegisterPnttm
+ */
+ public String getFrstRegisterPnttm() {
+ return frstRegisterPnttm;
+ }
+
+ /**
+ * frstRegisterPnttm attribute 값을 설정한다.
+ *
+ * @param frstRegisterPnttm
+ * the frstRegisterPnttm to set
+ */
+ public void setFrstRegisterPnttm(String frstRegisterPnttm) {
+ this.frstRegisterPnttm = frstRegisterPnttm;
+ }
+
+ /**
+ * lastUpdusrId attribute를 리턴한다.
+ *
+ * @return the lastUpdusrId
+ */
+ public String getLastUpdusrId() {
+ return lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrId attribute 값을 설정한다.
+ *
+ * @param lastUpdusrId
+ * the lastUpdusrId to set
+ */
+ public void setLastUpdusrId(String lastUpdusrId) {
+ this.lastUpdusrId = lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute를 리턴한다.
+ *
+ * @return the lastUpdusrPnttm
+ */
+ public String getLastUpdusrPnttm() {
+ return lastUpdusrPnttm;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute 값을 설정한다.
+ *
+ * @param lastUpdusrPnttm
+ * the lastUpdusrPnttm to set
+ */
+ public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
+ this.lastUpdusrPnttm = lastUpdusrPnttm;
+ }
+
+ /**
+ * registSeCode attribute를 리턴한다.
+ *
+ * @return the registSeCode
+ */
+ public String getRegistSeCode() {
+ return registSeCode;
+ }
+
+ /**
+ * registSeCode attribute 값을 설정한다.
+ *
+ * @param registSeCode
+ * the registSeCode to set
+ */
+ public void setRegistSeCode(String registSeCode) {
+ this.registSeCode = registSeCode;
+ }
+
+ /**
+ * tmplatId attribute를 리턴한다.
+ *
+ * @return the tmplatId
+ */
+ public String getTmplatId() {
+ return tmplatId;
+ }
+
+ /**
+ * tmplatId attribute 값을 설정한다.
+ *
+ * @param tmplatId
+ * the tmplatId to set
+ */
+ public void setTmplatId(String tmplatId) {
+ this.tmplatId = tmplatId;
+ }
+
+ /**
+ * useAt attribute를 리턴한다.
+ *
+ * @return the useAt
+ */
+ public String getUseAt() {
+ return useAt;
+ }
+
+ /**
+ * useAt attribute 값을 설정한다.
+ *
+ * @param useAt
+ * the useAt to set
+ */
+ public void setUseAt(String useAt) {
+ this.useAt = useAt;
+ }
+
+ /**
+ * emplyrId attribute를 리턴한다.
+ *
+ * @return the emplyrId
+ */
+ public String getEmplyrId() {
+ return emplyrId;
+ }
+
+ /**
+ * emplyrId attribute 값을 설정한다.
+ *
+ * @param emplyrId
+ * the emplyrId to set
+ */
+ public void setEmplyrId(String emplyrId) {
+ this.emplyrId = emplyrId;
+ }
+
+ /**
+ * userNm attribute를 리턴한다.
+ *
+ * @return the userNm
+ */
+ public String getUserNm() {
+ return userNm;
+ }
+
+ /**
+ * userNm attribute 값을 설정한다.
+ *
+ * @param userNm
+ * the userNm to set
+ */
+ public void setUserNm(String userNm) {
+ this.userNm = userNm;
+ }
+
+ /**
+ * tmplatNm attribute를 리턴한다.
+ *
+ * @return the tmplatNm
+ */
+ public String getTmplatNm() {
+ return tmplatNm;
+ }
+
+ /**
+ * tmplatNm attribute 값을 설정한다.
+ *
+ * @param tmplatNm
+ * the tmplatNm to set
+ */
+ public void setTmplatNm(String tmplatNm) {
+ this.tmplatNm = tmplatNm;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/CommunityUser.java b/src/main/java/egovframework/com/cop/cmy/service/CommunityUser.java
new file mode 100644
index 0000000..8224b21
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/CommunityUser.java
@@ -0,0 +1,362 @@
+package egovframework.com.cop.cmy.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 커뮤티니 사용자 관리를 위한 모델 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.4.2 이삼섭 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class CommunityUser implements Serializable {
+
+ /** 커뮤니티아이디 */
+ private String cmmntyId = "";
+
+ /** 최초등록자 아이디 */
+ private String frstRegisterId = "";
+
+ /** 최초등록시점 */
+ private String frstRegisterPnttm = "";
+
+ /** 최종수정자 아이디 */
+ private String lastUpdusrId = "";
+
+ /** 최종수정시점 */
+ private String lastUpdusrPnttm = "";
+
+ /** 관리자여부 */
+ private String mngrAt = "";
+
+ /** 탈퇴일 */
+ private String secsnDe = "";
+
+ /** 가입일 */
+ private String sbscrbDe = "";
+
+ /** 사용여부 */
+ private String useAt = "";
+
+ /** 사용자 아이디 */
+ private String emplyrId = "";
+
+ /** 사용자명 */
+ private String emplyrNm = "";
+
+ /** 회원 ID */
+ private String userId = "";
+
+ /** 회원 이메일 */
+ private String userEmail = "";
+
+ /** 회원 상태 */
+ private String mberSttus = "";
+
+ /** 회원 상태 코드명 */
+ private String mberSttusNm = "";
+
+ /**
+ * cmmntyId attribute를 리턴한다.
+ *
+ * @return the cmmntyId
+ */
+ public String getCmmntyId() {
+ return cmmntyId;
+ }
+
+ /**
+ * cmmntyId attribute 값을 설정한다.
+ *
+ * @param cmmntyId
+ * the cmmntyId to set
+ */
+ public void setCmmntyId(String cmmntyId) {
+ this.cmmntyId = cmmntyId;
+ }
+
+ /**
+ * frstRegisterId attribute를 리턴한다.
+ *
+ * @return the frstRegisterId
+ */
+ public String getFrstRegisterId() {
+ return frstRegisterId;
+ }
+
+ /**
+ * frstRegisterId attribute 값을 설정한다.
+ *
+ * @param frstRegisterId
+ * the frstRegisterId to set
+ */
+ public void setFrstRegisterId(String frstRegisterId) {
+ this.frstRegisterId = frstRegisterId;
+ }
+
+ /**
+ * frstRegisterPnttm attribute를 리턴한다.
+ *
+ * @return the frstRegisterPnttm
+ */
+ public String getFrstRegisterPnttm() {
+ return frstRegisterPnttm;
+ }
+
+ /**
+ * frstRegisterPnttm attribute 값을 설정한다.
+ *
+ * @param frstRegisterPnttm
+ * the frstRegisterPnttm to set
+ */
+ public void setFrstRegisterPnttm(String frstRegisterPnttm) {
+ this.frstRegisterPnttm = frstRegisterPnttm;
+ }
+
+ /**
+ * lastUpdusrId attribute를 리턴한다.
+ *
+ * @return the lastUpdusrId
+ */
+ public String getLastUpdusrId() {
+ return lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrId attribute 값을 설정한다.
+ *
+ * @param lastUpdusrId
+ * the lastUpdusrId to set
+ */
+ public void setLastUpdusrId(String lastUpdusrId) {
+ this.lastUpdusrId = lastUpdusrId;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute를 리턴한다.
+ *
+ * @return the lastUpdusrPnttm
+ */
+ public String getLastUpdusrPnttm() {
+ return lastUpdusrPnttm;
+ }
+
+ /**
+ * lastUpdusrPnttm attribute 값을 설정한다.
+ *
+ * @param lastUpdusrPnttm
+ * the lastUpdusrPnttm to set
+ */
+ public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
+ this.lastUpdusrPnttm = lastUpdusrPnttm;
+ }
+
+ /**
+ * mngrAt attribute를 리턴한다.
+ *
+ * @return the mngrAt
+ */
+ public String getMngrAt() {
+ return mngrAt;
+ }
+
+ /**
+ * mngrAt attribute 값을 설정한다.
+ *
+ * @param mngrAt
+ * the mngrAt to set
+ */
+ public void setMngrAt(String mngrAt) {
+ this.mngrAt = mngrAt;
+ }
+
+ /**
+ * secsnDe attribute를 리턴한다.
+ *
+ * @return the secsnDe
+ */
+ public String getSecsnDe() {
+ return secsnDe;
+ }
+
+ /**
+ * secsnDe attribute 값을 설정한다.
+ *
+ * @param secsnDe
+ * the secsnDe to set
+ */
+ public void setSecsnDe(String secsnDe) {
+ this.secsnDe = secsnDe;
+ }
+
+ /**
+ * sbscrbDe attribute를 리턴한다.
+ *
+ * @return the sbscrbDe
+ */
+ public String getSbscrbDe() {
+ return sbscrbDe;
+ }
+
+ /**
+ * sbscrbDe attribute 값을 설정한다.
+ *
+ * @param sbscrbDe
+ * the sbscrbDe to set
+ */
+ public void setSbscrbDe(String sbscrbDe) {
+ this.sbscrbDe = sbscrbDe;
+ }
+
+ /**
+ * useAt attribute를 리턴한다.
+ *
+ * @return the useAt
+ */
+ public String getUseAt() {
+ return useAt;
+ }
+
+ /**
+ * useAt attribute 값을 설정한다.
+ *
+ * @param useAt
+ * the useAt to set
+ */
+ public void setUseAt(String useAt) {
+ this.useAt = useAt;
+ }
+
+ /**
+ * emplyrId attribute를 리턴한다.
+ *
+ * @return the emplyrId
+ */
+ public String getEmplyrId() {
+ return emplyrId;
+ }
+
+ /**
+ * emplyrId attribute 값을 설정한다.
+ *
+ * @param emplyrId
+ * the emplyrId to set
+ */
+ public void setEmplyrId(String emplyrId) {
+ this.emplyrId = emplyrId;
+ }
+
+ /**
+ * emplyrNm attribute를 리턴한다.
+ *
+ * @return the emplyrNm
+ */
+ public String getEmplyrNm() {
+ return emplyrNm;
+ }
+
+ /**
+ * emplyrNm attribute 값을 설정한다.
+ *
+ * @param emplyrNm
+ * the emplyrNm to set
+ */
+ public void setEmplyrNm(String emplyrNm) {
+ this.emplyrNm = emplyrNm;
+ }
+
+ /**
+ * userId attribute를 리턴한다.
+ *
+ * @return the userId
+ */
+ public String getUserId() {
+ return userId;
+ }
+
+ /**
+ * userId attribute 값을 설정한다.
+ *
+ * @param userId
+ * the userId to set
+ */
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ /**
+ * userEmail attribute를 리턴한다.
+ *
+ * @return the userEmail
+ */
+ public String getUserEmail() {
+ return userEmail;
+ }
+
+ /**
+ * userEmail attribute 값을 설정한다.
+ *
+ * @param userEmail
+ * the userEmail to set
+ */
+ public void setUserEmail(String userEmail) {
+ this.userEmail = userEmail;
+ }
+
+ /**
+ * mberSttus attribute를 리턴한다.
+ *
+ * @return the mberSttus
+ */
+ public String getMberSttus() {
+ return mberSttus;
+ }
+
+ /**
+ * mberSttus attribute 값을 설정한다.
+ *
+ * @param mberSttus
+ * the mberSttus to set
+ */
+ public void setMberSttus(String mberSttus) {
+ this.mberSttus = mberSttus;
+ }
+
+ /**
+ * mberSttusNm attribute를 리턴한다.
+ *
+ * @return the mberSttusNm
+ */
+ public String getMberSttusNm() {
+ return mberSttusNm;
+ }
+
+ /**
+ * mberSttusNm attribute 값을 설정한다.
+ *
+ * @param mberSttusNm
+ * the mberSttusNm to set
+ */
+ public void setMberSttusNm(String mberSttusNm) {
+ this.mberSttusNm = mberSttusNm;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/CommunityUserVO.java b/src/main/java/egovframework/com/cop/cmy/service/CommunityUserVO.java
new file mode 100644
index 0000000..4d4fb40
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/CommunityUserVO.java
@@ -0,0 +1,319 @@
+package egovframework.com.cop.cmy.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+
+/**
+ * 커뮤티니 사용자 관리를 위한 VO 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.4.2 이삼섭 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class CommunityUserVO extends CommunityUser implements Serializable {
+
+ /** 검색시작일 */
+ private String searchBgnDe = "";
+
+ /** 검색조건 */
+ private String searchCnd = "";
+
+ /** 검색종료일 */
+ private String searchEndDe = "";
+
+ /** 검색단어 */
+ private String searchWrd = "";
+
+ /** 정렬순서(DESC,ASC) */
+ private long sortOrdr = 0L;
+
+ /** 검색사용여부 */
+ private String searchUseYn = "";
+
+ /** 현재페이지 */
+ private int pageIndex = 1;
+
+ /** 페이지갯수 */
+ private int pageUnit = 10;
+
+ /** 페이지사이즈 */
+ private int pageSize = 10;
+
+ /** 첫페이지 인덱스 */
+ private int firstIndex = 1;
+
+ /** 마지막페이지 인덱스 */
+ private int lastIndex = 1;
+
+ /** 페이지당 레코드 개수 */
+ private int recordCountPerPage = 10;
+
+ /** 레코드 번호 */
+ private int rowNo = 0;
+
+ /**
+ * searchBgnDe attribute를 리턴한다.
+ *
+ * @return the searchBgnDe
+ */
+ public String getSearchBgnDe() {
+ return searchBgnDe;
+ }
+
+ /**
+ * searchBgnDe attribute 값을 설정한다.
+ *
+ * @param searchBgnDe
+ * the searchBgnDe to set
+ */
+ public void setSearchBgnDe(String searchBgnDe) {
+ this.searchBgnDe = searchBgnDe;
+ }
+
+ /**
+ * searchCnd attribute를 리턴한다.
+ *
+ * @return the searchCnd
+ */
+ public String getSearchCnd() {
+ return searchCnd;
+ }
+
+ /**
+ * searchCnd attribute 값을 설정한다.
+ *
+ * @param searchCnd
+ * the searchCnd to set
+ */
+ public void setSearchCnd(String searchCnd) {
+ this.searchCnd = searchCnd;
+ }
+
+ /**
+ * searchEndDe attribute를 리턴한다.
+ *
+ * @return the searchEndDe
+ */
+ public String getSearchEndDe() {
+ return searchEndDe;
+ }
+
+ /**
+ * searchEndDe attribute 값을 설정한다.
+ *
+ * @param searchEndDe
+ * the searchEndDe to set
+ */
+ public void setSearchEndDe(String searchEndDe) {
+ this.searchEndDe = searchEndDe;
+ }
+
+ /**
+ * searchWrd attribute를 리턴한다.
+ *
+ * @return the searchWrd
+ */
+ public String getSearchWrd() {
+ return searchWrd;
+ }
+
+ /**
+ * searchWrd attribute 값을 설정한다.
+ *
+ * @param searchWrd
+ * the searchWrd to set
+ */
+ public void setSearchWrd(String searchWrd) {
+ this.searchWrd = searchWrd;
+ }
+
+ /**
+ * sortOrdr attribute를 리턴한다.
+ *
+ * @return the sortOrdr
+ */
+ public long getSortOrdr() {
+ return sortOrdr;
+ }
+
+ /**
+ * sortOrdr attribute 값을 설정한다.
+ *
+ * @param sortOrdr
+ * the sortOrdr to set
+ */
+ public void setSortOrdr(long sortOrdr) {
+ this.sortOrdr = sortOrdr;
+ }
+
+ /**
+ * searchUseYn attribute를 리턴한다.
+ *
+ * @return the searchUseYn
+ */
+ public String getSearchUseYn() {
+ return searchUseYn;
+ }
+
+ /**
+ * searchUseYn attribute 값을 설정한다.
+ *
+ * @param searchUseYn
+ * the searchUseYn to set
+ */
+ public void setSearchUseYn(String searchUseYn) {
+ this.searchUseYn = searchUseYn;
+ }
+
+ /**
+ * pageIndex attribute를 리턴한다.
+ *
+ * @return the pageIndex
+ */
+ public int getPageIndex() {
+ return pageIndex;
+ }
+
+ /**
+ * pageIndex attribute 값을 설정한다.
+ *
+ * @param pageIndex
+ * the pageIndex to set
+ */
+ public void setPageIndex(int pageIndex) {
+ this.pageIndex = pageIndex;
+ }
+
+ /**
+ * pageUnit attribute를 리턴한다.
+ *
+ * @return the pageUnit
+ */
+ public int getPageUnit() {
+ return pageUnit;
+ }
+
+ /**
+ * pageUnit attribute 값을 설정한다.
+ *
+ * @param pageUnit
+ * the pageUnit to set
+ */
+ public void setPageUnit(int pageUnit) {
+ this.pageUnit = pageUnit;
+ }
+
+ /**
+ * pageSize attribute를 리턴한다.
+ *
+ * @return the pageSize
+ */
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ /**
+ * pageSize attribute 값을 설정한다.
+ *
+ * @param pageSize
+ * the pageSize to set
+ */
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ /**
+ * firstIndex attribute를 리턴한다.
+ *
+ * @return the firstIndex
+ */
+ public int getFirstIndex() {
+ return firstIndex;
+ }
+
+ /**
+ * firstIndex attribute 값을 설정한다.
+ *
+ * @param firstIndex
+ * the firstIndex to set
+ */
+ public void setFirstIndex(int firstIndex) {
+ this.firstIndex = firstIndex;
+ }
+
+ /**
+ * lastIndex attribute를 리턴한다.
+ *
+ * @return the lastIndex
+ */
+ public int getLastIndex() {
+ return lastIndex;
+ }
+
+ /**
+ * lastIndex attribute 값을 설정한다.
+ *
+ * @param lastIndex
+ * the lastIndex to set
+ */
+ public void setLastIndex(int lastIndex) {
+ this.lastIndex = lastIndex;
+ }
+
+ /**
+ * recordCountPerPage attribute를 리턴한다.
+ *
+ * @return the recordCountPerPage
+ */
+ public int getRecordCountPerPage() {
+ return recordCountPerPage;
+ }
+
+ /**
+ * recordCountPerPage attribute 값을 설정한다.
+ *
+ * @param recordCountPerPage
+ * the recordCountPerPage to set
+ */
+ public void setRecordCountPerPage(int recordCountPerPage) {
+ this.recordCountPerPage = recordCountPerPage;
+ }
+
+ /**
+ * rowNo attribute를 리턴한다.
+ *
+ * @return the rowNo
+ */
+ public int getRowNo() {
+ return rowNo;
+ }
+
+ /**
+ * rowNo attribute 값을 설정한다.
+ *
+ * @param rowNo
+ * the rowNo to set
+ */
+ public void setRowNo(int rowNo) {
+ this.rowNo = rowNo;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/CommunityVO.java b/src/main/java/egovframework/com/cop/cmy/service/CommunityVO.java
new file mode 100644
index 0000000..4496d8b
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/CommunityVO.java
@@ -0,0 +1,425 @@
+package egovframework.com.cop.cmy.service;
+
+import java.io.Serializable;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 커뮤니티 관리를 위한 VO 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.4.2 이삼섭 최초 생성
+ *
+ *
+ */
+@SuppressWarnings("serial")
+public class CommunityVO extends Community implements Serializable {
+
+ /** 검색시작일 */
+ private String searchBgnDe = "";
+
+ /** 검색조건 */
+ private String searchCnd = "";
+
+ /** 검색종료일 */
+ private String searchEndDe = "";
+
+ /** 검색단어 */
+ private String searchWrd = "";
+
+ /** 정렬순서(DESC,ASC) */
+ private long sortOrdr = 0L;
+
+ /** 검색사용여부 */
+ private String searchUseYn = "";
+
+ /** 현재페이지 */
+ private int pageIndex = 1;
+
+ /** 페이지갯수 */
+ private int pageUnit = 10;
+
+ /** 페이지사이즈 */
+ private int pageSize = 10;
+
+ /** 첫페이지 인덱스 */
+ private int firstIndex = 1;
+
+ /** 마지막페이지 인덱스 */
+ private int lastIndex = 1;
+
+ /** 페이지당 레코드 개수 */
+ private int recordCountPerPage = 10;
+
+ /** 레코드 번호 */
+ private int rowNo = 0;
+
+ /** 등록구분 코드명 */
+ private String registSeCodeNm = "";
+
+ /** 최초 등록자명 */
+ private String frstRegisterNm = "";
+
+ /** 게시판 아이드 */
+ private String bbsId = "";
+
+ /** 게시판 이름 */
+ private String bbsNm = "";
+
+ /** 제공 URL */
+ private String provdUrl = "";
+
+ /**
+ * searchBgnDe attribute를 리턴한다.
+ *
+ * @return the searchBgnDe
+ */
+ public String getSearchBgnDe() {
+ return searchBgnDe;
+ }
+
+ /**
+ * searchBgnDe attribute 값을 설정한다.
+ *
+ * @param searchBgnDe
+ * the searchBgnDe to set
+ */
+ public void setSearchBgnDe(String searchBgnDe) {
+ this.searchBgnDe = searchBgnDe;
+ }
+
+ /**
+ * searchCnd attribute를 리턴한다.
+ *
+ * @return the searchCnd
+ */
+ public String getSearchCnd() {
+ return searchCnd;
+ }
+
+ /**
+ * searchCnd attribute 값을 설정한다.
+ *
+ * @param searchCnd
+ * the searchCnd to set
+ */
+ public void setSearchCnd(String searchCnd) {
+ this.searchCnd = searchCnd;
+ }
+
+ /**
+ * searchEndDe attribute를 리턴한다.
+ *
+ * @return the searchEndDe
+ */
+ public String getSearchEndDe() {
+ return searchEndDe;
+ }
+
+ /**
+ * searchEndDe attribute 값을 설정한다.
+ *
+ * @param searchEndDe
+ * the searchEndDe to set
+ */
+ public void setSearchEndDe(String searchEndDe) {
+ this.searchEndDe = searchEndDe;
+ }
+
+ /**
+ * searchWrd attribute를 리턴한다.
+ *
+ * @return the searchWrd
+ */
+ public String getSearchWrd() {
+ return searchWrd;
+ }
+
+ /**
+ * searchWrd attribute 값을 설정한다.
+ *
+ * @param searchWrd
+ * the searchWrd to set
+ */
+ public void setSearchWrd(String searchWrd) {
+ this.searchWrd = searchWrd;
+ }
+
+ /**
+ * sortOrdr attribute를 리턴한다.
+ *
+ * @return the sortOrdr
+ */
+ public long getSortOrdr() {
+ return sortOrdr;
+ }
+
+ /**
+ * sortOrdr attribute 값을 설정한다.
+ *
+ * @param sortOrdr
+ * the sortOrdr to set
+ */
+ public void setSortOrdr(long sortOrdr) {
+ this.sortOrdr = sortOrdr;
+ }
+
+ /**
+ * searchUseYn attribute를 리턴한다.
+ *
+ * @return the searchUseYn
+ */
+ public String getSearchUseYn() {
+ return searchUseYn;
+ }
+
+ /**
+ * searchUseYn attribute 값을 설정한다.
+ *
+ * @param searchUseYn
+ * the searchUseYn to set
+ */
+ public void setSearchUseYn(String searchUseYn) {
+ this.searchUseYn = searchUseYn;
+ }
+
+ /**
+ * pageIndex attribute를 리턴한다.
+ *
+ * @return the pageIndex
+ */
+ public int getPageIndex() {
+ return pageIndex;
+ }
+
+ /**
+ * pageIndex attribute 값을 설정한다.
+ *
+ * @param pageIndex
+ * the pageIndex to set
+ */
+ public void setPageIndex(int pageIndex) {
+ this.pageIndex = pageIndex;
+ }
+
+ /**
+ * pageUnit attribute를 리턴한다.
+ *
+ * @return the pageUnit
+ */
+ public int getPageUnit() {
+ return pageUnit;
+ }
+
+ /**
+ * pageUnit attribute 값을 설정한다.
+ *
+ * @param pageUnit
+ * the pageUnit to set
+ */
+ public void setPageUnit(int pageUnit) {
+ this.pageUnit = pageUnit;
+ }
+
+ /**
+ * pageSize attribute를 리턴한다.
+ *
+ * @return the pageSize
+ */
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ /**
+ * pageSize attribute 값을 설정한다.
+ *
+ * @param pageSize
+ * the pageSize to set
+ */
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ /**
+ * firstIndex attribute를 리턴한다.
+ *
+ * @return the firstIndex
+ */
+ public int getFirstIndex() {
+ return firstIndex;
+ }
+
+ /**
+ * firstIndex attribute 값을 설정한다.
+ *
+ * @param firstIndex
+ * the firstIndex to set
+ */
+ public void setFirstIndex(int firstIndex) {
+ this.firstIndex = firstIndex;
+ }
+
+ /**
+ * lastIndex attribute를 리턴한다.
+ *
+ * @return the lastIndex
+ */
+ public int getLastIndex() {
+ return lastIndex;
+ }
+
+ /**
+ * lastIndex attribute 값을 설정한다.
+ *
+ * @param lastIndex
+ * the lastIndex to set
+ */
+ public void setLastIndex(int lastIndex) {
+ this.lastIndex = lastIndex;
+ }
+
+ /**
+ * recordCountPerPage attribute를 리턴한다.
+ *
+ * @return the recordCountPerPage
+ */
+ public int getRecordCountPerPage() {
+ return recordCountPerPage;
+ }
+
+ /**
+ * recordCountPerPage attribute 값을 설정한다.
+ *
+ * @param recordCountPerPage
+ * the recordCountPerPage to set
+ */
+ public void setRecordCountPerPage(int recordCountPerPage) {
+ this.recordCountPerPage = recordCountPerPage;
+ }
+
+ /**
+ * rowNo attribute를 리턴한다.
+ *
+ * @return the rowNo
+ */
+ public int getRowNo() {
+ return rowNo;
+ }
+
+ /**
+ * rowNo attribute 값을 설정한다.
+ *
+ * @param rowNo
+ * the rowNo to set
+ */
+ public void setRowNo(int rowNo) {
+ this.rowNo = rowNo;
+ }
+
+ /**
+ * registSeCodeNm attribute를 리턴한다.
+ *
+ * @return the registSeCodeNm
+ */
+ public String getRegistSeCodeNm() {
+ return registSeCodeNm;
+ }
+
+ /**
+ * registSeCodeNm attribute 값을 설정한다.
+ *
+ * @param registSeCodeNm
+ * the registSeCodeNm to set
+ */
+ public void setRegistSeCodeNm(String registSeCodeNm) {
+ this.registSeCodeNm = registSeCodeNm;
+ }
+
+ /**
+ * frstRegisterNm attribute를 리턴한다.
+ *
+ * @return the frstRegisterNm
+ */
+ public String getFrstRegisterNm() {
+ return frstRegisterNm;
+ }
+
+ /**
+ * frstRegisterNm attribute 값을 설정한다.
+ *
+ * @param frstRegisterNm
+ * the frstRegisterNm to set
+ */
+ public void setFrstRegisterNm(String frstRegisterNm) {
+ this.frstRegisterNm = frstRegisterNm;
+ }
+
+ /**
+ * bbsId attribute를 리턴한다.
+ *
+ * @return the bbsId
+ */
+ public String getBbsId() {
+ return bbsId;
+ }
+
+ /**
+ * bbsId attribute 값을 설정한다.
+ *
+ * @param bbsId
+ * the bbsId to set
+ */
+ public void setBbsId(String bbsId) {
+ this.bbsId = bbsId;
+ }
+
+ /**
+ * bbsNm attribute를 리턴한다.
+ *
+ * @return the bbsNm
+ */
+ public String getBbsNm() {
+ return bbsNm;
+ }
+
+ /**
+ * bbsNm attribute 값을 설정한다.
+ *
+ * @param bbsNm
+ * the bbsNm to set
+ */
+ public void setBbsNm(String bbsNm) {
+ this.bbsNm = bbsNm;
+ }
+
+ /**
+ * provdUrl attribute를 리턴한다.
+ * @return the provdUrl
+ */
+ public String getProvdUrl() {
+ return provdUrl;
+ }
+
+ /**
+ * provdUrl attribute 값을 설정한다.
+ * @param provdUrl the provdUrl to set
+ */
+ public void setProvdUrl(String provdUrl) {
+ this.provdUrl = provdUrl;
+ }
+
+ /**
+ * toString 메소드를 대치한다.
+ */
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/EgovCommuBBSMasterService.java b/src/main/java/egovframework/com/cop/cmy/service/EgovCommuBBSMasterService.java
new file mode 100644
index 0000000..02a4e48
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/EgovCommuBBSMasterService.java
@@ -0,0 +1,11 @@
+package egovframework.com.cop.cmy.service;
+
+import java.util.List;
+
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+
+public interface EgovCommuBBSMasterService {
+
+ List selectCommuBBSMasterListMain(BoardMasterVO bbsVo);
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/EgovCommuManageService.java b/src/main/java/egovframework/com/cop/cmy/service/EgovCommuManageService.java
new file mode 100644
index 0000000..e60283d
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/EgovCommuManageService.java
@@ -0,0 +1,25 @@
+package egovframework.com.cop.cmy.service;
+
+import java.util.Map;
+
+public interface EgovCommuManageService {
+
+ Map selectCommuInf(CommunityVO cmmntyVO);
+
+ String checkCommuUserDetail(CommunityUser cmmntyUser);
+
+ void insertCommuUserRqst(CommunityUser cmmntyUser);
+
+ Map selectCommuUserList(CommunityUserVO cmmntyUserVO);
+
+ Boolean selectIsCommuAdmin(CommunityUserVO userVO);
+
+ void insertCommuUser(CommunityUserVO cmmntyUserVO);
+
+ void deleteCommuUser(CommunityUserVO cmmntyUserVO);
+
+ void insertCommuUserAdmin(CommunityUserVO cmmntyUserVO);
+
+ void deleteCommuUserAdmin(CommunityUserVO cmmntyUserVO);
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/EgovCommuMasterService.java b/src/main/java/egovframework/com/cop/cmy/service/EgovCommuMasterService.java
new file mode 100644
index 0000000..96fa2e5
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/EgovCommuMasterService.java
@@ -0,0 +1,21 @@
+package egovframework.com.cop.cmy.service;
+
+import java.util.List;
+import java.util.Map;
+
+import org.egovframe.rte.fdl.cmmn.exception.FdlException;
+
+public interface EgovCommuMasterService {
+
+ Map selectCommuMasterList(CommunityVO cmmntyVO);
+
+ String insertCommuMaster(Community community) throws FdlException;
+
+ CommunityVO selectCommuMaster(CommunityVO cmmntyVO) throws Exception;
+
+ void updateCommuMaster(Community community);
+
+ void deleteBBSMasterInf(Community community);
+
+ List selectCommuMasterListPortlet(CommunityVO cmmntyVO) throws Exception;
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuBBSMasterDAO.java b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuBBSMasterDAO.java
new file mode 100644
index 0000000..5f96af4
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuBBSMasterDAO.java
@@ -0,0 +1,17 @@
+package egovframework.com.cop.cmy.service.impl;
+
+import java.util.List;
+
+import org.springframework.stereotype.Repository;
+
+import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+
+@Repository("EgovCommuBBSMasterDAO")
+public class EgovCommuBBSMasterDAO extends EgovComAbstractDAO {
+
+ public List selectCommuBBSMasterListMain(BoardMasterVO boardMasterVO) {
+ return selectList("CommuBBSMaster.selectCommuBBSMasterListMain", boardMasterVO);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuBBSMasterServiceImpl.java b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuBBSMasterServiceImpl.java
new file mode 100644
index 0000000..8b3112f
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuBBSMasterServiceImpl.java
@@ -0,0 +1,29 @@
+package egovframework.com.cop.cmy.service.impl;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.cmy.service.EgovCommuBBSMasterService;
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+
+@Service("EgovCommuBBSMasterService")
+public class EgovCommuBBSMasterServiceImpl extends EgovAbstractServiceImpl implements EgovCommuBBSMasterService {
+
+ @Resource(name = "EgovCommuBBSMasterDAO")
+ private EgovCommuBBSMasterDAO egovCommuBBSMasterDao;
+
+ @Resource(name = "egovBBSMstrIdGnrService")
+ private EgovIdGnrService idgenService;
+
+ @Override
+ public List selectCommuBBSMasterListMain(BoardMasterVO boardMasterVO) {
+ return egovCommuBBSMasterDao.selectCommuBBSMasterListMain(boardMasterVO);
+ }
+
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuManageDAO.java b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuManageDAO.java
new file mode 100644
index 0000000..759b918
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuManageDAO.java
@@ -0,0 +1,55 @@
+package egovframework.com.cop.cmy.service.impl;
+
+import java.util.List;
+
+import org.springframework.stereotype.Repository;
+
+import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
+import egovframework.com.cop.cmy.service.CommunityUser;
+import egovframework.com.cop.cmy.service.CommunityUserVO;
+import egovframework.com.cop.cmy.service.CommunityVO;
+
+@Repository("EgovCommuManageDAO")
+public class EgovCommuManageDAO extends EgovComAbstractDAO{
+
+ public CommunityUser selectSingleCommuUserDetail(CommunityUser cmmntyUser) {
+ return (CommunityUser) selectOne("CommuManage.selectSingleCommuUserDetail", cmmntyUser);
+ }
+
+ public List selectCommuManagerList(CommunityVO cmmntyVO) {
+ return selectList("CommuManage.selectCommuManagerList", cmmntyVO);
+ }
+
+ public int checkExistUser(CommunityUser cmmntyUser) {
+ return (Integer)selectOne("CommuManage.checkExistUser", cmmntyUser);
+ }
+
+ public void insertCommuUserRqst(CommunityUser cmmntyUser) {
+ insert("CommuManage.insertCommuUserRqst", cmmntyUser);
+ }
+
+ public List> selectCommuUserList(CommunityUserVO cmmntyUserVO) {
+ return list("CommuManage.selectCommuUserList", cmmntyUserVO);
+ }
+
+ public int selectCommuUserListCnt(CommunityUserVO cmmntyUserVO) {
+ return (Integer)selectOne("CommuManage.selectCommuUserListCnt", cmmntyUserVO);
+ }
+
+ public void insertCommuUser(CommunityUserVO cmmntyUserVO) {
+ update("CommuManage.insertCommuUser", cmmntyUserVO);
+ }
+
+ public void deleteCommuUser(CommunityUserVO cmmntyUserVO) {
+ delete("CommuManage.deleteCommuUser", cmmntyUserVO);
+ }
+
+ public void insertCommuUserAdmin(CommunityUserVO cmmntyUserVO) {
+ update("CommuManage.insertCommuUserAdmin", cmmntyUserVO);
+ }
+
+ public void deleteCommuUserAdmin(CommunityUserVO cmmntyUserVO) {
+ update("CommuManage.deleteCommuUserAdmin", cmmntyUserVO);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuManageServiceImpl.java b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuManageServiceImpl.java
new file mode 100644
index 0000000..a68fa0b
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuManageServiceImpl.java
@@ -0,0 +1,144 @@
+package egovframework.com.cop.cmy.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import egovframework.com.cop.cmy.service.CommunityUser;
+import egovframework.com.cop.cmy.service.CommunityUserVO;
+import egovframework.com.cop.cmy.service.CommunityVO;
+import egovframework.com.cop.cmy.service.EgovCommuManageService;
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+
+@Service("EgovCommuManageService")
+public class EgovCommuManageServiceImpl extends EgovAbstractServiceImpl implements EgovCommuManageService {
+
+ @Resource(name = "EgovCommuMasterDAO")
+ EgovCommuMasterDAO egovCommuMasterDao;
+
+ @Resource(name = "EgovCommuManageDAO")
+ EgovCommuManageDAO egovCommuManageDao;
+
+ @Resource(name = "egovCmmntyIdGnrService")
+ private EgovIdGnrService idgenService;
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovCommuManageServiceImpl.class);
+
+ @Override
+ public Map selectCommuInf(CommunityVO cmmntyVO) {
+
+ //커뮤니티 기본정보 확인
+ CommunityVO vo = egovCommuMasterDao.selectCommuMasterDetail(cmmntyVO);
+
+ CommunityUser cmmntyUser = new CommunityUser();
+
+ cmmntyUser.setCmmntyId(cmmntyVO.getCmmntyId());
+ cmmntyUser.setEmplyrId(cmmntyVO.getEmplyrId());
+
+ cmmntyUser = egovCommuManageDao.selectSingleCommuUserDetail(cmmntyUser);
+
+ //-----------------------------------------------------------------
+ // 관리자 정보를 처리한다. (여러 명이 있을 수 있음 - DB 설계 문제상 문제)
+ // 위의 처리는 cmmntyVO.getEmplyrId()가 ""이기 때문에 의미 없음..
+ //-----------------------------------------------------------------
+ List managers = egovCommuManageDao.selectCommuManagerList(cmmntyVO);
+
+ if (cmmntyUser == null) {
+ cmmntyUser = new CommunityUser();
+ }
+ if (managers.size() == 1) {
+
+ cmmntyUser.setEmplyrId(managers.get(0).getEmplyrId());
+ cmmntyUser.setEmplyrNm(managers.get(0).getEmplyrNm());
+ } else if (managers.size() > 1) {
+ cmmntyUser.setEmplyrId(managers.get(0).getEmplyrId());
+ cmmntyUser.setEmplyrNm(managers.get(0).getEmplyrNm() + "외 " + (managers.size() - 1) + "명");
+ } else {
+ LOGGER.debug("No managers...");
+ }
+ ////---------------------------------------------------------------
+
+ Map map = new HashMap();
+
+ map.put("cmmntyVO", vo);
+ map.put("cmmntyUser", cmmntyUser);
+
+ return map;
+ }
+
+ @Override
+ public String checkCommuUserDetail(CommunityUser cmmntyUser) {
+
+ //cmmntyId
+ CommunityVO vo = new CommunityVO();
+ vo.setCmmntyId(cmmntyUser.getCmmntyId());
+
+ int userCnt = egovCommuManageDao.checkExistUser(cmmntyUser);
+
+ if (userCnt == 0) {
+ return "";
+ } else {
+ return "EXIST";
+ }
+ }
+
+ @Override
+ public void insertCommuUserRqst(CommunityUser cmmntyUser) {
+ egovCommuManageDao.insertCommuUserRqst(cmmntyUser);
+ }
+
+ @Override
+ public Map selectCommuUserList(CommunityUserVO cmmntyUserVO) {
+ List> result = egovCommuManageDao.selectCommuUserList(cmmntyUserVO);
+ int cnt = egovCommuManageDao.selectCommuUserListCnt(cmmntyUserVO);
+
+ Map map = new HashMap();
+
+ map.put("resultList", result);
+ map.put("resultCnt", Integer.toString(cnt));
+
+ return map;
+ }
+
+ @Override
+ public Boolean selectIsCommuAdmin(CommunityUserVO userVO) {
+
+ CommunityUser cmmntyUser = egovCommuManageDao.selectSingleCommuUserDetail(userVO);
+
+ if(cmmntyUser==null) {
+ return false;
+ } else if(cmmntyUser.getMngrAt().equals("Y")) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public void insertCommuUser(CommunityUserVO cmmntyUserVO) {
+ egovCommuManageDao.insertCommuUser(cmmntyUserVO);
+ }
+
+ @Override
+ public void deleteCommuUser(CommunityUserVO cmmntyUserVO) {
+ egovCommuManageDao.deleteCommuUser(cmmntyUserVO);
+ }
+
+ @Override
+ public void insertCommuUserAdmin(CommunityUserVO cmmntyUserVO) {
+ egovCommuManageDao.insertCommuUserAdmin(cmmntyUserVO);
+ }
+
+ @Override
+ public void deleteCommuUserAdmin(CommunityUserVO cmmntyUserVO) {
+ egovCommuManageDao.deleteCommuUserAdmin(cmmntyUserVO);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuMasterDAO.java b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuMasterDAO.java
new file mode 100644
index 0000000..fb92782
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuMasterDAO.java
@@ -0,0 +1,52 @@
+package egovframework.com.cop.cmy.service.impl;
+
+import java.util.List;
+
+import org.springframework.stereotype.Repository;
+
+import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.cmy.service.Community;
+import egovframework.com.cop.cmy.service.CommunityVO;
+
+@Repository("EgovCommuMasterDAO")
+public class EgovCommuMasterDAO extends EgovComAbstractDAO{
+
+ public List> selectCommuMasterList(CommunityVO cmmntyVO) {
+ return list("CommuMaster.selectCommuMasterList", cmmntyVO);
+ }
+
+ public int selectCommuMasterListCnt(CommunityVO cmmntyVO) {
+ return (Integer)selectOne("CommuMaster.selectCommuMasterListCnt", cmmntyVO);
+ }
+
+ public void insertCommuMaster(Community community) {
+ insert("CommuMaster.insertCommuMaster", community);
+
+ }
+
+ public CommunityVO selectCommuMasterDetail(CommunityVO cmmntyVO) {
+ return (CommunityVO) selectOne("CommuMaster.selectCommuMasterDetail", cmmntyVO);
+ }
+
+ public void updateCommuMaster(Community community) {
+ update("CommuMaster.updateCommuMaster", community);
+ }
+
+ public void deleteCommuMaster(Community community) {
+ update("CommuMaster.deleteCommuMaster", community);
+ }
+
+ /**
+ * 포트릿을 위한 커뮤니티 정보 목록 정보를 조회한다.
+ *
+ * @param cmmntyVO
+ * @return
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List selectCommuMasterListPortlet(CommunityVO cmmntyVO) throws Exception {
+ return (List) list("CommuMaster.selectCommuMasterListPortlet", cmmntyVO);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuMasterServiceImpl.java b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuMasterServiceImpl.java
new file mode 100644
index 0000000..75da30a
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/service/impl/EgovCommuMasterServiceImpl.java
@@ -0,0 +1,76 @@
+package egovframework.com.cop.cmy.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.cmy.service.Community;
+import egovframework.com.cop.cmy.service.CommunityVO;
+import egovframework.com.cop.cmy.service.EgovCommuMasterService;
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import org.egovframe.rte.fdl.cmmn.exception.FdlException;
+import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
+
+@Service("EgovCommuMasterService")
+public class EgovCommuMasterServiceImpl extends EgovAbstractServiceImpl implements EgovCommuMasterService{
+
+ @Resource(name = "EgovCommuMasterDAO")
+ private EgovCommuMasterDAO egovCommuMasterDAO;
+
+ @Resource(name = "egovCmmntyIdGnrService")
+ private EgovIdGnrService idgenService;
+
+ @Override
+ public Map selectCommuMasterList(CommunityVO cmmntyVO) {
+
+ List> result = egovCommuMasterDAO.selectCommuMasterList(cmmntyVO);
+ int cnt = egovCommuMasterDAO.selectCommuMasterListCnt(cmmntyVO);
+
+ Map map = new HashMap();
+
+ map.put("resultList", result);
+ map.put("resultCnt", Integer.toString(cnt));
+
+ return map;
+ }
+
+ @Override
+ public String insertCommuMaster(Community community) throws FdlException {
+ //게시판 ID 채번
+ String cmmntyId = idgenService.getNextStringId();
+ community.setCmmntyId(cmmntyId);
+
+ egovCommuMasterDAO.insertCommuMaster(community);
+
+ return cmmntyId;
+ }
+
+ @Override
+ public CommunityVO selectCommuMaster(CommunityVO cmmntyVO) throws Exception {
+ CommunityVO resultVO = egovCommuMasterDAO.selectCommuMasterDetail(cmmntyVO);
+ if (resultVO == null)
+ throw processException("info.nodata.msg");
+ return resultVO;
+ }
+
+ @Override
+ public void updateCommuMaster(Community community) {
+ egovCommuMasterDAO.updateCommuMaster(community);
+ }
+
+ @Override
+ public void deleteBBSMasterInf(Community community) {
+ egovCommuMasterDAO.deleteCommuMaster(community);
+ }
+
+ @Override
+ public List selectCommuMasterListPortlet(CommunityVO cmmntyVO) throws Exception {
+ return egovCommuMasterDAO.selectCommuMasterListPortlet(cmmntyVO);
+ }
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/web/EgovCommuManageController.java b/src/main/java/egovframework/com/cop/cmy/web/EgovCommuManageController.java
new file mode 100644
index 0000000..35e52f0
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/web/EgovCommuManageController.java
@@ -0,0 +1,639 @@
+package egovframework.com.cop.cmy.web;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springmodules.validation.commons.DefaultBeanValidator;
+
+import egovframework.com.cmm.EgovMessageSource;
+import egovframework.com.cmm.EgovWebUtil;
+import egovframework.com.cmm.LoginVO;
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+import egovframework.com.cop.bbs.service.BoardMasterVO;
+import egovframework.com.cop.bbs.service.BoardVO;
+import egovframework.com.cop.bbs.service.EgovArticleService;
+import egovframework.com.cop.cmy.service.CommunityUser;
+import egovframework.com.cop.cmy.service.CommunityUserVO;
+import egovframework.com.cop.cmy.service.CommunityVO;
+import egovframework.com.cop.cmy.service.EgovCommuBBSMasterService;
+import egovframework.com.cop.cmy.service.EgovCommuManageService;
+import egovframework.com.cop.cmy.service.EgovCommuMasterService;
+import egovframework.com.cop.tpl.service.EgovTemplateManageService;
+import egovframework.com.cop.tpl.service.TemplateInfVO;
+import egovframework.com.utl.fcc.service.EgovStringUtil;
+import org.egovframe.rte.fdl.property.EgovPropertyService;
+import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
+
+/**
+ * 커뮤니티 사용자관리, 커뮤니티 게시판을 관리하기 위한 컨트롤러 클래스
+ * @author 공통서비스개발팀 김연호
+ * @since 2016.08.01
+ * @version 3.6
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ---------- -------- ---------------------------
+ * 2016.06.13 김연호 최초 생성 - 표준프레임워크 v3.6 개선
+ * 2019.05.17 신용호 KISA 취약점 조치 및 보완
+ *
+ *
+ */
+
+@Controller
+public class EgovCommuManageController {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(EgovCommuManageController.class);
+
+ @Resource(name = "EgovCommuManageService")
+ private EgovCommuManageService egovCommuManageService;
+
+ @Resource(name = "EgovCommuBBSMasterService")
+ private EgovCommuBBSMasterService egovCommuBBSMasterService;
+
+ @Resource(name = "EgovCommuMasterService")
+ private EgovCommuMasterService egovCommuMasterService;
+
+ @Resource(name = "EgovArticleService")
+ private EgovArticleService egovArticleService;
+
+ @Resource(name = "EgovTemplateManageService")
+ private EgovTemplateManageService egovTemplateManageService;
+
+ @Resource(name = "propertiesService")
+ protected EgovPropertyService propertyService;
+
+ @Autowired
+ private DefaultBeanValidator beanValidator;
+
+ /** EgovMessageSource */
+ @Resource(name = "egovMessageSource")
+ EgovMessageSource egovMessageSource;
+
+ /**
+ * 커뮤니티 메인페이지를 조회한다.
+ *
+ * @param cmmntyVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/cmmntyMain.do")
+ public String selectCmmntyMain(@ModelAttribute("searchVO") CommunityVO cmmntyVO
+ ,ModelMap model
+ ,HttpServletRequest request) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ cmmntyVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+// String tmplatCours = cmmntyService.selectCmmntyTemplat(cmmntyVO);
+ String tmplatCours = "";
+ if ("".equals(tmplatCours) || tmplatCours == null) {
+ tmplatCours = "egovframework/com/cop/tpl/EgovCmmntyBaseTmpl";
+ }
+ Map map = egovCommuManageService.selectCommuInf(cmmntyVO);
+
+ //model.addAttribute("cmmntyVO", cmmntyVO);
+ model.addAttribute("cmmntyVO", (CommunityVO)map.get("cmmntyVO"));
+ model.addAttribute("cmmntyUser", (CommunityUser)map.get("cmmntyUser"));
+
+ //--------------------------------
+ // 게시판 목록 정보 처리
+ //--------------------------------
+ BoardMasterVO bbsVo = new BoardMasterVO();
+
+ bbsVo.setCmmntyId(cmmntyVO.getCmmntyId());
+
+ List bbsResult = egovCommuBBSMasterService.selectCommuBBSMasterListMain(bbsVo);
+
+ model.addAttribute("bbsList", bbsResult);
+ ////------------------------------
+
+ if (isAuthenticated) {
+ model.addAttribute("isAuthenticated", "Y");
+ } else {
+ model.addAttribute("isAuthenticated", "N");
+ }
+ model.addAttribute("returnMsg", request.getParameter("returnMsg"));
+
+ return "egovframework/com/cop/cmy/EgovCommuMain";
+ }
+
+ /**
+ * 커뮤니티 메인페이지의 기본 내용(게시판 4개 표시) 조회한다.
+ *
+ * @param cmmntyVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/cmmntyMainContents.do")
+ public String selectCmmntyMainContents(@ModelAttribute("searchVO") CommunityVO cmmntyVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ cmmntyVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ //--------------------------------
+ // 게시판 목록 정보 처리
+ //--------------------------------
+ BoardMasterVO bbsVo = new BoardMasterVO();
+
+ bbsVo.setCmmntyId(cmmntyVO.getCmmntyId());
+
+ List bbsResult = egovCommuBBSMasterService.selectCommuBBSMasterListMain(bbsVo);
+
+ // 방명록 제외 처리
+ for (int i = 0; i < bbsResult.size(); i++) {
+ if ("BBST04".equals(bbsResult.get(i).getBbsTyCode())) {
+ bbsResult.remove(i);
+ }
+ }
+
+ model.addAttribute("bbsList", bbsResult);
+
+ //--------------------------------
+ // 게시물 목록 정보 처리
+ //--------------------------------
+ BoardVO boardVo = null;
+ BoardMasterVO masterVo = null;
+
+ ArrayList target = new ArrayList(); // Object => List
+ for (int i = 0; i < bbsResult.size() && i < 4; i++) {
+ masterVo = bbsResult.get(i);
+ boardVo = new BoardVO();
+
+ boardVo.setBbsId(masterVo.getBbsId());
+ boardVo.setBbsNm(masterVo.getBbsNm());
+
+ boardVo.setPageUnit(4);
+ boardVo.setPageSize(4);
+
+ boardVo.setFirstIndex(0);
+ boardVo.setRecordCountPerPage(4);
+
+ Map map = egovArticleService.selectArticleList(boardVo);
+
+ target.add(map.get("resultList"));
+ }
+
+ model.addAttribute("articleList", target);
+
+ return "egovframework/com/cop/cmy/EgovCmmntyBaseTmplContents";
+ }
+
+ /**
+ * 커뮤니티 가입신청을 등록한다.
+ *
+ * @param cmmntyUser
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/insertCommuUserBySelf.do")
+ public String insertCmmntyUserBySelf(@ModelAttribute("cmmntyUser") CommunityUser cmmntyUser, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ //KISA 보안취약점 조치 (2018-12-10, 신용호)
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ String retVal = "";
+
+ if ("".equals(cmmntyUser.getMngrAt())) {
+ cmmntyUser.setMngrAt("N");
+ }
+ cmmntyUser.setUseAt("Y");
+ cmmntyUser.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ cmmntyUser.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ cmmntyUser.setMberSttus("A");
+
+ if (isAuthenticated) {
+
+ //---------------------------------------------
+ // 승인요청 처리
+ //---------------------------------------------
+ retVal = egovCommuManageService.checkCommuUserDetail(cmmntyUser);
+
+ //요청건이 없을 경우
+ if (!retVal.equals("EXIST")) {
+
+ egovCommuManageService.insertCommuUserRqst(cmmntyUser);
+ retVal = egovMessageSource.getMessage("comCopCmy.commuMain.joinMember.info.success"); //가입신청이 정상처리되었습니다.
+ } else {
+
+ retVal = egovMessageSource.getMessage("comCopCmy.commuMain.joinMember.info.fail"); //이미 가입처리가 되어 있습니다.
+ }
+ ////-------------------------------------------
+ }
+ model.addAttribute("returnMsg", retVal);
+ model.addAttribute("cmmntyId", cmmntyUser.getCmmntyId());
+
+ return "redirect:/cop/cmy/cmmntyMain.do";
+ }
+
+ /**
+ * 커뮤니티를 탈퇴한다.
+ *
+ * @param cmmntyUser
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/deleteCommuUserBySelf.do")
+ public String deleteCmmntyUserBySelf(@ModelAttribute("cmmntyUser") CommunityUserVO cmmntyUserVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ //KISA 보안취약점 조치 (2018-12-10, 신용호)
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ //로그인한 사용자가 관리자인지 확인한다.
+ CommunityUserVO userVO = new CommunityUserVO();
+ userVO.setCmmntyId(cmmntyUserVO.getCmmntyId());
+ userVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ Boolean isCommuAdmin = egovCommuManageService.selectIsCommuAdmin(userVO);
+
+ //관리자는 탈퇴할 수 없음.
+ String resultMsg = "";
+ if(isAuthenticated && !isCommuAdmin) {
+ cmmntyUserVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ egovCommuManageService.deleteCommuUser(cmmntyUserVO);
+ resultMsg = egovMessageSource.getMessage("comCopCmy.commuMain.deleteMember.info.success"); //탈퇴신청이 정상처리되었습니다.
+ } else {
+ resultMsg = egovMessageSource.getMessage("comCopCmy.commuMain.deleteMember.info.admin"); //관리자는 탈퇴할수 없습니다.
+ }
+
+ model.addAttribute("cmmntyId", cmmntyUserVO.getCmmntyId());
+ model.addAttribute("returnMsg", resultMsg);
+
+ return "redirect:/cop/cmy/cmmntyMain.do";
+ }
+
+ /**
+ * 커뮤니티 사용자 목록을 조회한다.
+ *
+ * @param cmmntyUserVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/selectCommuUserList.do")
+ public String selectCommuUserList(@ModelAttribute("searchVO") CommunityUserVO cmmntyUserVO, ModelMap model) throws Exception {
+ cmmntyUserVO.setPageUnit(propertyService.getInt("pageUnit"));
+ cmmntyUserVO.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+
+ paginationInfo.setCurrentPageNo(cmmntyUserVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(cmmntyUserVO.getPageUnit());
+ paginationInfo.setPageSize(cmmntyUserVO.getPageSize());
+
+ cmmntyUserVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ cmmntyUserVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ cmmntyUserVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovCommuManageService.selectCommuUserList(cmmntyUserVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "egovframework/com/cop/cmy/EgovCommuUserList";
+ }
+
+ /**
+ * 커뮤니티 사용자를 등록한다.
+ *
+ * @param cmmntyUserVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/insertCommuUser.do")
+ public String insertCommuUser(@ModelAttribute("searchVO") CommunityUserVO cmmntyUserVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ //로그인한 사용자가 관리자인지 확인한다.
+ CommunityUserVO userVO = new CommunityUserVO();
+ userVO.setCmmntyId(cmmntyUserVO.getCmmntyId());
+ userVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ Boolean isCommuAdmin = egovCommuManageService.selectIsCommuAdmin(userVO);
+
+
+ if(isAuthenticated && isCommuAdmin) {
+ cmmntyUserVO.setLastUpdusrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ egovCommuManageService.insertCommuUser(cmmntyUserVO);
+ }
+
+
+
+ return "forward:/cop/cmy/selectCommuUserList.do";
+ }
+
+ /**
+ * 커뮤니티 사용자를 탈퇴시킨다. (가입거절 포함)
+ *
+ * @param cmmntyUserVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/deleteCommuUser.do")
+ public String deleteCommuUser(@ModelAttribute("searchVO") CommunityUserVO cmmntyUserVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ //로그인한 사용자가 관리자인지 확인한다.
+ CommunityUserVO userVO = new CommunityUserVO();
+ userVO.setCmmntyId(cmmntyUserVO.getCmmntyId());
+ userVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ Boolean isCommuAdmin = egovCommuManageService.selectIsCommuAdmin(userVO);
+
+
+ if(isAuthenticated && isCommuAdmin) {
+ egovCommuManageService.deleteCommuUser(cmmntyUserVO);
+ }
+
+
+
+ return "forward:/cop/cmy/selectCommuUserList.do";
+ }
+
+ /**
+ * 커뮤니티 관리자를 등록한다.
+ *
+ * @param cmmntyUserVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/insertCommuUserAdmin.do")
+ public String insertCommuUserAdmin(@ModelAttribute("searchVO") CommunityUserVO cmmntyUserVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ //로그인한 사용자가 관리자인지 확인한다.
+ CommunityUserVO userVO = new CommunityUserVO();
+ userVO.setCmmntyId(cmmntyUserVO.getCmmntyId());
+ userVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ Boolean isCommuAdmin = egovCommuManageService.selectIsCommuAdmin(userVO);
+
+
+ if(isAuthenticated && isCommuAdmin) {
+ cmmntyUserVO.setLastUpdusrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ egovCommuManageService.insertCommuUserAdmin(cmmntyUserVO);
+ }
+
+
+
+ return "forward:/cop/cmy/selectCommuUserList.do";
+ }
+
+ /**
+ * 커뮤니티 관리자를 해제한다.
+ *
+ * @param cmmntyUserVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/deleteCommuUserAdmin.do")
+ public String deleteCommuUserAdmin(@ModelAttribute("searchVO") CommunityUserVO cmmntyUserVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ //로그인한 사용자가 관리자인지 확인한다.
+ CommunityUserVO userVO = new CommunityUserVO();
+ userVO.setCmmntyId(cmmntyUserVO.getCmmntyId());
+ userVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ Boolean isCommuAdmin = egovCommuManageService.selectIsCommuAdmin(userVO);
+
+
+ //커뮤니티 개설자는 관리자해제를 할 수 없음.
+ CommunityVO cmmntyVO = new CommunityVO();
+ cmmntyVO.setCmmntyId(cmmntyUserVO.getCmmntyId());
+ cmmntyVO = egovCommuMasterService.selectCommuMaster(cmmntyVO);
+ //커뮤니티 최초등록자를 확인한다. 일치할 경우 관리자 해제 불가.
+ if(cmmntyVO.getFrstRegisterId().equals(cmmntyUserVO.getEmplyrId())) {
+ return "forward:/cop/cmy/selectCommuUserList.do";
+ }
+
+
+
+ if(isAuthenticated && isCommuAdmin) {
+ cmmntyUserVO.setLastUpdusrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ egovCommuManageService.deleteCommuUserAdmin(cmmntyUserVO);
+ }
+
+
+
+ return "forward:/cop/cmy/selectCommuUserList.do";
+ }
+
+ /**
+ * 미리보기 커뮤니티 메인페이지를 조회한다.
+ *
+ * @param cmmntyVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/previewCmmntyMainPage.do")
+ public String previewCmmntyMainPage(@ModelAttribute("searchVO") CommunityVO cmmntyVO, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ cmmntyVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ String tmplatCours = cmmntyVO.getSearchWrd();
+
+ CommunityVO vo = new CommunityVO();
+
+ vo.setCmmntyNm("미리보기 커뮤니티");
+ vo.setCmmntyIntrcn("미리보기를 위한 커뮤니티입니다.");
+ vo.setUseAt("Y");
+ vo.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId())); // 본인
+
+ CommunityUser cmmntyUser = new CommunityUser();
+
+ cmmntyUser.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ cmmntyUser.setEmplyrNm("관리자");
+
+ model.addAttribute("cmmntyVO", vo);
+ model.addAttribute("cmmntyUser", cmmntyUser);
+
+ //--------------------------------
+ // 게시판 목록 정보 처리
+ //--------------------------------
+ List bbsResult = new ArrayList();
+
+ BoardMasterVO target = null;
+
+ target = new BoardMasterVO();
+ target.setBbsNm("방명록");
+ bbsResult.add(target);
+
+ target = new BoardMasterVO();
+ target.setBbsNm("공지게시판");
+ bbsResult.add(target);
+
+ target = new BoardMasterVO();
+ target.setBbsNm("갤러리");
+ bbsResult.add(target);
+
+ target = new BoardMasterVO();
+ target.setBbsNm("자유게시판");
+ bbsResult.add(target);
+
+ target = new BoardMasterVO();
+ target.setBbsNm("자료실");
+ bbsResult.add(target);
+
+ model.addAttribute("bbsList", bbsResult);
+ ////------------------------------
+
+ if (isAuthenticated) {
+ model.addAttribute("isAuthenticated", "Y");
+ } else {
+ model.addAttribute("isAuthenticated", "N");
+ }
+
+ model.addAttribute("preview", "true");
+
+ // 안전한 경로 문자열로 조치
+ tmplatCours = EgovWebUtil.filePathBlackList(tmplatCours);
+
+ // 화이트 리스트 체크
+ List templateWhiteList = egovTemplateManageService.selectTemplateWhiteList();
+ LOGGER.debug("Template > WhiteList Count = {}",templateWhiteList.size());
+ if ( tmplatCours == null ) tmplatCours = "";
+ for(TemplateInfVO templateInfVO : templateWhiteList){
+ LOGGER.debug("Template > whiteList TmplatCours = "+templateInfVO.getTmplatCours());
+ if ( tmplatCours.equals(templateInfVO.getTmplatCours()) ) {
+ return tmplatCours;
+ }
+ }
+
+ LOGGER.debug("Template > WhiteList mismatch! Please check Admin page!");
+ return "egovframework/com/cmm/egovError";
+ }
+
+ /**
+ * 커뮤니티 메인페이지의 기본 내용(게시판 4개 표시) 조회한다.
+ *
+ * @param cmmntyVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/previewCmmntyMainContents.do")
+ public String previewCmmntyMainContents(@ModelAttribute("searchVO") CommunityVO cmmntyVO, ModelMap model) throws Exception {
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ @SuppressWarnings("unused")
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ cmmntyVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ //--------------------------------
+ // 게시판 목록 정보 처리
+ //--------------------------------
+ List bbsResult = new ArrayList();
+
+ BoardMasterVO master = null;
+
+ master = new BoardMasterVO();
+ master.setBbsNm("공지게시판");
+ bbsResult.add(master);
+
+ master = new BoardMasterVO();
+ master.setBbsNm("갤러리");
+ bbsResult.add(master);
+
+ master = new BoardMasterVO();
+ master.setBbsNm("자유게시판");
+ bbsResult.add(master);
+
+ master = new BoardMasterVO();
+ master.setBbsNm("자료실");
+ bbsResult.add(master);
+
+ model.addAttribute("bbsList", bbsResult);
+
+ //--------------------------------
+ // 게시물 목록 정보 처리
+ //--------------------------------
+ ArrayList target = new ArrayList(); // Object => List
+ for (int i = 0; i < bbsResult.size() && i < 4; i++) {
+
+ target.add(null);
+ }
+
+ model.addAttribute("boardList", target);
+
+ model.addAttribute("preview", "true");
+
+ return "egovframework/com/cop/tpl/EgovCmmntyBaseTmplContents";
+ }
+
+
+}
diff --git a/src/main/java/egovframework/com/cop/cmy/web/EgovCommuMasterController.java b/src/main/java/egovframework/com/cop/cmy/web/EgovCommuMasterController.java
new file mode 100644
index 0000000..cccfd4c
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/cmy/web/EgovCommuMasterController.java
@@ -0,0 +1,287 @@
+package egovframework.com.cop.cmy.web;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springmodules.validation.commons.DefaultBeanValidator;
+
+import egovframework.com.cmm.LoginVO;
+import egovframework.com.cmm.annotation.IncludedInfo;
+import egovframework.com.cmm.util.EgovUserDetailsHelper;
+import egovframework.com.cop.cmy.service.Community;
+import egovframework.com.cop.cmy.service.CommunityUserVO;
+import egovframework.com.cop.cmy.service.CommunityVO;
+import egovframework.com.cop.cmy.service.EgovCommuManageService;
+import egovframework.com.cop.cmy.service.EgovCommuMasterService;
+import egovframework.com.utl.fcc.service.EgovStringUtil;
+import org.egovframe.rte.fdl.property.EgovPropertyService;
+import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
+
+/**
+ * 커뮤니티 정보를 관리하기 위한 컨트롤러 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.4.2 이삼섭 최초 생성
+ * 2011.8.26 정진오 IncludedInfo annotation 추가
+ * 2011.9.7 정진오 커뮤니티 탈퇴 요청이 정상적으로 이뤄지지 않은 사항 수정함
+ * 커뮤니티 탈퇴 요청시 승인자를 선택하므로 탈퇴 승인자가 자신이 될 수 없음에도
+ * 세션에서 가져온 값(탈퇴신청자)을 탈퇴승인자로 설정하도록 되어 있었음
+ * 2016.06.13 김연호 표준프레임워크 v3.6 개선
+ *
+ */
+
+@Controller
+public class EgovCommuMasterController {
+
+ @Resource(name = "EgovCommuMasterService")
+ private EgovCommuMasterService egovCommuMasterService;
+
+ @Resource(name = "EgovCommuManageService")
+ private EgovCommuManageService egovCommuManageService;
+
+ @Resource(name = "propertiesService")
+ protected EgovPropertyService propertyService;
+
+ @Autowired
+ private DefaultBeanValidator beanValidator;
+
+ //Logger log = Logger.getLogger(this.getClass());
+
+ /**
+ * 커뮤니티에 대한 목록을 조회한다.
+ *
+ * @param cmmntyVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @IncludedInfo(name="커뮤니티관리", order = 270 ,gid = 40)
+ @RequestMapping("/cop/cmy/selectCommuMasterList.do")
+ public String selectCommuMasterList(@ModelAttribute("searchVO") CommunityVO cmmntyVO, ModelMap model) throws Exception {
+ cmmntyVO.setPageUnit(propertyService.getInt("pageUnit"));
+ cmmntyVO.setPageSize(propertyService.getInt("pageSize"));
+
+ PaginationInfo paginationInfo = new PaginationInfo();
+
+ paginationInfo.setCurrentPageNo(cmmntyVO.getPageIndex());
+ paginationInfo.setRecordCountPerPage(cmmntyVO.getPageUnit());
+ paginationInfo.setPageSize(cmmntyVO.getPageSize());
+
+ cmmntyVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
+ cmmntyVO.setLastIndex(paginationInfo.getLastRecordIndex());
+ cmmntyVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
+
+ Map map = egovCommuMasterService.selectCommuMasterList(cmmntyVO);
+ int totCnt = Integer.parseInt((String)map.get("resultCnt"));
+
+ paginationInfo.setTotalRecordCount(totCnt);
+
+ model.addAttribute("resultList", map.get("resultList"));
+ model.addAttribute("resultCnt", map.get("resultCnt"));
+ model.addAttribute("paginationInfo", paginationInfo);
+
+ return "egovframework/com/cop/cmy/EgovCommuMasterList";
+ }
+
+ /**
+ * 커뮤니티 등록을 위한 등록페이지로 이동한다.
+ *
+ * @param cmmntyVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/insertCommuMasterView.do")
+ public String insertCommuMasterView(@ModelAttribute("searchVO") CommunityVO cmmntyVO, ModelMap model) throws Exception {
+ model.addAttribute("commuMasterVO", new CommunityVO());
+
+ return "egovframework/com/cop/cmy/EgovCommuMasterRegist";
+ }
+
+ /**
+ * 커뮤니티 정보를 등록한다.
+ *
+ * @param cmmntyVO
+ * @param cmmnty
+ * @param status
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/insertCommuMaster.do")
+ public String insertCommuMaster(@ModelAttribute("searchVO") CommunityVO cmmntyVO, @ModelAttribute("commuMaster") Community community,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ beanValidator.validate(community, bindingResult);
+
+ if (bindingResult.hasErrors()) {
+ return "egovframework/com/cop/cmy/EgovCommuMasterRegist";
+ }
+
+ community.setRegistSeCode("REGC02");
+ community.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ String cmmntyId = "";
+ if (isAuthenticated) {
+ cmmntyId = egovCommuMasterService.insertCommuMaster(community);
+
+ //커뮤니티 개설자의 정보를 등록한다.
+ CommunityUserVO cmmntyUserVO = new CommunityUserVO();
+ cmmntyUserVO.setCmmntyId(cmmntyId);
+ cmmntyUserVO.setEmplyrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ cmmntyUserVO.setMngrAt("Y");
+ cmmntyUserVO.setMberSttus("P");
+ cmmntyUserVO.setUseAt("Y");
+ cmmntyUserVO.setFrstRegisterId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ egovCommuManageService.insertCommuUserRqst(cmmntyUserVO);
+ }
+
+
+
+ return "forward:/cop/cmy/selectCommuMasterList.do";
+ }
+
+ /**
+ * 커뮤니티에 대한 상세정보를 조회한다.
+ *
+ * @param cmmntyVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/selectCommuMasterDetail.do")
+ public String selectCommuMasterDetail(@ModelAttribute("searchVO") CommunityVO cmmntyVO, ModelMap model, HttpServletRequest request) throws Exception {
+ CommunityVO result = egovCommuMasterService.selectCommuMaster(cmmntyVO);
+
+ //-----------------------
+ // 제공 URL
+ //-----------------------
+ result.setProvdUrl(request.getContextPath()+ "/cop/cmy/CommuMainPage.do?cmmntyId=" + result.getCmmntyId());
+ ////---------------------
+
+ model.addAttribute("result", result);
+
+ return "egovframework/com/cop/cmy/EgovCommuMasterDetail";
+ }
+
+ /**
+ * 커뮤니티 정보 수정을 위한 수정페이지로 이동한다.
+ *
+ * @param cmmntyVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/updateCommuMasterView.do")
+ public String updateCommuMasterView(@ModelAttribute("searchVO") CommunityVO cmmntyVO, ModelMap model)
+ throws Exception {
+
+ CommunityVO result = egovCommuMasterService.selectCommuMaster(cmmntyVO);
+
+ model.addAttribute("commuMasterVO", result);
+
+ return "egovframework/com/cop/cmy/EgovCommuMasterUpdt";
+ }
+
+ /**
+ * 커뮤니티 정보를 수정한다.
+ *
+ * @param cmmntyVO
+ * @param status
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/updateCommuMaster.do")
+ public String updateCommuMaster(@ModelAttribute("searchVO") CommunityVO cmmntyVO, @ModelAttribute("commuMaster") Community community,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+ // KISA 보안취약점 조치 (2018-12-10, 신용호)
+ if(!isAuthenticated) {
+ return "egovframework/com/uat/uia/EgovLoginUsr";
+ }
+
+ beanValidator.validate(community, bindingResult);
+ if (bindingResult.hasErrors()) {
+
+ CommunityVO result = egovCommuMasterService.selectCommuMaster(cmmntyVO);
+ model.addAttribute("result", result);
+
+ return "egovframework/com/cop/cmy/EgovCommuMasterUpdt";
+ }
+
+ community.setLastUpdusrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+
+ egovCommuMasterService.updateCommuMaster(community);
+
+ return "forward:/cop/cmy/selectCommuMasterList.do";
+ }
+
+ /**
+ * 커뮤니티 정보를 삭제한다.
+ *
+ * @param cmmntyVO
+ * @param status
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/deleteCommuMaster.do")
+ public String deleteCommuMaster(@ModelAttribute("searchVO") CommunityVO cmmntyVO, @ModelAttribute("commuMaster") Community community,
+ BindingResult bindingResult, ModelMap model) throws Exception {
+
+ LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
+ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
+
+ if (isAuthenticated) {
+ community.setLastUpdusrId(user == null ? "" : EgovStringUtil.isNullToString(user.getUniqId()));
+ egovCommuMasterService.deleteBBSMasterInf(community);
+ }
+ return "forward:/cop/cmy/selectCommuMasterList.do";
+ }
+
+ /**
+ * 포트릿을 위한 커뮤니티 정보 목록 정보를 조회한다.
+ *
+ * @param cmmntyVO
+ * @param sessionVO
+ * @param model
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping("/cop/cmy/selectCommuMasterListPortlet.do")
+ public String selectCmmntyListPortlet(@ModelAttribute("searchVO") CommunityVO cmmntyVO, ModelMap model) throws Exception {
+ List result = egovCommuMasterService.selectCommuMasterListPortlet(cmmntyVO);
+
+ model.addAttribute("resultList", result);
+
+ return "egovframework/com/cop/cmy/EgovCommuMasterListPortlet";
+ }
+}
diff --git a/src/main/java/egovframework/com/cop/com/service/EgovUserInfManageService.java b/src/main/java/egovframework/com/cop/com/service/EgovUserInfManageService.java
new file mode 100644
index 0000000..6791032
--- /dev/null
+++ b/src/main/java/egovframework/com/cop/com/service/EgovUserInfManageService.java
@@ -0,0 +1,86 @@
+package egovframework.com.cop.com.service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 협업 기능에서 사용자 정보를 관리하기 위한 서비스 인터페이스 클래스
+ * @author 공통서비스개발팀 이삼섭
+ * @since 2009.06.01
+ * @version 1.0
+ * @see
+ *
+ *
+ * << 개정이력(Modification Information) >>
+ *
+ * 수정일 수정자 수정내용
+ * ------- -------- ---------------------------
+ * 2009.4.6 이삼섭 최초 생성
+ *
+ *
+ */
+public interface EgovUserInfManageService {
+
+ /**
+ * 사용자 정보에 대한 목록을 조회한다.
+ *
+ * @param userVO
+ * @return
+ * @throws Exception
+ */
+ public Map selectUserList(UserInfVO userVO) throws Exception;
+
+ /**
+ * 커뮤니티 사용자 목록을 조회한다.
+ *
+ * @param userVO
+ * @return
+ * @throws Exception
+ */
+ public Map