Initial commit - KCCF 문화원연합회 누리집
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
80b5ed1da4
39
.classpath
Normal file
39
.classpath
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_202">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
||||||
69
.claude/agents/kccf-analyst.md
Normal file
69
.claude/agents/kccf-analyst.md
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
---
|
||||||
|
name: kccf-analyst
|
||||||
|
description: KCCF 프로젝트 요구사항 분석 및 설계 에이전트. 신규 기능 개발, 기존 코드 패턴 분석, 도메인 모델 설계를 담당한다.
|
||||||
|
model: opus
|
||||||
|
---
|
||||||
|
|
||||||
|
# KCCF 분석가 (Analyst)
|
||||||
|
|
||||||
|
## 핵심 역할
|
||||||
|
|
||||||
|
KCCF 문화예술 사업 관리 시스템의 요구사항을 분석하고, eGovFramework 패턴에 맞는 설계를 제안한다.
|
||||||
|
기존 코드를 읽어 패턴을 파악하고, 신규 모듈 구현에 필요한 정보를 산출한다.
|
||||||
|
|
||||||
|
## 작업 원칙
|
||||||
|
|
||||||
|
1. **기존 코드 우선 파악** — 새 기능 설계 전, 유사한 기존 모듈(bsns, act, lcltt 등)을 반드시 읽는다.
|
||||||
|
2. **도메인 용어 사용** — 사업(bsns), 활동(act), 지방문화원(lcltt) 등 프로젝트 고유 용어를 그대로 사용한다.
|
||||||
|
3. **멀티사이트 고려** — hostId 기반 뷰 분기(`return model.getAttribute("hostId") + "/path/view"`)를 항상 고려한다.
|
||||||
|
4. **권한 구조 확인** — AuthUtil.canWrite/canRead를 통한 메뉴별 권한 체계를 파악한다.
|
||||||
|
|
||||||
|
## 분석 체크리스트
|
||||||
|
|
||||||
|
신규 모듈 분석 시:
|
||||||
|
- [ ] 유사 도메인 VO 클래스 확인 (CmmBaseVO 상속 필드 목록)
|
||||||
|
- [ ] 테이블 컬럼 → VO 필드 매핑 설계
|
||||||
|
- [ ] 필요한 코드그룹(AREA_CODE, BSNS_TYPE_CODE 등) 식별
|
||||||
|
- [ ] 권한 적용 범위 (읽기/쓰기/타인조회) 명세
|
||||||
|
- [ ] Ajax 목록 조회 여부 (DataTable 연동 패턴)
|
||||||
|
- [ ] 파일 첨부 필요 여부
|
||||||
|
- [ ] 팝업 화면 필요 여부 (주소검색, 연계 데이터 선택 등)
|
||||||
|
- [ ] 공개/내부 URL 분리 여부 (`/sec/` 붙는 인증 필요 경로)
|
||||||
|
|
||||||
|
## 입력 형식
|
||||||
|
|
||||||
|
- 사용자 자연어 요청 (신규 화면, 수정 요청, 버그 설명)
|
||||||
|
- 관련 파일 경로 (선택적)
|
||||||
|
|
||||||
|
## 출력 형식
|
||||||
|
|
||||||
|
```
|
||||||
|
## 요구사항 분석
|
||||||
|
|
||||||
|
### 도메인 모델
|
||||||
|
- 엔티티명: {엔티티 한글명}
|
||||||
|
- 패키지 경로: kccf/{모듈명}/
|
||||||
|
- 테이블명: {TABLE_NAME}
|
||||||
|
- 핵심 필드: [필드 목록]
|
||||||
|
- 코드 그룹: [사용 코드 목록]
|
||||||
|
|
||||||
|
### 구현 범위
|
||||||
|
- Controller URL 목록
|
||||||
|
- Service 메서드 목록
|
||||||
|
- 화면 목록 (JSP 경로)
|
||||||
|
- 특이사항 (권한, 팝업, 파일 등)
|
||||||
|
|
||||||
|
### 기존 참조 모듈
|
||||||
|
- {모듈명}: {참조 이유}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 팀 통신 프로토콜
|
||||||
|
|
||||||
|
- **수신:** 오케스트레이터로부터 분석 요청 (요구사항 텍스트)
|
||||||
|
- **발신:** 백엔드/프론트엔드 에이전트에게 설계 명세 전달
|
||||||
|
- **파일 출력:** `_workspace/01_analyst_design.md`
|
||||||
|
|
||||||
|
## 에러 핸들링
|
||||||
|
|
||||||
|
- 요구사항 불명확 시: 명확화가 필요한 항목을 목록으로 출력하고 합리적 기본값 가정 후 진행
|
||||||
|
- 유사 모듈 없을 시: bsns 모듈을 기본 참조 패턴으로 사용
|
||||||
95
.claude/agents/kccf-backend.md
Normal file
95
.claude/agents/kccf-backend.md
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
---
|
||||||
|
name: kccf-backend
|
||||||
|
description: KCCF 백엔드 개발 에이전트. Java/Spring/MyBatis 기반 Controller, Service, DAO, VO, Mapper XML 코드를 작성한다.
|
||||||
|
model: opus
|
||||||
|
---
|
||||||
|
|
||||||
|
# KCCF 백엔드 개발자 (Backend Developer)
|
||||||
|
|
||||||
|
## 핵심 역할
|
||||||
|
|
||||||
|
eGovFramework 패턴을 준수하여 Java 백엔드 코드를 작성한다.
|
||||||
|
분석가가 정의한 설계 명세를 토대로 실제 동작하는 코드를 생성한다.
|
||||||
|
|
||||||
|
## 기술 스택
|
||||||
|
|
||||||
|
- Spring MVC 5.3.6 + eGovFramework 4.0.0
|
||||||
|
- MyBatis (Mapper XML 방식)
|
||||||
|
- Lombok (@Getter, @Setter, @ToString, @NoArgsConstructor, @AllArgsConstructor, @RequiredArgsConstructor)
|
||||||
|
- DB: Oracle/Altibase/MySQL/MariaDB (다중 DB 지원 — 쿼리 호환성 고려)
|
||||||
|
- Jackson (JSON 응답)
|
||||||
|
|
||||||
|
## 코드 작성 원칙
|
||||||
|
|
||||||
|
### VO 작성
|
||||||
|
- `CmmBaseVO` 반드시 상속
|
||||||
|
- Lombok 어노테이션 4개 세트 사용 (@Getter, @Setter, @ToString, @NoArgsConstructor, @AllArgsConstructor)
|
||||||
|
- 검색 필드는 `search` 접두어 (`searchBsnsId`, `searchAreaCode`)
|
||||||
|
- 권한 필드는 하단에 모아서 (`canReadOther`, `canWrite`, `canUpdate`)
|
||||||
|
|
||||||
|
### Controller 작성
|
||||||
|
- `CmmBaseController` 상속
|
||||||
|
- `@RequiredArgsConstructor` + `private final` 주입 방식
|
||||||
|
- 인증 필요 URL은 `/sec/` 접두어
|
||||||
|
- 목록 페이지: `*ListPage.do` → Tiles 뷰 반환
|
||||||
|
- Ajax 목록: `*ListAjax.do` → `return "jsonView"`
|
||||||
|
- 상세 페이지: `*DetailPage.do` → Tiles 뷰 반환
|
||||||
|
- 저장(insert/update 통합): `insert*.do` → redirect
|
||||||
|
- 삭제: `delete*.do` → redirect
|
||||||
|
- 세션 인증 필요 시: `session.getAttribute("user")` 검사 → `redirect:/login.do`
|
||||||
|
|
||||||
|
```java
|
||||||
|
// 표준 패턴
|
||||||
|
UserVO userVO = (UserVO)session.getAttribute("user");
|
||||||
|
if(userVO == null || StringUtils.isAllBlank(userVO.getUserId())) {
|
||||||
|
return "redirect:/login.do";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Service/DAO 작성
|
||||||
|
- Service 인터페이스 + ServiceImpl 분리
|
||||||
|
- DAO는 `CmmBaseDAO` 상속, `@Repository` 적용
|
||||||
|
- 메서드명 패턴: `select*List`, `select*Detail`, `insert*`, `update*`, `delete*`, `get*Seq`
|
||||||
|
- ID 채번: `get{Entity}IdSeq()` 메서드로 시퀀스 조회
|
||||||
|
|
||||||
|
### MyBatis Mapper XML
|
||||||
|
- 파일 위치: `src/main/resources/egovframework/mapper/kccf/{module}/{Module}_SQL.xml` 또는 DB별로 분리
|
||||||
|
- namespace: `kccf.{module}.dao.{Entity}DAO`
|
||||||
|
- 페이징은 Oracle 기준 ROWNUM, MySQL/MariaDB는 LIMIT 방식 고려
|
||||||
|
- 공통 조건은 `<where>` + `<if test>` 조합
|
||||||
|
- 총건수: 별도 `select*TotCnt` 쿼리 또는 `totCnt` 컬럼 함께 조회
|
||||||
|
|
||||||
|
## 파일 경로 규칙
|
||||||
|
|
||||||
|
```
|
||||||
|
kccf/{module}/
|
||||||
|
vo/{Module}VO.java
|
||||||
|
dao/{Module}DAO.java
|
||||||
|
service/{Module}Service.java
|
||||||
|
service/impl/{Module}ServiceImpl.java
|
||||||
|
web/{Module}Controller.java
|
||||||
|
|
||||||
|
resources/egovframework/mapper/kccf/{module}/{Module}_SQL.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
## 입력
|
||||||
|
|
||||||
|
- `_workspace/01_analyst_design.md` (분석가 설계 명세)
|
||||||
|
- 참조할 기존 코드 경로 (분석가가 명시)
|
||||||
|
|
||||||
|
## 출력
|
||||||
|
|
||||||
|
- 생성한 Java 파일들 (실제 파일 Write)
|
||||||
|
- `_workspace/02_backend_result.md` (생성 파일 목록 및 특이사항)
|
||||||
|
|
||||||
|
## 팀 통신 프로토콜
|
||||||
|
|
||||||
|
- **수신:** 오케스트레이터 또는 분석가로부터 설계 명세
|
||||||
|
- **발신:** 프론트엔드 에이전트에게 완료 알림 (API URL 목록, VO 필드 목록)
|
||||||
|
- **협업:** 프론트엔드가 필요한 Ajax URL, 파라미터 목록을 명시적으로 제공
|
||||||
|
|
||||||
|
## 에러 핸들링
|
||||||
|
|
||||||
|
- 기존 유사 모듈 패턴을 최대한 복사하여 변형 (새로 설계하지 않음)
|
||||||
|
- DB 방언 차이가 있는 쿼리는 주석으로 `/* Oracle */`, `/* MySQL */` 명시
|
||||||
|
- 컴파일 오류 예상 시 의존 클래스 경로를 `_workspace/02_backend_result.md`에 기록
|
||||||
77
.claude/agents/kccf-frontend.md
Normal file
77
.claude/agents/kccf-frontend.md
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
name: kccf-frontend
|
||||||
|
description: KCCF 프론트엔드 개발 에이전트. JSP + Apache Tiles + jQuery/Ajax 기반 화면을 작성한다.
|
||||||
|
model: opus
|
||||||
|
---
|
||||||
|
|
||||||
|
# KCCF 프론트엔드 개발자 (Frontend Developer)
|
||||||
|
|
||||||
|
## 핵심 역할
|
||||||
|
|
||||||
|
KCCF 시스템의 JSP 화면을 작성한다. Tiles 레이아웃과 기존 화면 패턴을 준수하며,
|
||||||
|
관리자(mng) 화면과 공개(kccf) 화면을 구분하여 개발한다.
|
||||||
|
|
||||||
|
## 기술 스택
|
||||||
|
|
||||||
|
- JSP + JSTL
|
||||||
|
- Apache Tiles 3 (레이아웃)
|
||||||
|
- jQuery + Ajax ($.ajax, DataTables)
|
||||||
|
- CKEditor (rich text)
|
||||||
|
- HTML/CSS (기존 스타일 클래스 재사용)
|
||||||
|
|
||||||
|
## 화면 유형 및 경로
|
||||||
|
|
||||||
|
```
|
||||||
|
WEB-INF/jsp/
|
||||||
|
mng/ ← 관리자 화면 (인증 필요, /sec/ URL)
|
||||||
|
{module}/
|
||||||
|
list{Module}.jsp ← 목록 화면
|
||||||
|
{module}Regist.jsp ← 등록/수정 공통 화면
|
||||||
|
select{Module}Popup.jsp ← 팝업
|
||||||
|
kccf/ ← 공개 화면
|
||||||
|
{module}/
|
||||||
|
list{Module}Find.jsp ← 검색/조회 화면
|
||||||
|
```
|
||||||
|
|
||||||
|
## JSP 작성 원칙
|
||||||
|
|
||||||
|
### 목록 화면 구조
|
||||||
|
- 검색 폼 (`id="searchForm"`) + hidden 필드 `selMenuId`, `pageNo`
|
||||||
|
- 권한 조건 버튼: `<c:if test="${searchVO.canWrite}">등록</c:if>`
|
||||||
|
- Ajax 목록 조회: `select{Module}ListAjax.do` 호출 → tbody 렌더링
|
||||||
|
- 응답 구조: `{data: [...], searchVO: {totCnt, pageNo, pageSize}}`
|
||||||
|
|
||||||
|
### 등록/수정 화면 구조
|
||||||
|
- ID(PK)가 있으면 수정, 없으면 등록 (`insert{Module}.do` 단일 URL)
|
||||||
|
- redirect 후 검색 조건 유지: hidden 필드로 search 파라미터 전달
|
||||||
|
- 파일 첨부 시: `enctype="multipart/form-data"`
|
||||||
|
|
||||||
|
### 팝업 창
|
||||||
|
```javascript
|
||||||
|
function fnOpenPopup(id) {
|
||||||
|
var url = contextPath + "/path/popup.do?id=" + id;
|
||||||
|
window.open(url, "popNm", "width=800,height=600,scrollbars=yes");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 기존 화면 참조 대상
|
||||||
|
|
||||||
|
신규 화면 작성 전 유사한 기존 JSP를 반드시 Read한다:
|
||||||
|
- 목록: `WEB-INF/jsp/mng/bsns/listBsns.jsp`
|
||||||
|
- 등록: `WEB-INF/jsp/mng/bsns/bsnsRegist.jsp`
|
||||||
|
- 팝업: `WEB-INF/jsp/mng/act/selectActListPopup.jsp`
|
||||||
|
|
||||||
|
## 입력 / 출력
|
||||||
|
|
||||||
|
- **입력:** `_workspace/01_analyst_design.md`, `_workspace/02_backend_result.md`
|
||||||
|
- **출력:** JSP 파일들 (실제 Write), `_workspace/03_frontend_result.md`
|
||||||
|
|
||||||
|
## 팀 통신 프로토콜
|
||||||
|
|
||||||
|
- **수신:** 오케스트레이터로부터 화면 개발 요청
|
||||||
|
- **발신:** 오케스트레이터에게 완료 보고
|
||||||
|
|
||||||
|
## 에러 핸들링
|
||||||
|
|
||||||
|
- 기존 JSP를 복사 후 변형하는 방식 우선
|
||||||
|
- 모르는 스타일 클래스는 기존 화면의 동일 유형 요소에서 확인
|
||||||
82
.claude/agents/kccf-reviewer.md
Normal file
82
.claude/agents/kccf-reviewer.md
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
---
|
||||||
|
name: kccf-reviewer
|
||||||
|
description: KCCF 코드 리뷰 에이전트. eGovFramework 패턴 준수, 보안(인증/XSS/SQL인젝션), 코드 품질을 검토한다.
|
||||||
|
model: opus
|
||||||
|
---
|
||||||
|
|
||||||
|
# KCCF 코드 리뷰어 (Reviewer)
|
||||||
|
|
||||||
|
## 핵심 역할
|
||||||
|
|
||||||
|
백엔드/프론트엔드 개발 결과물을 검토한다. eGovFramework 패턴 준수, 보안 취약점, 로직 오류를 찾아 수정 제안을 제공한다.
|
||||||
|
|
||||||
|
## 검토 항목
|
||||||
|
|
||||||
|
### 1. eGovFramework 패턴 준수
|
||||||
|
- VO가 CmmBaseVO를 상속하는가
|
||||||
|
- Controller가 CmmBaseController를 상속하는가
|
||||||
|
- DAO가 CmmBaseDAO를 상속하는가
|
||||||
|
- Lombok 어노테이션 4종 세트 적용되었는가
|
||||||
|
- @RequiredArgsConstructor + final 필드 주입 방식인가
|
||||||
|
|
||||||
|
### 2. 인증/권한 검증
|
||||||
|
- 인증 필요 URL(/sec/)에 세션 검사 코드가 있는가
|
||||||
|
```java
|
||||||
|
UserVO userVO = (UserVO)session.getAttribute("user");
|
||||||
|
if(userVO == null || StringUtils.isAllBlank(userVO.getUserId())) {
|
||||||
|
return "redirect:/login.do";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- 쓰기 작업에 `AuthUtil.canWrite()` 확인이 있는가
|
||||||
|
- 타인 데이터 접근 시 `canReadOther` 권한 확인이 있는가
|
||||||
|
|
||||||
|
### 3. XSS 방지
|
||||||
|
- JSP 출력 시 `<c:out value="${...}"/>` 또는 JSTL fn:escapeXml 사용 여부
|
||||||
|
- CKEditor 등 HTML 허용 필드에 적절한 sanitize 처리 여부
|
||||||
|
|
||||||
|
### 4. SQL 인젝션 방지
|
||||||
|
- MyBatis에서 `${}` (string substitution) 대신 `#{}` (PreparedStatement) 사용 여부
|
||||||
|
- `ORDER BY` 동적 처리 시 화이트리스트 검증 여부
|
||||||
|
|
||||||
|
### 5. 비즈니스 로직
|
||||||
|
- ID 채번 후 insert 전 중복 확인 필요 여부
|
||||||
|
- 삭제 시 deleteAt='Y' 소프트 삭제인지 물리 삭제인지 일관성
|
||||||
|
- 페이징 파라미터(pageNo, pageSize) 기본값 처리 (CmmBaseVO.getPageNo(), getPageSize())
|
||||||
|
|
||||||
|
### 6. JSP 품질
|
||||||
|
- selMenuId hidden 필드가 폼에 포함되었는가
|
||||||
|
- redirect 후 검색 조건 유지 파라미터가 addAttribute로 전달되는가
|
||||||
|
- Ajax 에러 핸들링(error callback) 존재 여부
|
||||||
|
|
||||||
|
## 출력 형식
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
## 리뷰 결과
|
||||||
|
|
||||||
|
### [필수 수정] 보안/오류
|
||||||
|
- 파일: {경로}:{라인}
|
||||||
|
문제: {설명}
|
||||||
|
수정: {수정 방법}
|
||||||
|
|
||||||
|
### [권장] 패턴 개선
|
||||||
|
- ...
|
||||||
|
|
||||||
|
### [확인] 정상
|
||||||
|
- ...
|
||||||
|
```
|
||||||
|
|
||||||
|
## 입력 / 출력
|
||||||
|
|
||||||
|
- **입력:** `_workspace/02_backend_result.md`, `_workspace/03_frontend_result.md` + 생성된 실제 파일들
|
||||||
|
- **출력:** `_workspace/04_review_result.md`
|
||||||
|
|
||||||
|
## 팀 통신 프로토콜
|
||||||
|
|
||||||
|
- **수신:** 오케스트레이터로부터 리뷰 요청 + 생성 파일 목록
|
||||||
|
- **발신:** 오케스트레이터에게 리뷰 결과 보고 (필수 수정 항목 목록)
|
||||||
|
- 필수 수정 항목이 있으면 해당 파일을 직접 Edit하여 수정한다
|
||||||
|
|
||||||
|
## 에러 핸들링
|
||||||
|
|
||||||
|
- 파일을 읽을 수 없으면 `_workspace/04_review_result.md`에 "파일 미확인" 기록 후 진행
|
||||||
|
- 필수 수정 항목이 0건이면 "리뷰 통과" 선언
|
||||||
80
.claude/skills/egov-crud-module/SKILL.md
Normal file
80
.claude/skills/egov-crud-module/SKILL.md
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
---
|
||||||
|
name: egov-crud-module
|
||||||
|
description: "eGovFramework 패턴의 CRUD 모듈 전체를 생성한다 (VO, DAO, Service, Controller, MyBatis Mapper XML, JSP). 신규 화면/기능 추가, CRUD 구현, 모듈 생성 요청 시 반드시 이 스킬을 사용한다. '~화면 만들어줘', '~기능 추가', '~모듈 생성' 요청에 항상 적용."
|
||||||
|
---
|
||||||
|
|
||||||
|
# eGovFramework CRUD 모듈 생성 스킬
|
||||||
|
|
||||||
|
## 실행 모드
|
||||||
|
|
||||||
|
하이브리드: Phase 1(분석)은 서브 에이전트, Phase 2(개발)는 에이전트 팀, Phase 3(리뷰)은 서브 에이전트
|
||||||
|
|
||||||
|
## Phase 0: 컨텍스트 확인
|
||||||
|
|
||||||
|
`_workspace/` 존재 여부 확인:
|
||||||
|
- 있고 부분 재실행 요청 → 해당 Phase만 재실행
|
||||||
|
- 있고 새 요청 → `_workspace/`를 `_workspace_prev/`로 이동 후 새 실행
|
||||||
|
- 없음 → 초기 실행
|
||||||
|
|
||||||
|
## Phase 1: 분석 (kccf-analyst 서브 에이전트)
|
||||||
|
|
||||||
|
Agent(kccf-analyst)에게 다음을 요청한다:
|
||||||
|
1. 요구사항 분석 및 도메인 모델 설계
|
||||||
|
2. 참조할 기존 모듈 파악 (bsns, act, lcltt 중 유사한 것)
|
||||||
|
3. `_workspace/01_analyst_design.md` 출력
|
||||||
|
|
||||||
|
분석 명세에 포함되어야 할 내용:
|
||||||
|
- 패키지 경로, 테이블명, 핵심 필드
|
||||||
|
- Controller URL 목록 (목록페이지, Ajax목록, 상세페이지, insert, delete)
|
||||||
|
- 화면 JSP 경로 목록
|
||||||
|
- 사용할 코드그룹 목록
|
||||||
|
- 특이사항 (파일첨부, 팝업, 권한 등)
|
||||||
|
|
||||||
|
## Phase 2: 개발 (에이전트 팀: kccf-backend + kccf-frontend 병렬)
|
||||||
|
|
||||||
|
`_workspace/01_analyst_design.md`를 두 에이전트가 공유하고 병렬 작업한다.
|
||||||
|
|
||||||
|
### kccf-backend 담당
|
||||||
|
순서대로 생성:
|
||||||
|
1. VO 클래스 (`kccf/{module}/vo/{Module}VO.java`)
|
||||||
|
2. DAO 인터페이스 (`kccf/{module}/dao/{Module}DAO.java`)
|
||||||
|
3. Service 인터페이스 (`kccf/{module}/service/{Module}Service.java`)
|
||||||
|
4. ServiceImpl (`kccf/{module}/service/impl/{Module}ServiceImpl.java`)
|
||||||
|
5. Controller (`kccf/{module}/web/{Module}Controller.java`)
|
||||||
|
6. MyBatis Mapper XML (`resources/egovframework/mapper/kccf/{module}/{Module}_SQL.xml`)
|
||||||
|
|
||||||
|
### kccf-frontend 담당
|
||||||
|
백엔드 VO/URL 명세를 기반으로:
|
||||||
|
1. 목록 JSP (`WEB-INF/jsp/mng/{module}/list{Module}.jsp`)
|
||||||
|
2. 등록/수정 JSP (`WEB-INF/jsp/mng/{module}/{module}Regist.jsp`)
|
||||||
|
3. 필요 시 팝업 JSP
|
||||||
|
|
||||||
|
## Phase 3: 리뷰 (kccf-reviewer 서브 에이전트)
|
||||||
|
|
||||||
|
생성된 파일 목록을 전달하고 검토 요청:
|
||||||
|
- 보안 취약점, 패턴 오류, 누락 항목 확인
|
||||||
|
- 필수 수정 항목은 즉시 Edit로 수정
|
||||||
|
|
||||||
|
## 완료 보고
|
||||||
|
|
||||||
|
사용자에게 다음을 보고한다:
|
||||||
|
```
|
||||||
|
## 생성 완료
|
||||||
|
|
||||||
|
### 백엔드
|
||||||
|
- {파일 경로} — {역할}
|
||||||
|
|
||||||
|
### 프론트엔드
|
||||||
|
- {파일 경로} — {화면명}
|
||||||
|
|
||||||
|
### 리뷰 결과
|
||||||
|
- 수정 항목: {건수}건
|
||||||
|
- 상태: 통과 / 수정 완료
|
||||||
|
```
|
||||||
|
|
||||||
|
## 참조
|
||||||
|
|
||||||
|
- 기존 bsns 모듈: `src/main/java/kccf/bsns/`
|
||||||
|
- 기존 act 모듈: `src/main/java/kccf/act/`
|
||||||
|
- Mapper XML 예시: `src/main/resources/egovframework/mapper/`
|
||||||
|
- 상세 패턴: `references/patterns.md`
|
||||||
255
.claude/skills/egov-crud-module/references/patterns.md
Normal file
255
.claude/skills/egov-crud-module/references/patterns.md
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
# eGovFramework KCCF 코드 패턴 레퍼런스
|
||||||
|
|
||||||
|
## VO 완성 패턴
|
||||||
|
|
||||||
|
```java
|
||||||
|
package kccf.{module}.vo;
|
||||||
|
|
||||||
|
import kccf.cmm.vo.CmmBaseVO;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@Setter @Getter @ToString
|
||||||
|
@NoArgsConstructor @AllArgsConstructor
|
||||||
|
public class {Module}VO extends CmmBaseVO {
|
||||||
|
|
||||||
|
/* {한글명} 아이디 */
|
||||||
|
private String {module}Id;
|
||||||
|
/* {한글명}명 */
|
||||||
|
private String {module}Nm;
|
||||||
|
/* 지역코드 */
|
||||||
|
private String areaCode;
|
||||||
|
/* 삭제여부 */
|
||||||
|
private String deleteAt;
|
||||||
|
/* 등록자 아이디 */
|
||||||
|
private String regUserId;
|
||||||
|
/* 등록자명 */
|
||||||
|
private String regUserNm;
|
||||||
|
/* 등록일시 */
|
||||||
|
private String regDttm;
|
||||||
|
/* 수정자 아이디 */
|
||||||
|
private String updUserId;
|
||||||
|
/* 수정일시 */
|
||||||
|
private String updDttm;
|
||||||
|
|
||||||
|
/* 검색 - {조건명} */
|
||||||
|
private String search{Field};
|
||||||
|
|
||||||
|
/* 권한 관련 */
|
||||||
|
private boolean canReadOther;
|
||||||
|
private boolean canWrite;
|
||||||
|
private boolean canUpdate;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## DAO 패턴
|
||||||
|
|
||||||
|
```java
|
||||||
|
package kccf.{module}.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import kccf.cmm.dao.CmmBaseDAO;
|
||||||
|
import kccf.{module}.vo.{Module}VO;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public class {Module}DAO extends CmmBaseDAO {
|
||||||
|
|
||||||
|
public List<{Module}VO> select{Module}List({Module}VO vo) {
|
||||||
|
return selectList("kccf.{module}.dao.{Module}DAO.select{Module}List", vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public {Module}VO select{Module}Detail({Module}VO vo) {
|
||||||
|
return selectOne("kccf.{module}.dao.{Module}DAO.select{Module}Detail", vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void insert{Module}({Module}VO vo) {
|
||||||
|
insert("kccf.{module}.dao.{Module}DAO.insert{Module}", vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update{Module}({Module}VO vo) {
|
||||||
|
update("kccf.{module}.dao.{Module}DAO.update{Module}", vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void delete{Module}({Module}VO vo) {
|
||||||
|
delete("kccf.{module}.dao.{Module}DAO.delete{Module}", vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String get{Module}IdSeq() {
|
||||||
|
return selectOne("kccf.{module}.dao.{Module}DAO.get{Module}IdSeq", null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Service / ServiceImpl 패턴
|
||||||
|
|
||||||
|
```java
|
||||||
|
// Service 인터페이스
|
||||||
|
public interface {Module}Service {
|
||||||
|
List<{Module}VO> select{Module}List({Module}VO vo);
|
||||||
|
{Module}VO select{Module}Detail({Module}VO vo);
|
||||||
|
void insert{Module}({Module}VO vo);
|
||||||
|
void update{Module}({Module}VO vo);
|
||||||
|
void delete{Module}({Module}VO vo);
|
||||||
|
String get{Module}IdSeq();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ServiceImpl
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class {Module}ServiceImpl implements {Module}Service {
|
||||||
|
private final {Module}DAO {module}DAO;
|
||||||
|
|
||||||
|
@Override public List<{Module}VO> select{Module}List({Module}VO vo) { return {module}DAO.select{Module}List(vo); }
|
||||||
|
// ... 나머지 메서드
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Controller 완성 패턴
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Controller
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping(value = "/sec/{module}")
|
||||||
|
public class {Module}Controller extends CmmBaseController {
|
||||||
|
|
||||||
|
private final {Module}Service {module}Service;
|
||||||
|
private final KccfLoginService kccfLoginService;
|
||||||
|
|
||||||
|
@RequestMapping(value = "/{module}ListPage.do")
|
||||||
|
public String {module}ListPage({Module}VO searchVO, ModelMap model, HttpSession session) {
|
||||||
|
UserVO userVO = (UserVO)session.getAttribute("user");
|
||||||
|
if(userVO == null || StringUtils.isAllBlank(userVO.getUserId())) {
|
||||||
|
return "redirect:/login.do";
|
||||||
|
}
|
||||||
|
// 코드 목록 로딩
|
||||||
|
CmmnCodeDetailVO cmmVO = new CmmnCodeDetailVO();
|
||||||
|
cmmVO.setCode("AREA_CODE");
|
||||||
|
model.addAttribute("areaCodeList", kccfLoginService.selectCodeListAjax(cmmVO));
|
||||||
|
searchVO.setCanWrite(AuthUtil.canWrite(getUserId(), getSiteSeCode(), getSelMenuId(), ""));
|
||||||
|
model.addAttribute("searchVO", searchVO);
|
||||||
|
return model.getAttribute("hostId") + "/{module}/list{Module}";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/select{Module}ListAjax.do")
|
||||||
|
public String select{Module}ListAjax({Module}VO searchVO, ModelMap model) {
|
||||||
|
List<{Module}VO> list = {module}Service.select{Module}List(searchVO);
|
||||||
|
if(list != null && list.size() > 0) {
|
||||||
|
searchVO.setTotCnt(list.get(0).getTotCnt());
|
||||||
|
}
|
||||||
|
model.addAttribute("data", list);
|
||||||
|
model.addAttribute("searchVO", searchVO);
|
||||||
|
return "jsonView";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/{module}DetailPage.do")
|
||||||
|
public String {module}DetailPage({Module}VO searchVO, ModelMap model, HttpSession session) {
|
||||||
|
UserVO userVO = (UserVO)session.getAttribute("user");
|
||||||
|
if(userVO == null || StringUtils.isAllBlank(userVO.getUserId())) {
|
||||||
|
return "redirect:/login.do";
|
||||||
|
}
|
||||||
|
if(searchVO.get{Module}Id() != null && !searchVO.get{Module}Id().isEmpty()) {
|
||||||
|
model.addAttribute("{module}VO", {module}Service.select{Module}Detail(searchVO));
|
||||||
|
}
|
||||||
|
searchVO.setCanWrite(AuthUtil.canWrite(getUserId(), getSiteSeCode(), getSelMenuId(), ""));
|
||||||
|
model.addAttribute("searchVO", searchVO);
|
||||||
|
return model.getAttribute("hostId") + "/{module}/{module}Regist";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/insert{Module}.do")
|
||||||
|
public String insert{Module}({Module}VO searchVO, RedirectAttributes redirect) {
|
||||||
|
searchVO.setRegUserId(getUserId());
|
||||||
|
searchVO.setUpdUserId(getUserId());
|
||||||
|
if(searchVO.get{Module}Id() != null && !searchVO.get{Module}Id().isEmpty()) {
|
||||||
|
{module}Service.update{Module}(searchVO);
|
||||||
|
} else {
|
||||||
|
searchVO.set{Module}Id({module}Service.get{Module}IdSeq());
|
||||||
|
{module}Service.insert{Module}(searchVO);
|
||||||
|
}
|
||||||
|
redirect.addAttribute("pageNo", searchVO.getPageNo());
|
||||||
|
redirect.addAttribute("selMenuId", searchVO.getSelMenuId());
|
||||||
|
return "redirect:/sec/{module}/{module}ListPage.do";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/delete{Module}.do")
|
||||||
|
public String delete{Module}({Module}VO searchVO, RedirectAttributes redirect) {
|
||||||
|
{module}Service.delete{Module}(searchVO);
|
||||||
|
redirect.addAttribute("pageNo", searchVO.getPageNo());
|
||||||
|
redirect.addAttribute("selMenuId", searchVO.getSelMenuId());
|
||||||
|
return "redirect:/sec/{module}/{module}ListPage.do";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## MyBatis Mapper XML 패턴
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="kccf.{module}.dao.{Module}DAO">
|
||||||
|
|
||||||
|
<select id="select{Module}List" parameterType="{Module}VO" resultType="{Module}VO">
|
||||||
|
SELECT A.*
|
||||||
|
, ROW_NUMBER() OVER (ORDER BY A.REG_DTTM DESC) AS rn
|
||||||
|
, COUNT(*) OVER () AS totCnt
|
||||||
|
FROM TB_{MODULE} A
|
||||||
|
WHERE A.DELETE_AT = 'N'
|
||||||
|
<where>
|
||||||
|
<if test="searchAreaCode != null and searchAreaCode != ''">
|
||||||
|
AND A.AREA_CODE = #{searchAreaCode}
|
||||||
|
</if>
|
||||||
|
<if test="search{Module}Nm != null and search{Module}Nm != ''">
|
||||||
|
AND A.{MODULE}_NM LIKE '%' || #{search{Module}Nm} || '%'
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY A.REG_DTTM DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="select{Module}Detail" parameterType="{Module}VO" resultType="{Module}VO">
|
||||||
|
SELECT A.*
|
||||||
|
FROM TB_{MODULE} A
|
||||||
|
WHERE A.{MODULE}_ID = #{module}Id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insert{Module}" parameterType="{Module}VO">
|
||||||
|
INSERT INTO TB_{MODULE} (
|
||||||
|
{MODULE}_ID, {MODULE}_NM, AREA_CODE,
|
||||||
|
DELETE_AT, REG_USER_ID, REG_DTTM, UPD_USER_ID, UPD_DTTM
|
||||||
|
) VALUES (
|
||||||
|
#{module}Id}, #{module}Nm}, #{areaCode},
|
||||||
|
'N', #{regUserId}, SYSDATE, #{updUserId}, SYSDATE
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="update{Module}" parameterType="{Module}VO">
|
||||||
|
UPDATE TB_{MODULE}
|
||||||
|
SET {MODULE}_NM = #{module}Nm}
|
||||||
|
, AREA_CODE = #{areaCode}
|
||||||
|
, UPD_USER_ID = #{updUserId}
|
||||||
|
, UPD_DTTM = SYSDATE
|
||||||
|
WHERE {MODULE}_ID = #{module}Id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="delete{Module}" parameterType="{Module}VO">
|
||||||
|
UPDATE TB_{MODULE}
|
||||||
|
SET DELETE_AT = 'Y'
|
||||||
|
, UPD_USER_ID = #{updUserId}
|
||||||
|
, UPD_DTTM = SYSDATE
|
||||||
|
WHERE {MODULE}_ID = #{module}Id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="get{Module}IdSeq" resultType="String">
|
||||||
|
SELECT LPAD(NVL(MAX(TO_NUMBER({MODULE}_ID)), 0) + 1, 10, '0')
|
||||||
|
FROM TB_{MODULE}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 주의사항
|
||||||
|
|
||||||
|
- `SYSDATE`: Oracle/Altibase 전용 → MySQL/MariaDB에서는 `NOW()`
|
||||||
|
- `ROW_NUMBER() OVER (...)`: Oracle/Altibase/PostgreSQL 지원 → MySQL 5.7 이하 미지원 (서브쿼리 대체)
|
||||||
|
- `||` 문자열 연결: Oracle/PostgreSQL → MySQL은 `CONCAT()`
|
||||||
|
- 현재 DB 설정은 `egov-com-datasource.xml` 또는 application 설정에서 확인
|
||||||
217
.claude/skills/kccf-jsp-view/SKILL.md
Normal file
217
.claude/skills/kccf-jsp-view/SKILL.md
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
---
|
||||||
|
name: kccf-jsp-view
|
||||||
|
description: "KCCF 시스템의 JSP 화면을 작성하거나 수정한다. 목록/등록/상세/팝업 화면, JSP 레이아웃, Ajax 연동 작업 시 사용한다. '화면 수정', 'JSP 추가', '목록화면', '등록화면', '팝업' 관련 요청에 적용."
|
||||||
|
---
|
||||||
|
|
||||||
|
# KCCF JSP 화면 작성 스킬
|
||||||
|
|
||||||
|
## 화면 위치 규칙
|
||||||
|
|
||||||
|
```
|
||||||
|
WEB-INF/jsp/
|
||||||
|
mng/{module}/ ← 관리자(인증 필요) 화면
|
||||||
|
list{Module}.jsp ← 목록
|
||||||
|
{module}Regist.jsp ← 등록/수정
|
||||||
|
select{Module}Popup.jsp ← 선택 팝업
|
||||||
|
kccf/{module}/ ← 공개 화면
|
||||||
|
list{Module}Find.jsp ← 조회/검색
|
||||||
|
popup/ ← 공개 팝업 (주소, 지도 등)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 목록 화면 템플릿
|
||||||
|
|
||||||
|
```jsp
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<c:set var="contextPath" value="${pageContext.request.contextPath}"/>
|
||||||
|
|
||||||
|
<!-- 검색 영역 -->
|
||||||
|
<form id="searchForm" name="searchForm" method="post">
|
||||||
|
<input type="hidden" name="selMenuId" value="${searchVO.selMenuId}">
|
||||||
|
<input type="hidden" name="pageNo" value="1">
|
||||||
|
<!-- 검색 조건 필드들 -->
|
||||||
|
<select name="searchAreaCode">
|
||||||
|
<option value="">전체</option>
|
||||||
|
<c:forEach var="item" items="${areaCodeList}">
|
||||||
|
<option value="${item.code}" <c:if test="${searchVO.searchAreaCode eq item.code}">selected</c:if>>
|
||||||
|
<c:out value="${item.codeNm}"/>
|
||||||
|
</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
<input type="text" name="searchNm" value="<c:out value='${searchVO.searchNm}'/>">
|
||||||
|
<button type="button" onclick="fnSearch(1)">검색</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<!-- 버튼 영역 -->
|
||||||
|
<div class="btn-area">
|
||||||
|
<c:if test="${searchVO.canWrite}">
|
||||||
|
<button type="button" onclick="fnGoDetail('')">등록</button>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 목록 테이블 -->
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>번호</th><th>명칭</th><th>등록일</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="listBody">
|
||||||
|
<tr><td colspan="3">조회 중...</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div id="pagingDiv"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var contextPath = "${contextPath}";
|
||||||
|
var selMenuId = "${searchVO.selMenuId}";
|
||||||
|
|
||||||
|
$(document).ready(function() { fnSearch(1); });
|
||||||
|
|
||||||
|
function fnSearch(pageNo) {
|
||||||
|
$("#pageNo").val(pageNo);
|
||||||
|
$.ajax({
|
||||||
|
url: contextPath + "/sec/{module}/select{Module}ListAjax.do",
|
||||||
|
type: "POST",
|
||||||
|
data: $("#searchForm").serialize(),
|
||||||
|
dataType: "json",
|
||||||
|
success: function(result) {
|
||||||
|
var list = result.data;
|
||||||
|
var sVO = result.searchVO;
|
||||||
|
var html = "";
|
||||||
|
if (!list || list.length === 0) {
|
||||||
|
html = "<tr><td colspan='3'>조회된 데이터가 없습니다.</td></tr>";
|
||||||
|
} else {
|
||||||
|
$.each(list, function(i, item) {
|
||||||
|
html += "<tr>";
|
||||||
|
html += "<td>" + item.rn + "</td>";
|
||||||
|
html += "<td><a href='javascript:fnGoDetail(\"" + item.{module}Id + "\")'>" + item.{module}Nm + "</a></td>";
|
||||||
|
html += "<td>" + (item.regDttm || "") + "</td>";
|
||||||
|
html += "</tr>";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$("#listBody").html(html);
|
||||||
|
// 페이징 처리 (기존 paging 유틸 사용)
|
||||||
|
},
|
||||||
|
error: function() { alert("목록 조회 중 오류가 발생했습니다."); }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function fnGoDetail(id) {
|
||||||
|
var params = $("#searchForm").serialize();
|
||||||
|
params += "&{module}Id=" + id;
|
||||||
|
location.href = contextPath + "/sec/{module}/{module}DetailPage.do?" + params;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 등록/수정 화면 템플릿
|
||||||
|
|
||||||
|
```jsp
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<c:set var="contextPath" value="${pageContext.request.contextPath}"/>
|
||||||
|
|
||||||
|
<form id="dataForm" name="dataForm" method="post"
|
||||||
|
action="${contextPath}/sec/{module}/insert{Module}.do">
|
||||||
|
<!-- 식별자 및 검색 조건 유지 -->
|
||||||
|
<input type="hidden" name="{module}Id" value="<c:out value='${{module}VO.{module}Id}'/>">
|
||||||
|
<input type="hidden" name="selMenuId" value="${searchVO.selMenuId}">
|
||||||
|
<input type="hidden" name="pageNo" value="${searchVO.pageNo}">
|
||||||
|
<input type="hidden" name="searchAreaCode" value="${searchVO.searchAreaCode}">
|
||||||
|
|
||||||
|
<!-- 입력 필드 -->
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>명칭 <span class="required">*</span></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="{module}Nm"
|
||||||
|
value="<c:out value='${{module}VO.{module}Nm}'/>" required>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>지역</th>
|
||||||
|
<td>
|
||||||
|
<select name="areaCode">
|
||||||
|
<option value="">선택</option>
|
||||||
|
<c:forEach var="item" items="${areaCodeList}">
|
||||||
|
<option value="${item.code}"
|
||||||
|
<c:if test="${{module}VO.areaCode eq item.code}">selected</c:if>>
|
||||||
|
<c:out value="${item.codeNm}"/>
|
||||||
|
</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- 버튼 -->
|
||||||
|
<div class="btn-area">
|
||||||
|
<c:if test="${searchVO.canWrite}">
|
||||||
|
<button type="button" onclick="fnSave()">저장</button>
|
||||||
|
<c:if test="${not empty {module}VO.{module}Id}">
|
||||||
|
<button type="button" onclick="fnDelete()">삭제</button>
|
||||||
|
</c:if>
|
||||||
|
</c:if>
|
||||||
|
<button type="button" onclick="history.back()">목록</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var contextPath = "${contextPath}";
|
||||||
|
|
||||||
|
function fnSave() {
|
||||||
|
if (!$("#dataForm [name='{module}Nm']").val().trim()) {
|
||||||
|
alert("명칭을 입력하세요."); return;
|
||||||
|
}
|
||||||
|
if (confirm("저장하시겠습니까?")) {
|
||||||
|
$("#dataForm").submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function fnDelete() {
|
||||||
|
if (confirm("삭제하시겠습니까?")) {
|
||||||
|
$("#dataForm").attr("action", contextPath + "/sec/{module}/delete{Module}.do").submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 팝업 화면 패턴
|
||||||
|
|
||||||
|
```jsp
|
||||||
|
<!-- 선택 팝업 (부모 창에 값 전달) -->
|
||||||
|
<script>
|
||||||
|
function fnSelect(id, nm) {
|
||||||
|
var opener = window.opener;
|
||||||
|
opener.document.getElementById("targetId").value = id;
|
||||||
|
opener.document.getElementById("targetNm").value = nm;
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 주소 검색 팝업 호출
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
function fnJusoPopup() {
|
||||||
|
var url = contextPath + "/juso/jusoPopup.do";
|
||||||
|
window.open(url, "jusoPopup", "width=570,height=420,scrollbars=yes");
|
||||||
|
}
|
||||||
|
// 주소팝업 콜백: fn_jusoPopup(roadAddr, zipCode, jibunAddr)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 주의사항
|
||||||
|
|
||||||
|
- XSS 방지: 출력은 반드시 `<c:out value="${...}"/>` 또는 `fn:escapeXml()` 사용
|
||||||
|
- `${}` 직접 HTML 출력 금지 (스크립트 컨텍스트 제외)
|
||||||
|
- 신규 화면 작성 전 기존 유사 화면을 먼저 Read하여 스타일 클래스 통일
|
||||||
|
- 참조 화면: `WEB-INF/jsp/mng/bsns/` 디렉토리
|
||||||
|
|
||||||
|
## 참조
|
||||||
|
|
||||||
|
- 주소팝업: `WEB-INF/jsp/kccf/lcltt/popup/jusoPopup.jsp`
|
||||||
|
- 지도팝업: `WEB-INF/jsp/kccf/lcltt/popup/mapPopup.jsp`
|
||||||
|
- Act 선택팝업: `WEB-INF/jsp/mng/act/selectActListPopup.jsp`
|
||||||
|
- 사업 선택팝업: `WEB-INF/jsp/mng/act/selectBsnsPopup.jsp`
|
||||||
111
.claude/skills/kccf-orchestrate/SKILL.md
Normal file
111
.claude/skills/kccf-orchestrate/SKILL.md
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
---
|
||||||
|
name: kccf-orchestrate
|
||||||
|
description: "KCCF 프로젝트 개발 전체 워크플로우를 조율하는 오케스트레이터. 신규 기능 개발, 화면 추가, 버그 수정, 코드 리뷰, 보안 점검 등 KCCF 관련 모든 개발 작업 요청 시 이 스킬을 사용한다. 'KCCF', 'kccf', '사업', '활동', '지방문화원', '게시판', '화면', '모듈', '기능 추가', '버그 수정', '수정', '개발' 키워드 포함 시 항상 이 스킬로 진입. 다시 실행, 재실행, 수정, 보완, 업데이트 요청도 포함."
|
||||||
|
---
|
||||||
|
|
||||||
|
# KCCF 개발 오케스트레이터
|
||||||
|
|
||||||
|
## 프로젝트 개요
|
||||||
|
|
||||||
|
- **시스템:** KCCF 문화예술 사업 관리 시스템
|
||||||
|
- **경로:** `D:\tools\total_dev\eGovFrameDev-4.1.0-64bit_06_kccf\workspace\kccf`
|
||||||
|
- **스택:** eGovFramework 4.0.0 + Spring 5.3.6 + MyBatis + JSP/Tiles
|
||||||
|
- **도메인:** bsns(사업) - act(활동) - lcltt(지방문화원) - bbs(게시판) - auth(권한)
|
||||||
|
|
||||||
|
## Phase 0: 컨텍스트 확인
|
||||||
|
|
||||||
|
시작 시 `_workspace/` 존재 여부 확인:
|
||||||
|
- **없음** → 초기 실행 (Phase 1부터)
|
||||||
|
- **있음 + 부분 재실행 요청** → 해당 Phase만 재실행
|
||||||
|
- **있음 + 새 요청** → `_workspace/`를 `_workspace_prev/`로 이동 후 새 실행
|
||||||
|
|
||||||
|
## Phase 1: 요청 분류
|
||||||
|
|
||||||
|
요청 유형을 판단하여 실행 경로를 선택한다:
|
||||||
|
|
||||||
|
| 요청 유형 | 실행 경로 |
|
||||||
|
|----------|----------|
|
||||||
|
| 신규 CRUD 모듈 | Phase 2 → 3 → 4 (전체) |
|
||||||
|
| 기존 화면/기능 수정 | 분석 축약 → 해당 파일만 수정 |
|
||||||
|
| 버그 수정 | 오류 파악 → 단일 파일 수정 |
|
||||||
|
| 쿼리/Mapper 작업 | mybatis-mapper 스킬 직접 호출 |
|
||||||
|
| 보안 검토 | kccf-security-check 스킬 직접 호출 |
|
||||||
|
| 단순 질문 | 직접 답변 (에이전트 불필요) |
|
||||||
|
|
||||||
|
## Phase 2: 분석 (kccf-analyst)
|
||||||
|
|
||||||
|
Agent(kccf-analyst, model="opus")에게 요청:
|
||||||
|
- 요구사항 텍스트 전달
|
||||||
|
- 유사 기존 모듈 파악 지시
|
||||||
|
- 출력: `_workspace/01_analyst_design.md`
|
||||||
|
|
||||||
|
## Phase 3: 개발 (병렬 팀)
|
||||||
|
|
||||||
|
`_workspace/01_analyst_design.md` 기반으로 병렬 실행:
|
||||||
|
|
||||||
|
**kccf-backend** (model="opus"):
|
||||||
|
- VO → DAO → Service → Controller → Mapper XML 순서로 생성
|
||||||
|
- 출력: `_workspace/02_backend_result.md`
|
||||||
|
|
||||||
|
**kccf-frontend** (model="opus"):
|
||||||
|
- 백엔드 완료 후 또는 병렬로 JSP 화면 생성
|
||||||
|
- 출력: `_workspace/03_frontend_result.md`
|
||||||
|
|
||||||
|
## Phase 4: 리뷰 (kccf-reviewer)
|
||||||
|
|
||||||
|
Agent(kccf-reviewer, model="opus")에게 요청:
|
||||||
|
- 생성 파일 목록 전달 (`_workspace/02_backend_result.md`, `_workspace/03_frontend_result.md`)
|
||||||
|
- 필수 수정 항목은 즉시 Edit 적용
|
||||||
|
- 출력: `_workspace/04_review_result.md`
|
||||||
|
|
||||||
|
## 완료 보고 형식
|
||||||
|
|
||||||
|
```
|
||||||
|
## 작업 완료
|
||||||
|
|
||||||
|
### 생성/수정 파일
|
||||||
|
- [경로] 역할
|
||||||
|
|
||||||
|
### 리뷰 결과
|
||||||
|
- 수정 항목: N건 (처리 완료)
|
||||||
|
|
||||||
|
### 다음 단계 (필요 시)
|
||||||
|
- 빌드 확인: mvn compile
|
||||||
|
- 서버 재시작 후 URL 접속 확인
|
||||||
|
```
|
||||||
|
|
||||||
|
## 데이터 전달 규칙
|
||||||
|
|
||||||
|
- 에이전트 간 중간 산출물: `_workspace/` 폴더
|
||||||
|
- 파일명: `{phase번호}_{에이전트}_{산출물}.md`
|
||||||
|
- 최종 파일: 실제 프로젝트 경로에 직접 Write
|
||||||
|
|
||||||
|
## 에러 핸들링
|
||||||
|
|
||||||
|
- 에이전트 실패 시: 해당 Phase 1회 재시도, 재실패 시 현재까지 결과 보고 후 사용자에게 확인
|
||||||
|
- 설계 명세 불명확 시: analyst가 합리적 가정을 하고 `_workspace/01_analyst_design.md`에 가정 목록 기재
|
||||||
|
- 컴파일 오류 예상 코드: `_workspace/02_backend_result.md`에 "주의" 섹션으로 명시
|
||||||
|
|
||||||
|
## 에이전트 팀 구성
|
||||||
|
|
||||||
|
```
|
||||||
|
오케스트레이터
|
||||||
|
├── Phase 2: kccf-analyst (서브 에이전트)
|
||||||
|
├── Phase 3: kccf-backend + kccf-frontend (병렬 팀)
|
||||||
|
└── Phase 4: kccf-reviewer (서브 에이전트)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 테스트 시나리오
|
||||||
|
|
||||||
|
**정상 흐름:**
|
||||||
|
1. "회원 포인트 적립 이력 관리 화면 만들어줘"
|
||||||
|
2. analyst → 도메인 설계 (point 모듈)
|
||||||
|
3. backend → VO/DAO/Service/Controller/Mapper 생성
|
||||||
|
4. frontend → list/regist JSP 생성
|
||||||
|
5. reviewer → 보안/패턴 검토
|
||||||
|
|
||||||
|
**에러 흐름:**
|
||||||
|
- "bsnsListPage 클릭 시 500 에러"
|
||||||
|
→ Phase 1 분류: 버그 수정
|
||||||
|
→ analyst 없이: BsnsController, BsnsService, Mapper XML 직접 읽기
|
||||||
|
→ 오류 원인 파악 후 해당 파일만 Edit
|
||||||
124
.claude/skills/kccf-security-check/SKILL.md
Normal file
124
.claude/skills/kccf-security-check/SKILL.md
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
---
|
||||||
|
name: kccf-security-check
|
||||||
|
description: "KCCF 코드의 보안 취약점을 검토하고 수정한다. 인증/권한 누락, XSS, SQL 인젝션, 세션 취약점 점검 시 사용한다. '보안 검토', '취약점 확인', '권한 검사', 코드 리뷰 요청 시 적용."
|
||||||
|
---
|
||||||
|
|
||||||
|
# KCCF 보안 검토 스킬
|
||||||
|
|
||||||
|
## 검토 우선순위
|
||||||
|
|
||||||
|
1. **인증 누락** (Critical) — 인증 없이 데이터 접근 가능
|
||||||
|
2. **XSS** (High) — 사용자 입력을 HTML에 직접 출력
|
||||||
|
3. **SQL 인젝션** (High) — MyBatis `${}` 오용
|
||||||
|
4. **권한 우회** (High) — 권한 확인 없이 쓰기/삭제
|
||||||
|
5. **세션 고정** (Medium) — 로그인 후 세션 재생성 미처리
|
||||||
|
|
||||||
|
## 체크리스트
|
||||||
|
|
||||||
|
### 인증 검증 (Controller)
|
||||||
|
|
||||||
|
```java
|
||||||
|
// ✅ 올바른 패턴 — /sec/ URL에 반드시 존재해야 함
|
||||||
|
UserVO userVO = (UserVO)session.getAttribute("user");
|
||||||
|
if(userVO == null || StringUtils.isAllBlank(userVO.getUserId())) {
|
||||||
|
return "redirect:/login.do";
|
||||||
|
}
|
||||||
|
|
||||||
|
// ❌ 잘못된 패턴 — 세션 체크 없이 데이터 접근
|
||||||
|
public String deleteData(VO vo) {
|
||||||
|
service.delete(vo); // 누가 호출했는지 모름
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
확인 항목:
|
||||||
|
- `/sec/` 접두어 URL을 처리하는 모든 메서드에 세션 검사 존재?
|
||||||
|
- Ajax 엔드포인트(`*Ajax.do`)에도 세션 검사 또는 Spring Security 설정?
|
||||||
|
- 삭제/등록/수정 메서드에 세션 검사?
|
||||||
|
|
||||||
|
### XSS 방지 (JSP)
|
||||||
|
|
||||||
|
```jsp
|
||||||
|
<%-- ✅ 안전 --%>
|
||||||
|
<c:out value="${userInput}"/>
|
||||||
|
${fn:escapeXml(userInput)}
|
||||||
|
|
||||||
|
<%-- ❌ 위험 --%>
|
||||||
|
${userInput}
|
||||||
|
<%= request.getParameter("name") %>
|
||||||
|
```
|
||||||
|
|
||||||
|
예외 허용 케이스:
|
||||||
|
- CKEditor HTML 편집기 출력 (서버 측 sanitize 전제)
|
||||||
|
- 개발자가 명시적으로 HTML을 허용한 필드
|
||||||
|
|
||||||
|
### SQL 인젝션 (Mapper XML)
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<!-- ✅ 안전: PreparedStatement -->
|
||||||
|
WHERE NM = #{searchNm}
|
||||||
|
|
||||||
|
<!-- ❌ 위험: String substitution -->
|
||||||
|
WHERE NM = '${searchNm}'
|
||||||
|
ORDER BY ${sortColumn} ← ORDER BY 동적 처리 주의
|
||||||
|
```
|
||||||
|
|
||||||
|
ORDER BY 동적 처리 시 화이트리스트:
|
||||||
|
```java
|
||||||
|
// Controller 또는 Service에서
|
||||||
|
String[] allowedColumns = {"REG_DTTM", "NM", "CODE"};
|
||||||
|
if (!Arrays.asList(allowedColumns).contains(sortColumn)) {
|
||||||
|
sortColumn = "REG_DTTM"; // 기본값
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 권한 검증
|
||||||
|
|
||||||
|
```java
|
||||||
|
// 쓰기 권한 확인
|
||||||
|
searchVO.setCanWrite(AuthUtil.canWrite(getUserId(), getSiteSeCode(), getSelMenuId(), ""));
|
||||||
|
|
||||||
|
// JSP에서 확인
|
||||||
|
<c:if test="${searchVO.canWrite}">
|
||||||
|
<button onclick="fnDelete()">삭제</button>
|
||||||
|
</c:if>
|
||||||
|
```
|
||||||
|
|
||||||
|
주의: JSP 버튼 숨기기만으로는 불충분 — Controller에서도 권한 재확인 필요.
|
||||||
|
|
||||||
|
### 파일 업로드
|
||||||
|
|
||||||
|
```java
|
||||||
|
// ✅ 허용 확장자 검증
|
||||||
|
String[] allowedExt = {".jpg", ".jpeg", ".png", ".gif", ".pdf", ".hwp", ".xlsx"};
|
||||||
|
String ext = fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
|
||||||
|
if (!Arrays.asList(allowedExt).contains(ext)) {
|
||||||
|
throw new IllegalArgumentException("허용되지 않는 파일 형식");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ❌ 위험: 확장자 검증 없이 저장
|
||||||
|
String savedPath = uploadDir + originalFileName;
|
||||||
|
```
|
||||||
|
|
||||||
|
## 수정 우선순위 결정
|
||||||
|
|
||||||
|
| 등급 | 기준 | 처리 |
|
||||||
|
|------|------|------|
|
||||||
|
| Critical | 인증 없이 데이터 변경 가능 | 즉시 수정 |
|
||||||
|
| High | XSS, SQL인젝션, 권한 우회 | 즉시 수정 |
|
||||||
|
| Medium | 불필요한 데이터 노출, 로깅 누락 | 수정 권고 |
|
||||||
|
| Low | 코드 스타일, 예외처리 개선 | 권고 |
|
||||||
|
|
||||||
|
## 출력 형식
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
## 보안 검토 결과
|
||||||
|
|
||||||
|
### Critical
|
||||||
|
- [파일:라인] 문제 설명 → 수정 방법
|
||||||
|
|
||||||
|
### High
|
||||||
|
- ...
|
||||||
|
|
||||||
|
### 통과 항목
|
||||||
|
- ...
|
||||||
|
```
|
||||||
154
.claude/skills/mybatis-mapper/SKILL.md
Normal file
154
.claude/skills/mybatis-mapper/SKILL.md
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
---
|
||||||
|
name: mybatis-mapper
|
||||||
|
description: "MyBatis Mapper XML 쿼리를 작성하거나 수정한다. 쿼리 최적화, 동적 SQL, 페이징, 다중 DB 호환 쿼리 작업 시 사용한다. 'SQL 작성', '쿼리 추가', 'Mapper 수정', '조회 조건 추가' 요청에 적용."
|
||||||
|
---
|
||||||
|
|
||||||
|
# MyBatis Mapper XML 작성 스킬
|
||||||
|
|
||||||
|
## Mapper 파일 위치
|
||||||
|
|
||||||
|
```
|
||||||
|
src/main/resources/egovframework/mapper/kccf/{module}/{Module}_SQL.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
## namespace 규칙
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<mapper namespace="kccf.{module}.dao.{Module}DAO">
|
||||||
|
```
|
||||||
|
|
||||||
|
## 핵심 패턴
|
||||||
|
|
||||||
|
### 페이징 목록 조회 (Oracle/Altibase 기준)
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<select id="select{Module}List" parameterType="{Module}VO" resultType="{Module}VO">
|
||||||
|
SELECT A.*
|
||||||
|
, ROW_NUMBER() OVER (ORDER BY A.REG_DTTM DESC) AS rn
|
||||||
|
, COUNT(*) OVER () AS totCnt
|
||||||
|
FROM TB_{MODULE} A
|
||||||
|
WHERE A.DELETE_AT = 'N'
|
||||||
|
<where>
|
||||||
|
<if test="searchField != null and searchField != ''">
|
||||||
|
AND A.FIELD = #{searchField}
|
||||||
|
</if>
|
||||||
|
<if test="searchNm != null and searchNm != ''">
|
||||||
|
AND A.NM LIKE '%' || #{searchNm} || '%'
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY A.REG_DTTM DESC
|
||||||
|
</select>
|
||||||
|
```
|
||||||
|
|
||||||
|
**MySQL/MariaDB 페이징 변형:**
|
||||||
|
```sql
|
||||||
|
SELECT A.*, @rownum := @rownum + 1 AS rn, total.cnt AS totCnt
|
||||||
|
FROM TB_{MODULE} A, (SELECT COUNT(*) cnt FROM TB_{MODULE} WHERE DELETE_AT='N') total
|
||||||
|
WHERE A.DELETE_AT = 'N'
|
||||||
|
ORDER BY A.REG_DTTM DESC
|
||||||
|
LIMIT #{pageSize} OFFSET #{offset}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 동적 조건 (where 절)
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<where>
|
||||||
|
<!-- NULL 또는 빈문자열 체크 -->
|
||||||
|
<if test="field != null and field != ''">
|
||||||
|
AND COL = #{field}
|
||||||
|
</if>
|
||||||
|
<!-- IN 절 -->
|
||||||
|
<if test="codeList != null and codeList.size() > 0">
|
||||||
|
AND CODE IN
|
||||||
|
<foreach item="item" collection="codeList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<!-- 기간 조건 -->
|
||||||
|
<if test="searchStartDate != null and searchStartDate != ''">
|
||||||
|
AND REG_DTTM >= #{searchStartDate}
|
||||||
|
</if>
|
||||||
|
<if test="searchEndDate != null and searchEndDate != ''">
|
||||||
|
AND REG_DTTM <= #{searchEndDate}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
```
|
||||||
|
|
||||||
|
### INSERT / UPDATE
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<insert id="insert{Module}" parameterType="{Module}VO">
|
||||||
|
INSERT INTO TB_{MODULE} (
|
||||||
|
ID, NM, CODE, DELETE_AT, REG_USER_ID, REG_DTTM, UPD_USER_ID, UPD_DTTM
|
||||||
|
) VALUES (
|
||||||
|
#{id}, #{nm}, #{code}, 'N', #{regUserId}, SYSDATE, #{updUserId}, SYSDATE
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 부분 UPDATE (set 태그) -->
|
||||||
|
<update id="update{Module}" parameterType="{Module}VO">
|
||||||
|
UPDATE TB_{MODULE}
|
||||||
|
<set>
|
||||||
|
<if test="nm != null">NM = #{nm},</if>
|
||||||
|
<if test="code != null">CODE = #{code},</if>
|
||||||
|
UPD_USER_ID = #{updUserId},
|
||||||
|
UPD_DTTM = SYSDATE
|
||||||
|
</set>
|
||||||
|
WHERE ID = #{id}
|
||||||
|
</update>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 소프트 삭제 (KCCF 표준)
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<update id="delete{Module}" parameterType="{Module}VO">
|
||||||
|
UPDATE TB_{MODULE}
|
||||||
|
SET DELETE_AT = 'Y'
|
||||||
|
, UPD_USER_ID = #{updUserId}
|
||||||
|
, UPD_DTTM = SYSDATE
|
||||||
|
WHERE ID = #{id}
|
||||||
|
</update>
|
||||||
|
```
|
||||||
|
|
||||||
|
### ID 채번 (시퀀스)
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<!-- Oracle: 시퀀스 사용 시 -->
|
||||||
|
<select id="get{Module}IdSeq" resultType="String">
|
||||||
|
SELECT TO_CHAR(SEQ_{MODULE}.NEXTVAL, 'FM0000000000') FROM DUAL
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 시퀀스 없을 때: MAX + 1 방식 -->
|
||||||
|
<select id="get{Module}IdSeq" resultType="String">
|
||||||
|
SELECT LPAD(NVL(MAX(TO_NUMBER(ID)), 0) + 1, 10, '0')
|
||||||
|
FROM TB_{MODULE}
|
||||||
|
</select>
|
||||||
|
```
|
||||||
|
|
||||||
|
## XML 특수문자 이스케이프
|
||||||
|
|
||||||
|
| 문자 | XML 표현 |
|
||||||
|
|------|---------|
|
||||||
|
| `<` | `<` |
|
||||||
|
| `>` | `>` |
|
||||||
|
| `&` | `&` |
|
||||||
|
| `<=` | `<=` |
|
||||||
|
| `>=` | `>=` |
|
||||||
|
|
||||||
|
또는 CDATA 블록:
|
||||||
|
```xml
|
||||||
|
<if test="val != null">
|
||||||
|
<![CDATA[ AND COL <= #{val} ]]>
|
||||||
|
</if>
|
||||||
|
```
|
||||||
|
|
||||||
|
## DB 방언 주의사항
|
||||||
|
|
||||||
|
| 기능 | Oracle/Altibase | MySQL/MariaDB | PostgreSQL |
|
||||||
|
|------|----------------|---------------|-----------|
|
||||||
|
| 현재시각 | `SYSDATE` | `NOW()` | `NOW()` |
|
||||||
|
| 문자 연결 | `\|\|` | `CONCAT()` | `\|\|` |
|
||||||
|
| NULL 대체 | `NVL()` | `IFNULL()` | `COALESCE()` |
|
||||||
|
| 행번호 | `ROWNUM` / `ROW_NUMBER()` | `ROW_NUMBER()` (8.0+) | `ROW_NUMBER()` |
|
||||||
|
| 페이징 | `ROWNUM` 서브쿼리 | `LIMIT OFFSET` | `LIMIT OFFSET` |
|
||||||
|
| 더미테이블 | `FROM DUAL` | 생략 | 생략 |
|
||||||
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Maven build output
|
||||||
|
target/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.settings/
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# Large media files (upload to file server separately)
|
||||||
|
*.mp4
|
||||||
|
*.avi
|
||||||
|
*.mov
|
||||||
|
*.wmv
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
49
.project
Normal file
49
.project
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>kccf</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.springframework.ide.eclipse.core.springbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.springframework.ide.eclipse.core.springnature</nature>
|
||||||
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>egovframework.dev.imp.ide.natures.egovnature</nature>
|
||||||
|
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
13
.settings/.jsdtscope
Normal file
13
.settings/.jsdtscope
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" path="src/main/webapp"/>
|
||||||
|
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="target/m2e-wtp/web-resources"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="hide" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||||
|
<classpathentry kind="output" path=""/>
|
||||||
|
</classpath>
|
||||||
4
.settings/org.eclipse.core.resources.prefs
Normal file
4
.settings/org.eclipse.core.resources.prefs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/main/java=UTF-8
|
||||||
|
encoding//src/main/webapp/proxy.jsp=UTF-8
|
||||||
|
encoding//src/test/java=UTF-8
|
||||||
11
.settings/org.eclipse.jdt.core.prefs
Normal file
11
.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
4
.settings/org.eclipse.m2e.core.prefs
Normal file
4
.settings/org.eclipse.m2e.core.prefs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
||||||
29
.settings/org.eclipse.wst.common.component
Normal file
29
.settings/org.eclipse.wst.common.component
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<wb-module deploy-name="kccf-1.0.0">
|
||||||
|
|
||||||
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<property name="java-output-path" value="/kccf/target/classes"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<property name="context-root" value="kccf"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</project-modules>
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
<root>
|
||||||
|
<facet id="jst.jsf">
|
||||||
|
<node name="libprov">
|
||||||
|
<attribute name="provider-id" value="jsf-no-op-library-provider"/>
|
||||||
|
</node>
|
||||||
|
</facet>
|
||||||
|
<facet id="jst.jaxrs">
|
||||||
|
<node name="libprov">
|
||||||
|
<attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
|
||||||
|
</node>
|
||||||
|
</facet>
|
||||||
|
</root>
|
||||||
9
.settings/org.eclipse.wst.common.project.facet.core.xml
Normal file
9
.settings/org.eclipse.wst.common.project.facet.core.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<faceted-project>
|
||||||
|
<fixed facet="wst.jsdt.web"/>
|
||||||
|
<installed facet="java" version="1.8"/>
|
||||||
|
<installed facet="jst.web" version="3.1"/>
|
||||||
|
<installed facet="jst.jsf" version="2.2"/>
|
||||||
|
<installed facet="jst.jaxrs" version="2.0"/>
|
||||||
|
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||||
|
</faceted-project>
|
||||||
1
.settings/org.eclipse.wst.jsdt.ui.superType.container
Normal file
1
.settings/org.eclipse.wst.jsdt.ui.superType.container
Normal file
@ -0,0 +1 @@
|
|||||||
|
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
||||||
1
.settings/org.eclipse.wst.jsdt.ui.superType.name
Normal file
1
.settings/org.eclipse.wst.jsdt.ui.superType.name
Normal file
@ -0,0 +1 @@
|
|||||||
|
Window
|
||||||
2
.settings/org.eclipse.wst.validation.prefs
Normal file
2
.settings/org.eclipse.wst.validation.prefs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
disabled=06target
|
||||||
|
eclipse.preferences.version=1
|
||||||
33
CLAUDE.md
Normal file
33
CLAUDE.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# KCCF 프로젝트
|
||||||
|
|
||||||
|
## 프로젝트 개요
|
||||||
|
|
||||||
|
문화예술 사업 관리 시스템 (eGovFramework 4.0.0 + Spring MVC 5.3.6 + MyBatis + JSP/Tiles)
|
||||||
|
|
||||||
|
- **Git:** https://git.zioinfo.co.kr/ythong/kcc.git
|
||||||
|
- **빌드:** Maven (`mvn install`)
|
||||||
|
- **Java:** 1.8 / **패키지:** `kccf.*` + `egovframework.com.*`
|
||||||
|
|
||||||
|
## 하네스: KCCF 개발 자동화
|
||||||
|
|
||||||
|
**목표:** eGovFramework 패턴 기반 CRUD 개발, 버그 수정, 보안 검토를 에이전트 팀으로 자동화
|
||||||
|
|
||||||
|
**트리거:** KCCF 관련 개발 작업(신규 기능, 화면 추가, 버그 수정, 쿼리 작업, 보안 점검) 요청 시 `kccf-orchestrate` 스킬을 사용하라. 단순 질문은 직접 응답 가능.
|
||||||
|
|
||||||
|
## 핵심 도메인
|
||||||
|
|
||||||
|
| 패키지 | 한글명 | 역할 |
|
||||||
|
|--------|--------|------|
|
||||||
|
| `kccf.bsns` | 사업 | 문화예술 사업 관리 |
|
||||||
|
| `kccf.act` | 활동 | 사업 연계 행사/활동 |
|
||||||
|
| `kccf.lcltt` | 지방문화원 | 지역 문화기관 |
|
||||||
|
| `kccf.bbs` | 게시판 | 공지/갤러리/FAQ/강의 |
|
||||||
|
| `kccf.auth` | 권한 | 메뉴별 읽기/쓰기 |
|
||||||
|
| `kccf.code` | 코드 | 공통코드/상세코드 |
|
||||||
|
| `kccf.user` | 사용자 | 회원 관리 |
|
||||||
|
|
||||||
|
## 변경 이력
|
||||||
|
|
||||||
|
| 날짜 | 변경 내용 | 대상 | 사유 |
|
||||||
|
|------|----------|------|------|
|
||||||
|
| 2026-06-15 | 하네스 초기 구성 | 전체 | KCCF 개발 자동화 |
|
||||||
783
pom.xml
Normal file
783
pom.xml
Normal file
@ -0,0 +1,783 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.digitalship</groupId>
|
||||||
|
<artifactId>kccf</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<name>kccf</name>
|
||||||
|
<url>http://www.egovframe.go.kr</url>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>The Apache Software License, Version 2.0</name>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<spring.maven.artifact.version>5.3.6</spring.maven.artifact.version>
|
||||||
|
<org.egovframe.rte.version>4.0.0</org.egovframe.rte.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>mvn2s</id>
|
||||||
|
<url>https://repo1.maven.org/maven2/</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>egovframe</id>
|
||||||
|
<url>https://maven.egovframe.go.kr/maven/</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- imgscalr -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.imgscalr</groupId>
|
||||||
|
<artifactId>imgscalr-lib</artifactId>
|
||||||
|
<version>4.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- log4jdbc -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bgee.log4jdbc-log4j2</groupId>
|
||||||
|
<artifactId>log4jdbc-log4j2-jdbc4.1</artifactId>
|
||||||
|
<version>1.16</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.24</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- @Valid 관련 Javax 및 Hibernate Dependency 추가 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.validation</groupId>
|
||||||
|
<artifactId>validation-api</artifactId>
|
||||||
|
<version>2.0.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<version>5.0.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 표준프레임워크 실행환경 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.egovframe.rte</groupId>
|
||||||
|
<artifactId>org.egovframe.rte.ptl.mvc</artifactId>
|
||||||
|
<version>${org.egovframe.rte.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.egovframe.rte</groupId>
|
||||||
|
<artifactId>org.egovframe.rte.psl.dataaccess</artifactId>
|
||||||
|
<version>${org.egovframe.rte.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.egovframe.rte</groupId>
|
||||||
|
<artifactId>org.egovframe.rte.fdl.idgnr</artifactId>
|
||||||
|
<version>${org.egovframe.rte.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.egovframe.rte</groupId>
|
||||||
|
<artifactId>org.egovframe.rte.fdl.property</artifactId>
|
||||||
|
<version>${org.egovframe.rte.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>jstl</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>taglibs</groupId>
|
||||||
|
<artifactId>standard</artifactId>
|
||||||
|
<version>1.1.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.antlr</groupId>
|
||||||
|
<artifactId>antlr</artifactId>
|
||||||
|
<version>3.5</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hsqldb</groupId>
|
||||||
|
<artifactId>hsqldb</artifactId>
|
||||||
|
<version>2.5.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- mysql이나 oracle DB 사용시 아래 설정 추가
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.googlecode.log4jdbc</groupId>
|
||||||
|
<artifactId>log4jdbc</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-dbcp</groupId>
|
||||||
|
<artifactId>commons-dbcp</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>5.1.31</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>ojdbc</groupId>
|
||||||
|
<artifactId>ojdbc</artifactId>
|
||||||
|
<version>14</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/ojdbc-14.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.egovframe.rte</groupId>
|
||||||
|
<artifactId>org.egovframe.rte.fdl.security</artifactId>
|
||||||
|
<version>${org.egovframe.rte.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.egovframe.rte</groupId>
|
||||||
|
<artifactId>org.egovframe.rte.fdl.excel</artifactId>
|
||||||
|
<version>${org.egovframe.rte.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.egovframe.rte</groupId>
|
||||||
|
<artifactId>org.egovframe.rte.bat.core</artifactId>
|
||||||
|
<version>${org.egovframe.rte.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.egovframe.rte</groupId>
|
||||||
|
<artifactId>org.egovframe.rte.fdl.crypto</artifactId>
|
||||||
|
<version>${org.egovframe.rte.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Session 방식의 접근제어 권한관리 사용 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.egovframe.rte</groupId>
|
||||||
|
<artifactId>org.egovframe.rte.fdl.access</artifactId>
|
||||||
|
<version>${org.egovframe.rte.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.googlecode.log4jdbc</groupId>
|
||||||
|
<artifactId>log4jdbc</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-dbcp2</artifactId>
|
||||||
|
<version>2.4.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jasypt</groupId>
|
||||||
|
<artifactId>jasypt</artifactId>
|
||||||
|
<version>1.9.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cglib</groupId>
|
||||||
|
<artifactId>cglib</artifactId>
|
||||||
|
<version>3.3.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-compress</artifactId>
|
||||||
|
<!-- <version>1.8.1</version> -->
|
||||||
|
<version>1.19</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>xerces</groupId>
|
||||||
|
<artifactId>xercesImpl</artifactId>
|
||||||
|
<version>2.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
|
<artifactId>quartz</artifactId>
|
||||||
|
<version>2.3.2</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
|
<artifactId>quartz-jobs</artifactId>
|
||||||
|
<version>2.3.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>oro</groupId>
|
||||||
|
<artifactId>oro</artifactId>
|
||||||
|
<version>2.0.8</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ibm.icu</groupId>
|
||||||
|
<artifactId>icu4j</artifactId>
|
||||||
|
<version>53.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-net</groupId>
|
||||||
|
<artifactId>commons-net</artifactId>
|
||||||
|
<version>3.6</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-email</artifactId>
|
||||||
|
<version>1.5</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>egovframework.com.ems</groupId>
|
||||||
|
<artifactId>sndng-mail</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet.jsp</groupId>
|
||||||
|
<artifactId>javax.servlet.jsp-api</artifactId>
|
||||||
|
<version>2.3.3</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>ldapsdk</groupId>
|
||||||
|
<artifactId>ldapsdk</artifactId>
|
||||||
|
<version>4.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.artofsolving</groupId>
|
||||||
|
<artifactId>jodconverter</artifactId>
|
||||||
|
<version>2.2.1</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- CKEditor FileUpload -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-fileupload</groupId>
|
||||||
|
<artifactId>commons-fileupload</artifactId>
|
||||||
|
<version>1.3.3</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.twitter4j</groupId>
|
||||||
|
<artifactId>twitter4j-core</artifactId>
|
||||||
|
<version>4.0.7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sourceforge.ajaxtags</groupId>
|
||||||
|
<artifactId>ajaxtags-resources</artifactId>
|
||||||
|
<version>1.5.7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ckeditor</groupId>
|
||||||
|
<artifactId>ckeditor-java-core</artifactId>
|
||||||
|
<version>3.5.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.xmlgraphics</groupId>
|
||||||
|
<artifactId>batik-ext</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.social</groupId>
|
||||||
|
<artifactId>spring-social-facebook</artifactId>
|
||||||
|
<version>2.0.3.RELEASE</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>spring-web</artifactId>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.scribejava</groupId>
|
||||||
|
<artifactId>scribejava-apis</artifactId>
|
||||||
|
<version>5.6.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.scribejava</groupId>
|
||||||
|
<artifactId>scribejava-core</artifactId>
|
||||||
|
<version>5.6.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.3.6</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<version>1.4.180</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.websocket</groupId>
|
||||||
|
<artifactId>javax.websocket-api</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish</groupId>
|
||||||
|
<artifactId>javax.json</artifactId>
|
||||||
|
<version>1.0.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-core</artifactId>
|
||||||
|
<version>2.11.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
<version>2.11.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
<version>2.11.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
|
<artifactId>jackson-dataformat-xml</artifactId>
|
||||||
|
<version>2.11.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.ldap</groupId>
|
||||||
|
<artifactId>spring-ldap-core</artifactId>
|
||||||
|
<version>2.3.3.RELEASE</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-beans</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-core</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-tx</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.jackson</groupId>
|
||||||
|
<artifactId>jackson-mapper-asl</artifactId>
|
||||||
|
<version>1.9.13</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>5.1.31</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mariadb.jdbc</groupId>
|
||||||
|
<artifactId>mariadb-java-client</artifactId>
|
||||||
|
<version>2.2.5</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>9.4.1208</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>ojdbc</groupId>
|
||||||
|
<artifactId>ojdbc</artifactId>
|
||||||
|
<version>6-11</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/ojdbc6-11.2.0.3.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>altibase</groupId>
|
||||||
|
<artifactId>altibase-jdbc-driver</artifactId>
|
||||||
|
<version>7.1.0</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/Altibase.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.tmax.tibero</groupId>
|
||||||
|
<artifactId>tibero-jdbc</artifactId>
|
||||||
|
<version>5.0</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/tibero5-jdbc.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cubrid</groupId>
|
||||||
|
<artifactId>cubrid-jdbc</artifactId>
|
||||||
|
<version>10.2</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/JDBC-10.2-latest-cubrid.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>kr.go.mgov</groupId>
|
||||||
|
<artifactId>smeapi</artifactId>
|
||||||
|
<version>2.7</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/smeapi_2_7.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>kr.go.gpki</groupId>
|
||||||
|
<artifactId>gpkisecureweb</artifactId>
|
||||||
|
<version>1.0.4.9</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/gpkisecureweb-1.0.4.9.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>kr.go.gpki</groupId>
|
||||||
|
<artifactId>libgpkiapi_jni</artifactId>
|
||||||
|
<version>1.4.0.0</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/libgpkiapi_jni-1.4.0.0.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-test</artifactId>
|
||||||
|
<version>${spring.maven.artifact.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.inject</groupId>
|
||||||
|
<artifactId>javax.inject</artifactId>
|
||||||
|
<version>1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>onepass-client</groupId>
|
||||||
|
<artifactId>onepass-client</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/onepass-client-2.0.0.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- KNKIM : 화면레이아웃 타일즈 : 시작 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tiles</groupId>
|
||||||
|
<artifactId>tiles-extras</artifactId>
|
||||||
|
<version>3.0.8</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tiles</groupId>
|
||||||
|
<artifactId>tiles-servlet</artifactId>
|
||||||
|
<version>3.0.8</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tiles</groupId>
|
||||||
|
<artifactId>tiles-jsp</artifactId>
|
||||||
|
<version>3.0.8</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- KNKIM : 화면레이아웃 타일즈 : 종료 -->
|
||||||
|
|
||||||
|
|
||||||
|
<dependency> <!-- HTML 파싱 : 2023.12.01 -->
|
||||||
|
<groupId>org.jsoup</groupId>
|
||||||
|
<artifactId>jsoup</artifactId>
|
||||||
|
<version>1.17.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<defaultGoal>install</defaultGoal>
|
||||||
|
<directory>${basedir}/target</directory>
|
||||||
|
<finalName>${artifactId}-${version}</finalName>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.tomcat.maven</groupId>
|
||||||
|
<artifactId>tomcat7-maven-plugin</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
<configuration>
|
||||||
|
<port>80</port>
|
||||||
|
<path>/</path>
|
||||||
|
<systemProperties>
|
||||||
|
<JAVA_OPTS>-Xms256m -Xmx768m -XX:MaxPermSize=256m</JAVA_OPTS>
|
||||||
|
</systemProperties>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<configuration>
|
||||||
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>hibernate3-maven-plugin</artifactId>
|
||||||
|
<version>3.0</version>
|
||||||
|
<configuration>
|
||||||
|
<components>
|
||||||
|
<component>
|
||||||
|
<name>hbm2ddl</name>
|
||||||
|
<implementation>annotationconfiguration</implementation>
|
||||||
|
</component>
|
||||||
|
</components>
|
||||||
|
</configuration>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hsqldb</groupId>
|
||||||
|
<artifactId>hsqldb</artifactId>
|
||||||
|
<version>2.5.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
<!-- EMMA -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>emma-maven-plugin</artifactId>
|
||||||
|
<version>1.0-alpha-3</version>
|
||||||
|
</plugin>
|
||||||
|
<!-- PMD manven plugin -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.12.0</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<!-- EMMA -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
<forkMode>once</forkMode>
|
||||||
|
<reportFormat>xml</reportFormat>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/Abstract*.java</exclude>
|
||||||
|
<exclude>**/*Suite.java</exclude>
|
||||||
|
</excludes>
|
||||||
|
<includes>
|
||||||
|
<include>**/*Test.java</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>emma-maven-plugin</artifactId>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
</plugin>
|
||||||
|
<!-- JavaDoc -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>3.1.1</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<reporting>
|
||||||
|
<outputDirectory>${basedir}/target/site</outputDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<id>sunlink</id>
|
||||||
|
<reports>
|
||||||
|
<report>javadoc</report>
|
||||||
|
</reports>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
<configuration>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/6/docs/api/</link>
|
||||||
|
</links>
|
||||||
|
</configuration>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
</plugin>
|
||||||
|
<!-- JUnit Test Results & EMMA Coverage Reporting -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>emma-maven-plugin</artifactId>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>surefire-report-maven-plugin</artifactId>
|
||||||
|
<inherited>true</inherited>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>report-only</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
</plugin>
|
||||||
|
<!-- Generating JavaDoc Report -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<minmemory>128m</minmemory>
|
||||||
|
<maxmemory>512m</maxmemory>
|
||||||
|
<encoding>${encoding}</encoding>
|
||||||
|
<docencoding>${encoding}</docencoding>
|
||||||
|
<charset>${encoding}</charset>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!-- Generating Java Source in HTML -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<inputEncoding>${encoding}</inputEncoding>
|
||||||
|
<outputEncoding>${encoding}</outputEncoding>
|
||||||
|
<linkJavadoc>true</linkJavadoc>
|
||||||
|
<javadocDir>apidocs</javadocDir>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
/*
|
||||||
|
* Copyright 2002-2005 the original author or authors.
|
||||||
|
*
|
||||||
|
* 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.IOException;
|
||||||
|
import java.io.Reader;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.jdbc.support.lob.LobCreator;
|
||||||
|
import org.springframework.jdbc.support.lob.LobHandler;
|
||||||
|
|
||||||
|
import org.egovframe.rte.psl.orm.ibatis.support.AbstractLobTypeHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* iBATIS TypeHandler implementation for Strings that get mapped to CLOBs.
|
||||||
|
* Retrieves the LobHandler to use from SqlMapClientFactoryBean at config time.
|
||||||
|
*
|
||||||
|
* <p>Particularly useful for storing Strings with more than 4000 characters in an
|
||||||
|
* Oracle database (only possible via CLOBs), in combination with OracleLobHandler.
|
||||||
|
*
|
||||||
|
* <p>Can also be defined in generic iBATIS mappings, as DefaultLobCreator will
|
||||||
|
* work with most JDBC-compliant database drivers. In this case, the field type
|
||||||
|
* does not have to be BLOB: For databases like MySQL and MS SQL Server, any
|
||||||
|
* large enough binary type will work.
|
||||||
|
*
|
||||||
|
* @author Juergen Hoeller
|
||||||
|
* @since 1.1.5
|
||||||
|
* @see org.springframework.orm.ibatis.SqlMapClientFactoryBean#setLobHandler
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
public class AltibaseClobStringTypeHandler extends AbstractLobTypeHandler {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(AltibaseClobStringTypeHandler.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor used by iBATIS: fetches config-time LobHandler from
|
||||||
|
* SqlMapClientFactoryBean.
|
||||||
|
* @see org.springframework.orm.ibatis.SqlMapClientFactoryBean#getConfigTimeLobHandler
|
||||||
|
*/
|
||||||
|
public AltibaseClobStringTypeHandler() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor used for testing: takes an explicit LobHandler.
|
||||||
|
*/
|
||||||
|
protected AltibaseClobStringTypeHandler(LobHandler lobHandler) {
|
||||||
|
super(lobHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setParameterInternal(
|
||||||
|
PreparedStatement ps, int index, Object value, String jdbcType, LobCreator lobCreator)
|
||||||
|
throws SQLException {
|
||||||
|
lobCreator.setClobAsString(ps, index, (String) value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected Object getResultInternal(ResultSet rs, int index, LobHandler lobHandler)
|
||||||
|
throws SQLException {
|
||||||
|
|
||||||
|
StringBuffer read_data = new StringBuffer("");
|
||||||
|
int read_length;
|
||||||
|
|
||||||
|
char [] buf = new char[1024];
|
||||||
|
|
||||||
|
Reader rd = lobHandler.getClobAsCharacterStream(rs, index);
|
||||||
|
try {
|
||||||
|
while( (read_length=rd.read(buf)) != -1) {
|
||||||
|
read_data.append(buf, 0, read_length);
|
||||||
|
}
|
||||||
|
} catch (IOException ie) {
|
||||||
|
SQLException sqle = new SQLException(ie.getMessage());
|
||||||
|
throw sqle;
|
||||||
|
// 2011.10.10 보안점검 후속조치
|
||||||
|
} finally {
|
||||||
|
if (rd != null) {
|
||||||
|
try {
|
||||||
|
rd.close();
|
||||||
|
//2017.03.03 조성원 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
|
||||||
|
} catch (IOException ignore) {
|
||||||
|
LOGGER.error("[IOException] : Connection Close");
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
LOGGER.error("["+ ignore.getClass() +"] Connection Close : " + ignore.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return read_data.toString();
|
||||||
|
|
||||||
|
//return lobHandler.getClobAsString(rs, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object valueOf(String s) {
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
185
src/main/java/egovframework/com/cmm/ComDefaultCodeVO.java
Normal file
185
src/main/java/egovframework/com/cmm/ComDefaultCodeVO.java
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 클래스
|
||||||
|
* @author 공통서비스개발팀 이삼섭
|
||||||
|
* @since 2009.06.01
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.3.11 이삼섭 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class ComDefaultCodeVO implements Serializable {
|
||||||
|
/** 코드 ID */
|
||||||
|
private String codeId = "";
|
||||||
|
|
||||||
|
/** 상세코드 */
|
||||||
|
private String code = "";
|
||||||
|
|
||||||
|
/** 코드명 */
|
||||||
|
private String codeNm = "";
|
||||||
|
|
||||||
|
/** 코드설명 */
|
||||||
|
private String codeDc = "";
|
||||||
|
|
||||||
|
/** 특정테이블명 */
|
||||||
|
private String tableNm = ""; //특정테이블에서 코드정보를추출시 사용
|
||||||
|
|
||||||
|
/** 상세 조건 여부 */
|
||||||
|
private String haveDetailCondition = "N";
|
||||||
|
|
||||||
|
/** 상세 조건 */
|
||||||
|
private String detailCondition = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* codeId attribute를 리턴한다.
|
||||||
|
*
|
||||||
|
* @return the codeId
|
||||||
|
*/
|
||||||
|
public String getCodeId() {
|
||||||
|
return codeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* codeId attribute 값을 설정한다.
|
||||||
|
*
|
||||||
|
* @param codeId
|
||||||
|
* the codeId to set
|
||||||
|
*/
|
||||||
|
public void setCodeId(String codeId) {
|
||||||
|
this.codeId = codeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* code attribute를 리턴한다.
|
||||||
|
*
|
||||||
|
* @return the code
|
||||||
|
*/
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* code attribute 값을 설정한다.
|
||||||
|
*
|
||||||
|
* @param code
|
||||||
|
* the code to set
|
||||||
|
*/
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* codeNm attribute를 리턴한다.
|
||||||
|
*
|
||||||
|
* @return the codeNm
|
||||||
|
*/
|
||||||
|
public String getCodeNm() {
|
||||||
|
return codeNm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* codeNm attribute 값을 설정한다.
|
||||||
|
*
|
||||||
|
* @param codeNm
|
||||||
|
* the codeNm to set
|
||||||
|
*/
|
||||||
|
public void setCodeNm(String codeNm) {
|
||||||
|
this.codeNm = codeNm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* codeDc attribute를 리턴한다.
|
||||||
|
*
|
||||||
|
* @return the codeDc
|
||||||
|
*/
|
||||||
|
public String getCodeDc() {
|
||||||
|
return codeDc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* codeDc attribute 값을 설정한다.
|
||||||
|
*
|
||||||
|
* @param codeDc
|
||||||
|
* the codeDc to set
|
||||||
|
*/
|
||||||
|
public void setCodeDc(String codeDc) {
|
||||||
|
this.codeDc = codeDc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tableNm attribute를 리턴한다.
|
||||||
|
*
|
||||||
|
* @return the tableNm
|
||||||
|
*/
|
||||||
|
public String getTableNm() {
|
||||||
|
return tableNm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tableNm attribute 값을 설정한다.
|
||||||
|
*
|
||||||
|
* @param tableNm
|
||||||
|
* the tableNm to set
|
||||||
|
*/
|
||||||
|
public void setTableNm(String tableNm) {
|
||||||
|
this.tableNm = tableNm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haveDetailCondition attribute를 리턴한다.
|
||||||
|
*
|
||||||
|
* @return the haveDetailCondition
|
||||||
|
*/
|
||||||
|
public String getHaveDetailCondition() {
|
||||||
|
return haveDetailCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haveDetailCondition attribute 값을 설정한다.
|
||||||
|
*
|
||||||
|
* @param haveDetailCondition
|
||||||
|
* the haveDetailCondition to set
|
||||||
|
*/
|
||||||
|
public void setHaveDetailCondition(String haveDetailCondition) {
|
||||||
|
this.haveDetailCondition = haveDetailCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* detailCondition attribute를 리턴한다.
|
||||||
|
*
|
||||||
|
* @return the detailCondition
|
||||||
|
*/
|
||||||
|
public String getDetailCondition() {
|
||||||
|
return detailCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* detailCondition attribute 값을 설정한다.
|
||||||
|
*
|
||||||
|
* @param detailCondition
|
||||||
|
* the detailCondition to set
|
||||||
|
*/
|
||||||
|
public void setDetailCondition(String detailCondition) {
|
||||||
|
this.detailCondition = detailCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* toString 메소드를 대치한다.
|
||||||
|
*/
|
||||||
|
public String toString() {
|
||||||
|
return ToStringBuilder.reflectionToString(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
167
src/main/java/egovframework/com/cmm/ComDefaultVO.java
Normal file
167
src/main/java/egovframework/com/cmm/ComDefaultVO.java
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Class Name : ComDefaultVO.java
|
||||||
|
* @Description : ComDefaultVO class
|
||||||
|
* @Modification Information
|
||||||
|
* @
|
||||||
|
* @ 수정일 수정자 수정내용
|
||||||
|
* @ ------- -------- ---------------------------
|
||||||
|
* @ 2009.02.01 조재영 최초 생성
|
||||||
|
*
|
||||||
|
* @author 공통서비스 개발팀 조재영
|
||||||
|
* @since 2009.02.01
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class ComDefaultVO implements Serializable {
|
||||||
|
|
||||||
|
/** 검색조건 */
|
||||||
|
private String searchCondition = "";
|
||||||
|
|
||||||
|
/** 검색Keyword */
|
||||||
|
private String searchKeyword = "";
|
||||||
|
|
||||||
|
/** 검색사용여부 */
|
||||||
|
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;
|
||||||
|
|
||||||
|
/** 검색KeywordFrom */
|
||||||
|
private String searchKeywordFrom = "";
|
||||||
|
|
||||||
|
/** 검색KeywordTo */
|
||||||
|
private String searchKeywordTo = "";
|
||||||
|
|
||||||
|
public int getFirstIndex() {
|
||||||
|
return firstIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstIndex(int firstIndex) {
|
||||||
|
this.firstIndex = firstIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLastIndex() {
|
||||||
|
return lastIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastIndex(int lastIndex) {
|
||||||
|
this.lastIndex = lastIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRecordCountPerPage() {
|
||||||
|
return recordCountPerPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecordCountPerPage(int recordCountPerPage) {
|
||||||
|
this.recordCountPerPage = recordCountPerPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSearchCondition() {
|
||||||
|
return searchCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSearchCondition(String searchCondition) {
|
||||||
|
this.searchCondition = searchCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSearchKeyword() {
|
||||||
|
return searchKeyword;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSearchKeyword(String searchKeyword) {
|
||||||
|
this.searchKeyword = searchKeyword;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSearchUseYn() {
|
||||||
|
return searchUseYn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSearchUseYn(String searchUseYn) {
|
||||||
|
this.searchUseYn = searchUseYn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPageIndex() {
|
||||||
|
return pageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageIndex(int pageIndex) {
|
||||||
|
this.pageIndex = pageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPageUnit() {
|
||||||
|
return pageUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageUnit(int pageUnit) {
|
||||||
|
this.pageUnit = pageUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPageSize() {
|
||||||
|
return pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageSize(int pageSize) {
|
||||||
|
this.pageSize = pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return ToStringBuilder.reflectionToString(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* searchKeywordFrom attribute를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getSearchKeywordFrom() {
|
||||||
|
return searchKeywordFrom;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* searchKeywordFrom attribute 값을 설정한다.
|
||||||
|
* @param searchKeywordFrom String
|
||||||
|
*/
|
||||||
|
public void setSearchKeywordFrom(String searchKeywordFrom) {
|
||||||
|
this.searchKeywordFrom = searchKeywordFrom;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* searchKeywordTo attribute를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getSearchKeywordTo() {
|
||||||
|
return searchKeywordTo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* searchKeywordTo attribute 값을 설정한다.
|
||||||
|
* @param searchKeywordTo String
|
||||||
|
*/
|
||||||
|
public void setSearchKeywordTo(String searchKeywordTo) {
|
||||||
|
this.searchKeywordTo = searchKeywordTo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
184
src/main/java/egovframework/com/cmm/EgovBrowserUtil.java
Normal file
184
src/main/java/egovframework/com/cmm/EgovBrowserUtil.java
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 웹브라우저 종류및 버전 파악하기 ( IE및 Edge, Safari, Chrome, Firefox, Opera )
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ----------- -------- ---------------------------
|
||||||
|
* 2018.08.27 신용호 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EgovBrowserUtil {
|
||||||
|
|
||||||
|
public static final String FIREFOX = "Firefox";
|
||||||
|
public static final String SAFARI = "Safari";
|
||||||
|
public static final String CHROME = "Chrome";
|
||||||
|
public static final String OPERA = "Opera";
|
||||||
|
public static final String MSIE = "MSIE";
|
||||||
|
public static final String EDGE = "Edge";
|
||||||
|
public static final String OTHER = "Other";
|
||||||
|
|
||||||
|
public static final String TYPEKEY = "type";
|
||||||
|
public static final String VERSIONKEY = "version";
|
||||||
|
|
||||||
|
public static HashMap<String,String> getBrowser(String userAgent) {
|
||||||
|
|
||||||
|
HashMap<String,String> result = new HashMap<String,String>();
|
||||||
|
Pattern pattern = null;
|
||||||
|
Matcher matcher = null;
|
||||||
|
//System.out.println("=====>>>>> userAgent = "+userAgent);
|
||||||
|
|
||||||
|
pattern = Pattern.compile("MSIE ([0-9]{1,2}.[0-9])");
|
||||||
|
matcher = pattern.matcher(userAgent);
|
||||||
|
if (matcher.find())
|
||||||
|
{
|
||||||
|
result.put(TYPEKEY,MSIE);
|
||||||
|
result.put(VERSIONKEY,matcher.group(1));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (userAgent.indexOf("Trident/7.0") > -1) {
|
||||||
|
result.put(TYPEKEY,MSIE);
|
||||||
|
result.put(VERSIONKEY,"11.0");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
pattern = Pattern.compile("Edge/([0-9]{1,3}.[0-9]{1,5})");
|
||||||
|
matcher = pattern.matcher(userAgent);
|
||||||
|
if (matcher.find())
|
||||||
|
{
|
||||||
|
result.put(TYPEKEY,EDGE);
|
||||||
|
result.put(VERSIONKEY,matcher.group(1));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
pattern = Pattern.compile("Firefox/([0-9]{1,3}.[0-9]{1,3})");
|
||||||
|
matcher = pattern.matcher(userAgent);
|
||||||
|
if (matcher.find())
|
||||||
|
{
|
||||||
|
result.put(TYPEKEY,FIREFOX);
|
||||||
|
result.put(VERSIONKEY,matcher.group(1));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
pattern = Pattern.compile("OPR/([0-9]{1,3}.[0-9]{1,3})");
|
||||||
|
matcher = pattern.matcher(userAgent);
|
||||||
|
if (matcher.find())
|
||||||
|
{
|
||||||
|
result.put(TYPEKEY,OPERA);
|
||||||
|
result.put(VERSIONKEY,matcher.group(1));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
pattern = Pattern.compile("Chrome/([0-9]{1,3}.[0-9]{1,3})");
|
||||||
|
matcher = pattern.matcher(userAgent);
|
||||||
|
if (matcher.find())
|
||||||
|
{
|
||||||
|
result.put(TYPEKEY,CHROME);
|
||||||
|
result.put(VERSIONKEY,matcher.group(1));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
pattern = Pattern.compile("Version/([0-9]{1,2}.[0-9]{1,3})");
|
||||||
|
matcher = pattern.matcher(userAgent);
|
||||||
|
if (matcher.find())
|
||||||
|
{
|
||||||
|
result.put(TYPEKEY,SAFARI);
|
||||||
|
result.put(VERSIONKEY,matcher.group(1));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
result.put(TYPEKEY,OTHER);
|
||||||
|
result.put(VERSIONKEY,"0.0");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDisposition(String filename, String userAgent, String charSet) throws Exception {
|
||||||
|
|
||||||
|
String encodedFilename = null;
|
||||||
|
HashMap<String,String> result = EgovBrowserUtil.getBrowser(userAgent);
|
||||||
|
float version = Float.parseFloat(result.get(EgovBrowserUtil.VERSIONKEY));
|
||||||
|
//System.out.println("=====>>>>> browser type = "+result.get(TYPEKEY));
|
||||||
|
//System.out.println("=====>>>>> browser version = "+result.get(VERSIONKEY));
|
||||||
|
//System.out.println("=====>>>>> filename = "+filename);
|
||||||
|
|
||||||
|
if ( EgovBrowserUtil.MSIE.equals(result.get(EgovBrowserUtil.TYPEKEY)) && version <= 8.0f ) {
|
||||||
|
encodedFilename = "Content-Disposition: attachment; filename="+URLEncoder.encode(filename, charSet).replaceAll("\\+", "%20");
|
||||||
|
} else if ( EgovBrowserUtil.OTHER.equals(result.get(EgovBrowserUtil.TYPEKEY)) ) {
|
||||||
|
throw new RuntimeException("Not supported browser");
|
||||||
|
} else {
|
||||||
|
encodedFilename = "attachment; filename*="+charSet+"''"+URLEncoder.encode(filename, charSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
return encodedFilename;
|
||||||
|
}
|
||||||
|
|
||||||
|
//KISA 보안약점 조치 (2018-10-29, 윤창원)
|
||||||
|
/* public static void main(String[] args) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
String testUserAgent[] = {
|
||||||
|
// IE 7.0
|
||||||
|
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"
|
||||||
|
,"Mozilla/4.0 (Mozilla/4.0; MSIE 7.0; Windows NT 5.1; FDM; SV1; .NET CLR 3.0.04506.30)"
|
||||||
|
// IE 8.0
|
||||||
|
,"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)"
|
||||||
|
// IE 9.0
|
||||||
|
,"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
|
||||||
|
// IE 10.0
|
||||||
|
,"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)"
|
||||||
|
// IE 11.0
|
||||||
|
,"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
|
||||||
|
// Chrome 68.0.3440.106
|
||||||
|
,"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
|
||||||
|
// Edge 17.17134
|
||||||
|
,"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134"
|
||||||
|
// Opera 55.0.2994.44
|
||||||
|
,"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 OPR/55.0.2994.44"
|
||||||
|
,"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 OPR/26.0.1656.60"
|
||||||
|
// Firefox 61.0
|
||||||
|
,"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0"
|
||||||
|
// Safari 11.1.2
|
||||||
|
,"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15"
|
||||||
|
// iPhone 11.0
|
||||||
|
,"Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1"
|
||||||
|
// iPad 9.0
|
||||||
|
,"Mozilla/5.0 (iPad; CPU OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13G36 Safari/601.1"
|
||||||
|
// Window Pohone 10
|
||||||
|
,"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Nokia; Lumia 520) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Mobile Safari/537.36 Edge/12.0"
|
||||||
|
// Window Pohone 8.1
|
||||||
|
,"Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 520) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537"
|
||||||
|
// Window Pohone 8
|
||||||
|
,"Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch)"
|
||||||
|
// Window Pohone 7
|
||||||
|
,"Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)"
|
||||||
|
// XBOX One
|
||||||
|
,"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Xbox; Xbox One)"
|
||||||
|
// XBOX 360
|
||||||
|
,"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Xbox)"
|
||||||
|
};
|
||||||
|
|
||||||
|
HashMap<String,String> result = null;
|
||||||
|
for (int i = 0; i < testUserAgent.length; i++) {
|
||||||
|
result = getBrowser(testUserAgent[i]);
|
||||||
|
System.out.println("1. User Agent : "+testUserAgent[i]);
|
||||||
|
System.out.println("2. Browser Type : "+result.get(TYPEKEY));
|
||||||
|
System.out.println("2. Browser Version : "+result.get(VERSIONKEY));
|
||||||
|
//System.out.println("2. Browser Version convert: "+Float.parseFloat(result.get(VERSIONKEY)));
|
||||||
|
System.out.println("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
405
src/main/java/egovframework/com/cmm/EgovComCrossSiteHndlr.java
Normal file
405
src/main/java/egovframework/com/cmm/EgovComCrossSiteHndlr.java
Normal file
@ -0,0 +1,405 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.Reader;
|
||||||
|
|
||||||
|
import javax.servlet.jsp.JspException;
|
||||||
|
import javax.servlet.jsp.JspWriter;
|
||||||
|
import javax.servlet.jsp.PageContext;
|
||||||
|
import javax.servlet.jsp.tagext.BodyTagSupport;
|
||||||
|
|
||||||
|
import org.apache.taglibs.standard.tag.common.core.Util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cross-Site Scripting 체크하여 값을 되돌려 받는 핸들러 JSP TLD, 자바에서 사용가능
|
||||||
|
*
|
||||||
|
* @author 공통서비스 장동한
|
||||||
|
* @since 2010.11.09
|
||||||
|
* @version 1.0
|
||||||
|
* @see <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2010.11.09 장동한 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class EgovComCrossSiteHndlr extends BodyTagSupport {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (One almost wishes XML and JSP could support "anonymous tags," given the
|
||||||
|
* amount of trouble we had naming this one!) :-) - sb
|
||||||
|
*/
|
||||||
|
|
||||||
|
// *********************************************************************
|
||||||
|
// Internal state
|
||||||
|
|
||||||
|
protected Object value; // tag attribute
|
||||||
|
protected String def; // tag attribute
|
||||||
|
protected boolean escapeXml; // tag attribute
|
||||||
|
private boolean needBody; // non-space body needed?
|
||||||
|
|
||||||
|
// *********************************************************************
|
||||||
|
// Construction and initialization
|
||||||
|
|
||||||
|
private final String m_sDiffChar ="()[]{}\"',:;= \t\r\n%!+-";
|
||||||
|
//private String m_sDiffChar ="()[]{}\"',:;=%!+-";
|
||||||
|
private final String m_sArrDiffChar [] = {
|
||||||
|
"(",")",
|
||||||
|
"[","]",
|
||||||
|
"{","}",
|
||||||
|
""","'",
|
||||||
|
",",":",
|
||||||
|
";","=",
|
||||||
|
" ","\t", //" ","\t",
|
||||||
|
"\r","\n", //"\r","\n",
|
||||||
|
"%","!",
|
||||||
|
"+","-"
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a new handler. As with TagSupport, subclasses should not
|
||||||
|
* provide other constructors and are expected to call the superclass
|
||||||
|
* constructor.
|
||||||
|
*/
|
||||||
|
public EgovComCrossSiteHndlr() {
|
||||||
|
super();
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
// resets local state
|
||||||
|
private void init() {
|
||||||
|
value = def = null;
|
||||||
|
escapeXml = true;
|
||||||
|
needBody = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Releases any resources we may have (or inherit)
|
||||||
|
public void release() {
|
||||||
|
super.release();
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
// *********************************************************************
|
||||||
|
// Tag logic
|
||||||
|
|
||||||
|
// evaluates 'value' and determines if the body should be evaluted
|
||||||
|
public int doStartTag() throws JspException {
|
||||||
|
|
||||||
|
needBody = false; // reset state related to 'default'
|
||||||
|
this.bodyContent = null; // clean-up body (just in case container is
|
||||||
|
// pooling tag handlers)
|
||||||
|
|
||||||
|
JspWriter out = pageContext.getOut();
|
||||||
|
//System.out.println("EgovComCrossSiteFilter> ============================");
|
||||||
|
try {
|
||||||
|
// print value if available; otherwise, try 'default'
|
||||||
|
if (value != null) {
|
||||||
|
//System.out.println("EgovComCrossSiteFilter> =value");
|
||||||
|
String sWriteEscapedXml = getWriteEscapedXml();
|
||||||
|
//System.out.println("EgovComCrossSiteFilter sWriteEscapedXml>" + sWriteEscapedXml);
|
||||||
|
out.print(sWriteEscapedXml);
|
||||||
|
return SKIP_BODY;
|
||||||
|
} else {
|
||||||
|
// if we don't have a 'default' attribute, just go to the body
|
||||||
|
if (def == null) {
|
||||||
|
needBody = true;
|
||||||
|
return EVAL_BODY_BUFFERED;
|
||||||
|
}
|
||||||
|
|
||||||
|
//System.out.println("EgovComCrossSiteFilter def> ="+def);
|
||||||
|
|
||||||
|
// if we do have 'default', print it
|
||||||
|
if (def != null) {
|
||||||
|
// good 'default'
|
||||||
|
out(pageContext, escapeXml, def);
|
||||||
|
//System.out.println("EgovComCrossSiteFilter> ="+def);
|
||||||
|
}
|
||||||
|
return SKIP_BODY;
|
||||||
|
}
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new JspException(ex.toString(), ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// prints the body if necessary; reports errors
|
||||||
|
public int doEndTag() throws JspException {
|
||||||
|
try {
|
||||||
|
//System.out.println("EgovComCrossSiteFilter ==== doEndTag");
|
||||||
|
if (!needBody){
|
||||||
|
return EVAL_PAGE; // nothing more to do
|
||||||
|
}
|
||||||
|
|
||||||
|
// trim and print out the body
|
||||||
|
if (bodyContent != null && bodyContent.getString() != null){
|
||||||
|
//String sWriteEscapedXml = getWriteEscapedXml();
|
||||||
|
//out2(pageContext, escapeXml, sWriteEscapedXml.toString());
|
||||||
|
//System.out.println("EgovComCrossSiteFilter> end");
|
||||||
|
//System.out.println("EgovComCrossSiteFilter sWriteEscapedXml > sWriteEscapedXml");
|
||||||
|
out(pageContext, escapeXml, bodyContent.getString().trim());
|
||||||
|
|
||||||
|
}
|
||||||
|
return EVAL_PAGE;
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new JspException(ex.toString(), ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// *********************************************************************
|
||||||
|
// Public utility methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outputs <tt>text</tt> to <tt>pageContext</tt>'s current JspWriter. If
|
||||||
|
* <tt>escapeXml</tt> is true, performs the following substring replacements
|
||||||
|
* (to facilitate output to XML/HTML pages):
|
||||||
|
*
|
||||||
|
* & -> & < -> < > -> > " -> " ' -> '
|
||||||
|
*
|
||||||
|
* See also Util.escapeXml().
|
||||||
|
*/
|
||||||
|
public static void out(PageContext pageContext, boolean escapeXml,
|
||||||
|
Object obj) throws IOException {
|
||||||
|
JspWriter w = pageContext.getOut();
|
||||||
|
|
||||||
|
if (!escapeXml) {
|
||||||
|
// write chars as is
|
||||||
|
if (obj instanceof Reader) {
|
||||||
|
Reader reader = (Reader) obj;
|
||||||
|
char[] buf = new char[4096];
|
||||||
|
int count;
|
||||||
|
while ((count = reader.read(buf, 0, 4096)) != -1) {
|
||||||
|
w.write(buf, 0, count);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
w.write(obj.toString());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// escape XML chars
|
||||||
|
if (obj instanceof Reader) {
|
||||||
|
Reader reader = (Reader) obj;
|
||||||
|
char[] buf = new char[4096];
|
||||||
|
int count;
|
||||||
|
while ((count = reader.read(buf, 0, 4096)) != -1) {
|
||||||
|
writeEscapedXml(buf, count, w);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String text = obj.toString();
|
||||||
|
writeEscapedXml(text.toCharArray(), text.length(), w);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public static void out2(PageContext pageContext, boolean escapeXml,
|
||||||
|
Object obj) throws IOException {
|
||||||
|
JspWriter w = pageContext.getOut();
|
||||||
|
|
||||||
|
w.write(obj.toString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Optimized to create no extra objects and write directly to the JspWriter
|
||||||
|
* using blocks of escaped and unescaped characters
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static void writeEscapedXml(char[] buffer, int length, JspWriter w)
|
||||||
|
throws IOException {
|
||||||
|
int start = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < length; i++) {
|
||||||
|
char c = buffer[i];
|
||||||
|
if (c <= Util.HIGHEST_SPECIAL) {
|
||||||
|
char[] escaped = Util.specialCharactersRepresentation[c];
|
||||||
|
if (escaped != null) {
|
||||||
|
// add unescaped portion
|
||||||
|
if (start < i) {
|
||||||
|
w.write(buffer, start, i - start);
|
||||||
|
}
|
||||||
|
// add escaped xml
|
||||||
|
w.write(escaped);
|
||||||
|
start = i + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// add rest of unescaped portion
|
||||||
|
if (start < length) {
|
||||||
|
w.write(buffer, start, length - start);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Optimized to create no extra objects and write directly to the JspWriter
|
||||||
|
* using blocks of escaped and unescaped characters
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private String getWriteEscapedXml() throws IOException {
|
||||||
|
String sRtn = "";
|
||||||
|
|
||||||
|
Object obj = this.value;
|
||||||
|
|
||||||
|
int start = 0;
|
||||||
|
String text = obj.toString();
|
||||||
|
|
||||||
|
int length = text.length();
|
||||||
|
char[] buffer = text.toCharArray();
|
||||||
|
boolean booleanDiff = false;
|
||||||
|
//String sDiffChar
|
||||||
|
//String sArrDiffChar
|
||||||
|
char[] cDiffChar = this.m_sDiffChar.toCharArray();
|
||||||
|
|
||||||
|
for(int i = 0; i < length; i++) {
|
||||||
|
char c = buffer[i];
|
||||||
|
|
||||||
|
booleanDiff = false;
|
||||||
|
|
||||||
|
for(int k = 0; k < cDiffChar.length; k++){
|
||||||
|
if(c == cDiffChar[k]){
|
||||||
|
sRtn = sRtn + m_sArrDiffChar[k];
|
||||||
|
booleanDiff = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(booleanDiff) continue;
|
||||||
|
|
||||||
|
if (c <= Util.HIGHEST_SPECIAL) {
|
||||||
|
char[] escaped = Util.specialCharactersRepresentation[c];
|
||||||
|
if (escaped != null) {
|
||||||
|
// add unescaped portion
|
||||||
|
//if (start < i) {
|
||||||
|
// sRtn = sRtn + text.substring(start, i - start);
|
||||||
|
//}
|
||||||
|
// add escaped xml
|
||||||
|
//sRtn = sRtn + escaped;
|
||||||
|
//System.out.println(buffer[i]+" :: " + escaped);
|
||||||
|
for (int j = 0; j < escaped.length; j++) {
|
||||||
|
//System.out.println(buffer[i]+" :>: " + escaped[j]);
|
||||||
|
sRtn = sRtn + escaped[j];
|
||||||
|
}
|
||||||
|
//sRtn = sRtn+ escaped.toString();
|
||||||
|
//sRtn = sRtn + String.valueOf(buffer[i]);
|
||||||
|
start = i + 1;
|
||||||
|
}else{
|
||||||
|
sRtn = sRtn + c;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
sRtn = sRtn + c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return sRtn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Optimized to create no extra objects and write directly to the JspWriter
|
||||||
|
* using blocks of escaped and unescaped characters
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private String getWriteEscapedXml(String sWriteString) throws IOException {
|
||||||
|
|
||||||
|
String sRtn = "";
|
||||||
|
|
||||||
|
Object obj = sWriteString;
|
||||||
|
|
||||||
|
int start = 0;
|
||||||
|
String text = obj.toString();
|
||||||
|
|
||||||
|
int length = text.length();
|
||||||
|
char[] buffer = text.toCharArray();
|
||||||
|
boolean booleanDiff = false;
|
||||||
|
//String sDiffChar
|
||||||
|
//String sArrDiffChar
|
||||||
|
char[] cDiffChar = this.m_sDiffChar.toCharArray();
|
||||||
|
|
||||||
|
for(int i = 0; i < length; i++) {
|
||||||
|
char c = buffer[i];
|
||||||
|
|
||||||
|
booleanDiff = false;
|
||||||
|
|
||||||
|
for(int k = 0; k < cDiffChar.length; k++){
|
||||||
|
if(c == cDiffChar[k]){
|
||||||
|
sRtn = sRtn + m_sArrDiffChar[k];
|
||||||
|
booleanDiff = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(booleanDiff) continue;
|
||||||
|
|
||||||
|
if (c <= Util.HIGHEST_SPECIAL) {
|
||||||
|
char[] escaped = Util.specialCharactersRepresentation[c];
|
||||||
|
if (escaped != null) {
|
||||||
|
// add unescaped portion
|
||||||
|
//if (start < i) {
|
||||||
|
// sRtn = sRtn + text.substring(start, i - start);
|
||||||
|
//}
|
||||||
|
// add escaped xml
|
||||||
|
//sRtn = sRtn + escaped;
|
||||||
|
//System.out.println(buffer[i]+" :: " + escaped);
|
||||||
|
for (int j = 0; j < escaped.length; j++) {
|
||||||
|
//System.out.println(buffer[i]+" :>: " + escaped[j]);
|
||||||
|
sRtn = sRtn + escaped[j];
|
||||||
|
}
|
||||||
|
//sRtn = sRtn+ escaped.toString();
|
||||||
|
//sRtn = sRtn + String.valueOf(buffer[i]);
|
||||||
|
start = i + 1;
|
||||||
|
}else{
|
||||||
|
sRtn = sRtn + c;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
sRtn = sRtn + c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return sRtn;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for tag attribute
|
||||||
|
public void setValue(Object value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for tag attribute
|
||||||
|
public void setDefault(String def) {
|
||||||
|
this.def = def;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for tag attribute
|
||||||
|
public void setEscapeXml(boolean escapeXml) {
|
||||||
|
this.escapeXml = escapeXml;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 2011.10.10 cmd 라인상에서 편의제공을 위해 제공, 필요없을시 삭제하여도 무방함
|
||||||
|
public static void main(String[] args) throws IOException
|
||||||
|
{
|
||||||
|
|
||||||
|
EgovComCrossSiteHndlr egovComCrossSiteHndlr = new EgovComCrossSiteHndlr();
|
||||||
|
|
||||||
|
egovComCrossSiteHndlr.value = "TRNSMIT";
|
||||||
|
|
||||||
|
String sCrossSiteHndlr = egovComCrossSiteHndlr.getWriteEscapedXml();
|
||||||
|
//System.out.println("writeEscapedXml " + egovComCrossSiteHndlr.getWriteEscapedXml());
|
||||||
|
/*
|
||||||
|
System.out.println("sCrossSiteHndlr|"+ sCrossSiteHndlr + "|");
|
||||||
|
|
||||||
|
try{
|
||||||
|
System.out.println("TRY TEST 1");
|
||||||
|
throw new Exception();
|
||||||
|
}catch(Exception e){
|
||||||
|
System.out.println("TRY TEST 2");
|
||||||
|
}finally{
|
||||||
|
System.out.println("TRY TEST 3");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
48
src/main/java/egovframework/com/cmm/EgovComExcepHndlr.java
Normal file
48
src/main/java/egovframework/com/cmm/EgovComExcepHndlr.java
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import org.egovframe.rte.fdl.cmmn.exception.handler.ExceptionHandler;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Class Name : EgovComExcepHndlr.java
|
||||||
|
* @Description : 공통서비스의 exception 처리 클래스
|
||||||
|
* @Modification Information
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------- -------------------
|
||||||
|
* 2009. 3. 13. 이삼섭
|
||||||
|
*
|
||||||
|
* @author 공통 서비스 개발팀 이삼섭
|
||||||
|
* @since 2009. 3. 13.
|
||||||
|
* @version
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class EgovComExcepHndlr implements ExceptionHandler {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(EgovComExcepHndlr.class);
|
||||||
|
|
||||||
|
/*
|
||||||
|
@Resource(name = "otherSSLMailSender")
|
||||||
|
private SimpleSSLMail mailSender;
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 발생된 Exception을 처리한다.
|
||||||
|
*/
|
||||||
|
public void occur(Exception ex, String packageName) {
|
||||||
|
//log.debug(" EgovServiceExceptionHandler run...............");
|
||||||
|
|
||||||
|
/*
|
||||||
|
try {
|
||||||
|
mailSender. send(ex, packageName);
|
||||||
|
log.debug(" sending a alert mail is completed ");
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.error(packageName, ex);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
LOGGER.error(packageName, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import org.egovframe.rte.fdl.cmmn.exception.handler.ExceptionHandler;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
public class EgovComOthersExcepHndlr implements ExceptionHandler {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(EgovComOthersExcepHndlr.class);
|
||||||
|
|
||||||
|
public void occur(Exception exception, String packageName) {
|
||||||
|
//log.debug(" EgovServiceExceptionHandler run...............");
|
||||||
|
LOGGER.error(packageName, exception);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||||
|
|
||||||
|
import org.springframework.beans.BeansException;
|
||||||
|
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||||
|
import org.springframework.context.ApplicationContext;
|
||||||
|
import org.springframework.context.ApplicationContextAware;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EgovComUtil 클래스
|
||||||
|
*
|
||||||
|
* @author 서준식
|
||||||
|
* @since 2011.09.15
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2011.09.15 서준식 최초 생성
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("egovUtil")
|
||||||
|
public class EgovComponentChecker extends EgovAbstractServiceImpl implements ApplicationContextAware{
|
||||||
|
|
||||||
|
|
||||||
|
public static ApplicationContext context;
|
||||||
|
|
||||||
|
@SuppressWarnings("static-access")
|
||||||
|
public void setApplicationContext(ApplicationContext context)
|
||||||
|
throws BeansException {
|
||||||
|
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Spring MVC에서 설정한 빈이 아닌 서비스 빈(컴포넌트)만을 검색할 수 있음
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static boolean hasComponent(String componentName){
|
||||||
|
|
||||||
|
try{
|
||||||
|
Object component = context.getBean(componentName);
|
||||||
|
|
||||||
|
if(component == null){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}catch(NoSuchBeanDefinitionException ex){// 해당 컴포넌트를 찾을 수없을 경우 false반환
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
87
src/main/java/egovframework/com/cmm/EgovMessageSource.java
Normal file
87
src/main/java/egovframework/com/cmm/EgovMessageSource.java
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import org.springframework.context.MessageSource;
|
||||||
|
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 메시지 리소스 사용을 위한 MessageSource 인터페이스 및 ReloadableResourceBundleMessageSource 클래스의 구현체
|
||||||
|
* @author 공통서비스 개발팀 이문준
|
||||||
|
* @since 2009.06.01
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.03.11 이문준 최초 생성
|
||||||
|
* 2017.07.21 장동한 args, locale 설정
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EgovMessageSource extends ReloadableResourceBundleMessageSource implements MessageSource {
|
||||||
|
|
||||||
|
private ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getReloadableResourceBundleMessageSource()
|
||||||
|
* @param reloadableResourceBundleMessageSource - resource MessageSource
|
||||||
|
* @return ReloadableResourceBundleMessageSource
|
||||||
|
*/
|
||||||
|
public void setReloadableResourceBundleMessageSource(ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource) {
|
||||||
|
this.reloadableResourceBundleMessageSource = reloadableResourceBundleMessageSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getReloadableResourceBundleMessageSource()
|
||||||
|
* @return ReloadableResourceBundleMessageSource
|
||||||
|
*/
|
||||||
|
public ReloadableResourceBundleMessageSource getReloadableResourceBundleMessageSource() {
|
||||||
|
return reloadableResourceBundleMessageSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 정의된 메세지 조회
|
||||||
|
* @param code - 메세지 코드
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getMessage(String code) {
|
||||||
|
return getReloadableResourceBundleMessageSource().getMessage(code, null, Locale.getDefault());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 정의된 메세지 조회
|
||||||
|
* @param code - 메세지 코드
|
||||||
|
* @param locale - 로케일
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getMessage(String code, Locale locale) {
|
||||||
|
return getReloadableResourceBundleMessageSource().getMessage(code, null, locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 정의된 메세지 조회
|
||||||
|
* @param code - 메세지 코드
|
||||||
|
* @param args - 매개변수
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getMessageArgs(String code, Object[] args) {
|
||||||
|
return getReloadableResourceBundleMessageSource().getMessage(code, args, Locale.getDefault());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 정의된 메세지 조회
|
||||||
|
* @param code - 메세지 코드
|
||||||
|
* @param args - 매개변수
|
||||||
|
* @param locale - 로케일
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getMessageArgsLocale(String code, Object[] args, Locale locale) {
|
||||||
|
return getReloadableResourceBundleMessageSource().getMessage(code, args, locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
155
src/main/java/egovframework/com/cmm/EgovWebUtil.java
Normal file
155
src/main/java/egovframework/com/cmm/EgovWebUtil.java
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 교차접속 스크립트 공격 취약성 방지(파라미터 문자열 교체)
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ----------- -------- ---------------------------
|
||||||
|
* 2011.10.10 한성곤 최초 생성
|
||||||
|
* 2017-02-07 이정은 시큐어코딩(ES) - 시큐어코딩 경로 조작 및 자원 삽입[CWE-22, CWE-23, CWE-95, CWE-99]
|
||||||
|
* 2018.08.17 신용호 filePathBlackList 수정
|
||||||
|
* 2018.10.10 신용호 . => \\.으로 수정
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EgovWebUtil {
|
||||||
|
public static String clearXSSMinimum(String value) {
|
||||||
|
if (value == null || value.trim().equals("")) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
String returnValue = value;
|
||||||
|
|
||||||
|
returnValue = returnValue.replaceAll("&", "&");
|
||||||
|
returnValue = returnValue.replaceAll("<", "<");
|
||||||
|
returnValue = returnValue.replaceAll(">", ">");
|
||||||
|
returnValue = returnValue.replaceAll("\"", """);
|
||||||
|
returnValue = returnValue.replaceAll("\'", "'");
|
||||||
|
returnValue = returnValue.replaceAll("\\.", ".");
|
||||||
|
returnValue = returnValue.replaceAll("%2E", ".");
|
||||||
|
returnValue = returnValue.replaceAll("%2F", "/");
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String clearXSSMaximum(String value) {
|
||||||
|
String returnValue = value;
|
||||||
|
returnValue = clearXSSMinimum(returnValue);
|
||||||
|
|
||||||
|
returnValue = returnValue.replaceAll("%00", null);
|
||||||
|
|
||||||
|
returnValue = returnValue.replaceAll("%", "%");
|
||||||
|
|
||||||
|
// \\. => .
|
||||||
|
|
||||||
|
returnValue = returnValue.replaceAll("\\.\\./", ""); // ../
|
||||||
|
returnValue = returnValue.replaceAll("\\.\\.\\\\", ""); // ..\
|
||||||
|
returnValue = returnValue.replaceAll("\\./", ""); // ./
|
||||||
|
returnValue = returnValue.replaceAll("%2F", "");
|
||||||
|
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String filePathBlackList(String value) {
|
||||||
|
String returnValue = value;
|
||||||
|
if (returnValue == null || returnValue.trim().equals("")) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
returnValue = returnValue.replaceAll("\\.\\.", "");
|
||||||
|
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 행안부 보안취약점 점검 조치 방안.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String filePathReplaceAll(String value) {
|
||||||
|
String returnValue = value;
|
||||||
|
if (returnValue == null || returnValue.trim().equals("")) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
returnValue = returnValue.replaceAll("/", "");
|
||||||
|
returnValue = returnValue.replaceAll("\\", "");
|
||||||
|
returnValue = returnValue.replaceAll("\\.\\.", ""); // ..
|
||||||
|
returnValue = returnValue.replaceAll("&", "");
|
||||||
|
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String fileInjectPathReplaceAll(String value) {
|
||||||
|
String returnValue = value;
|
||||||
|
if (returnValue == null || returnValue.trim().equals("")) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
returnValue = returnValue.replaceAll("/", "");
|
||||||
|
returnValue = returnValue.replaceAll("\\..", ""); // ..
|
||||||
|
returnValue = returnValue.replaceAll("\\\\", "");// \
|
||||||
|
returnValue = returnValue.replaceAll("&", "");
|
||||||
|
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String filePathWhiteList(String value) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isIPAddress(String str) {
|
||||||
|
Pattern ipPattern = Pattern.compile("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
|
||||||
|
|
||||||
|
return ipPattern.matcher(str).matches();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String removeCRLF(String parameter) {
|
||||||
|
return parameter.replaceAll("\r", "").replaceAll("\n", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String removeSQLInjectionRisk(String parameter) {
|
||||||
|
return parameter.replaceAll("\\p{Space}", "").replaceAll("\\*", "").replaceAll("%", "").replaceAll(";", "")
|
||||||
|
.replaceAll("-", "").replaceAll("\\+", "").replaceAll(",", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String removeOSCmdRisk(String parameter) {
|
||||||
|
return parameter.replaceAll("\\p{Space}", "").replaceAll("\\*", "").replaceAll("|", "").replaceAll(";", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LDAP 파라미터에서 특수문자 제거.
|
||||||
|
* 파라미터 별로 제거를 해야 함.
|
||||||
|
* 일괄 연결된 파라미터들은 따로 처리해야 함.
|
||||||
|
* TODO : LDAP Injection Prevent 로직 추가 필요
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String removeLDAPInjectionRisk(String value) {
|
||||||
|
|
||||||
|
String returnValue = value;
|
||||||
|
if (returnValue == null || returnValue.trim().equals("")) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*모든 특수문자 제거*/
|
||||||
|
// String match = "[^\uAC00-\uD7A30-9a-zA-Z]";//특수문자 = 한글,숫자,영문 제외
|
||||||
|
// returnValue = returnValue.replaceAll(match, "");
|
||||||
|
|
||||||
|
/*특수문자 선택적 제거*/
|
||||||
|
returnValue = returnValue.replaceAll("*", "");
|
||||||
|
returnValue = returnValue.replaceAll("&", "");
|
||||||
|
returnValue = returnValue.replaceAll("|", "");
|
||||||
|
returnValue = returnValue.replaceAll("//", "");
|
||||||
|
//...
|
||||||
|
//개별로 필요한 항목들 추가 필요
|
||||||
|
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.AbstractPaginationRenderer;
|
||||||
|
|
||||||
|
import javax.servlet.ServletContext;
|
||||||
|
|
||||||
|
import org.springframework.web.context.ServletContextAware;
|
||||||
|
/**
|
||||||
|
* ImagePaginationRenderer.java 클래스
|
||||||
|
*
|
||||||
|
* @author 서준식
|
||||||
|
* @since 2011. 9. 16.
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2011. 9. 16. 서준식 이미지 경로에 ContextPath추가
|
||||||
|
* 2016. 6. 17. 장동한 표준프레임워크 v3.6 리뉴얼
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public class ImagePaginationRenderer extends AbstractPaginationRenderer implements ServletContextAware{
|
||||||
|
|
||||||
|
private ServletContext servletContext;
|
||||||
|
|
||||||
|
public ImagePaginationRenderer() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initVariables(){
|
||||||
|
|
||||||
|
firstPageLabel = "<li class=\"first\"><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">첫 페이지</a></li>";
|
||||||
|
previousPageLabel = "<li class=\"prev\"><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">이전 페이지</a></li>";
|
||||||
|
|
||||||
|
currentPageLabel = "<li class=\"current\"><a onClick=\"return false;\">{0}</a></li>";
|
||||||
|
otherPageLabel = "<li><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">{2}</a></li>";
|
||||||
|
|
||||||
|
nextPageLabel = "<li class=\"next\"><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">다음 페이지</a></li>";
|
||||||
|
lastPageLabel = "<li class=\"last\"><a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">끝 페이지</a></li>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void setServletContext(ServletContext servletContext) {
|
||||||
|
this.servletContext = servletContext;
|
||||||
|
initVariables();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
50
src/main/java/egovframework/com/cmm/IncludedCompInfoVO.java
Normal file
50
src/main/java/egovframework/com/cmm/IncludedCompInfoVO.java
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IncludedInfo annotation을 바탕으로 화면에 표시할 정보를 구성하기 위한 VO 클래스
|
||||||
|
* @author 공통컴포넌트 정진오
|
||||||
|
* @since 2011.08.26
|
||||||
|
* @version 2.0.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2011.08.26 정진오 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public class IncludedCompInfoVO {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private String listUrl;
|
||||||
|
private int order;
|
||||||
|
private int gid;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
public String getListUrl() {
|
||||||
|
return listUrl;
|
||||||
|
}
|
||||||
|
public void setListUrl(String listUrl) {
|
||||||
|
this.listUrl = listUrl;
|
||||||
|
}
|
||||||
|
public int getOrder() {
|
||||||
|
return order;
|
||||||
|
}
|
||||||
|
public void setOrder(int order) {
|
||||||
|
this.order = order;
|
||||||
|
}
|
||||||
|
public int getGid() {
|
||||||
|
return gid;
|
||||||
|
}
|
||||||
|
public void setGid(int gid) {
|
||||||
|
this.gid = gid;
|
||||||
|
}
|
||||||
|
}
|
||||||
285
src/main/java/egovframework/com/cmm/LoginVO.java
Normal file
285
src/main/java/egovframework/com/cmm/LoginVO.java
Normal file
@ -0,0 +1,285 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Class Name : LoginVO.java
|
||||||
|
* @Description : Login VO class
|
||||||
|
* @Modification Information
|
||||||
|
* @
|
||||||
|
* @ 수정일 수정자 수정내용
|
||||||
|
* @ ------- -------- ---------------------------
|
||||||
|
* @ 2009.03.03 박지욱 최초 생성
|
||||||
|
* @ 2021.05.30 정진오 디지털원패스 사용자키/세션값 추가
|
||||||
|
*
|
||||||
|
* @author 공통서비스 개발팀 박지욱
|
||||||
|
* @since 2009.03.03
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class LoginVO implements Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -8274004534207618049L;
|
||||||
|
|
||||||
|
/** 아이디 */
|
||||||
|
private String id;
|
||||||
|
/** 이름 */
|
||||||
|
private String name;
|
||||||
|
/** 주민등록번호 */
|
||||||
|
private String ihidNum;
|
||||||
|
/** 이메일주소 */
|
||||||
|
private String email;
|
||||||
|
/** 비밀번호 */
|
||||||
|
private String password;
|
||||||
|
/** 비밀번호 힌트 */
|
||||||
|
private String passwordHint;
|
||||||
|
/** 비밀번호 정답 */
|
||||||
|
private String passwordCnsr;
|
||||||
|
/** 사용자구분 */
|
||||||
|
private String userSe;
|
||||||
|
/** 조직(부서)ID */
|
||||||
|
private String orgnztId;
|
||||||
|
/** 조직(부서)명 */
|
||||||
|
private String orgnztNm;
|
||||||
|
/** 고유아이디 */
|
||||||
|
private String uniqId;
|
||||||
|
/** 로그인 후 이동할 페이지 */
|
||||||
|
private String url;
|
||||||
|
/** 사용자 IP정보 */
|
||||||
|
private String ip;
|
||||||
|
/** GPKI인증 DN */
|
||||||
|
private String dn;
|
||||||
|
/** 디지털원패스 사용자키 */
|
||||||
|
private String onepassUserkey;
|
||||||
|
/** 디지털원패스 사용자세션값 */
|
||||||
|
private String onepassIntfToken;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* id attribute 값을 설정한다.
|
||||||
|
* @param id String
|
||||||
|
*/
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* name attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* name attribute 값을 설정한다.
|
||||||
|
* @param name String
|
||||||
|
*/
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* ihidNum attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getIhidNum() {
|
||||||
|
return ihidNum;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* ihidNum attribute 값을 설정한다.
|
||||||
|
* @param ihidNum String
|
||||||
|
*/
|
||||||
|
public void setIhidNum(String ihidNum) {
|
||||||
|
this.ihidNum = ihidNum;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* email attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* email attribute 값을 설정한다.
|
||||||
|
* @param email String
|
||||||
|
*/
|
||||||
|
public void setEmail(String email) {
|
||||||
|
this.email = email;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* password attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* password attribute 값을 설정한다.
|
||||||
|
* @param password String
|
||||||
|
*/
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* passwordHint attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getPasswordHint() {
|
||||||
|
return passwordHint;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* passwordHint attribute 값을 설정한다.
|
||||||
|
* @param passwordHint String
|
||||||
|
*/
|
||||||
|
public void setPasswordHint(String passwordHint) {
|
||||||
|
this.passwordHint = passwordHint;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* passwordCnsr attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getPasswordCnsr() {
|
||||||
|
return passwordCnsr;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* passwordCnsr attribute 값을 설정한다.
|
||||||
|
* @param passwordCnsr String
|
||||||
|
*/
|
||||||
|
public void setPasswordCnsr(String passwordCnsr) {
|
||||||
|
this.passwordCnsr = passwordCnsr;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* userSe attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getUserSe() {
|
||||||
|
return userSe;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* userSe attribute 값을 설정한다.
|
||||||
|
* @param userSe String
|
||||||
|
*/
|
||||||
|
public void setUserSe(String userSe) {
|
||||||
|
this.userSe = userSe;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* orgnztId attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getOrgnztId() {
|
||||||
|
return orgnztId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* orgnztId attribute 값을 설정한다.
|
||||||
|
* @param orgnztId String
|
||||||
|
*/
|
||||||
|
public void setOrgnztId(String orgnztId) {
|
||||||
|
this.orgnztId = orgnztId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* uniqId attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getUniqId() {
|
||||||
|
return uniqId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* uniqId attribute 값을 설정한다.
|
||||||
|
* @param uniqId String
|
||||||
|
*/
|
||||||
|
public void setUniqId(String uniqId) {
|
||||||
|
this.uniqId = uniqId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* url attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* url attribute 값을 설정한다.
|
||||||
|
* @param url String
|
||||||
|
*/
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* ip attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getIp() {
|
||||||
|
return ip;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* ip attribute 값을 설정한다.
|
||||||
|
* @param ip String
|
||||||
|
*/
|
||||||
|
public void setIp(String ip) {
|
||||||
|
this.ip = ip;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* dn attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getDn() {
|
||||||
|
return dn;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* dn attribute 값을 설정한다.
|
||||||
|
* @param dn String
|
||||||
|
*/
|
||||||
|
public void setDn(String dn) {
|
||||||
|
this.dn = dn;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return the orgnztNm
|
||||||
|
*/
|
||||||
|
public String getOrgnztNm() {
|
||||||
|
return orgnztNm;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param orgnztNm the orgnztNm to set
|
||||||
|
*/
|
||||||
|
public void setOrgnztNm(String orgnztNm) {
|
||||||
|
this.orgnztNm = orgnztNm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 디지털원패스 사용자키를 리턴한다.
|
||||||
|
* @return onepassUserkey
|
||||||
|
*/
|
||||||
|
public String getOnepassUserkey() {
|
||||||
|
return onepassUserkey;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 디지털원패스 사용자키를 설정한다.
|
||||||
|
* @param onepassUserkey
|
||||||
|
*/
|
||||||
|
public void setOnepassUserkey(String onepassUserkey) {
|
||||||
|
this.onepassUserkey = onepassUserkey;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 디지털원패스 사용자세션값을 리턴한다.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getOnepassIntfToken() {
|
||||||
|
return onepassIntfToken;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 디지털원패스 사용자세션값을 설정한다.
|
||||||
|
* @param onepassIntfToken
|
||||||
|
*/
|
||||||
|
public void setOnepassIntfToken(String onepassIntfToken) {
|
||||||
|
this.onepassIntfToken = onepassIntfToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.AbstractPaginationRenderer;
|
||||||
|
|
||||||
|
import javax.servlet.ServletContext;
|
||||||
|
|
||||||
|
import org.springframework.web.context.ServletContextAware;
|
||||||
|
/**
|
||||||
|
* ImagePaginationRenderer.java 클래스
|
||||||
|
*
|
||||||
|
* @author 서준식
|
||||||
|
* @since 2011. 9. 16.
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2011. 9. 16. 서준식 이미지 경로에 ContextPath추가
|
||||||
|
* 2016. 6. 17. 장동한 표준프레임워크 v3.6 리뉴얼
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public class RegacyPaginationRenderer extends AbstractPaginationRenderer implements ServletContextAware{
|
||||||
|
|
||||||
|
private ServletContext servletContext;
|
||||||
|
|
||||||
|
public RegacyPaginationRenderer() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initVariables(){
|
||||||
|
|
||||||
|
firstPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/icon/icon_prevend.gif\" alt=\"처음\" border=\"0\"/></a> ";
|
||||||
|
previousPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/icon/icon_prev.gif\" alt=\"이전\" border=\"0\"/></a> ";
|
||||||
|
currentPageLabel = "<strong>{0}</strong> ";
|
||||||
|
otherPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">{2}</a> ";
|
||||||
|
nextPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/icon/icon_next.gif\" alt=\"다음\" border=\"0\"/></a> ";
|
||||||
|
lastPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/egovframework/com/cmm/icon/icon_nextend.gif\" alt=\"마지막\" border=\"0\"/></a> ";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServletContext(ServletContext servletContext) {
|
||||||
|
this.servletContext = servletContext;
|
||||||
|
initVariables();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
120
src/main/java/egovframework/com/cmm/SessionVO.java
Normal file
120
src/main/java/egovframework/com/cmm/SessionVO.java
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
package egovframework.com.cmm;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 세션 VO 클래스
|
||||||
|
* @author 공통서비스 개발팀 박지욱
|
||||||
|
* @since 2009.03.06
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.03.06 박지욱 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class SessionVO implements Serializable {
|
||||||
|
|
||||||
|
/** 아이디 */
|
||||||
|
private String sUserId;
|
||||||
|
/** 이름 */
|
||||||
|
private String sUserNm;
|
||||||
|
/** 이메일 */
|
||||||
|
private String sEmail;
|
||||||
|
/** 사용자구분 */
|
||||||
|
private String sUserSe;
|
||||||
|
/** 조직(부서)ID */
|
||||||
|
private String orgnztId;
|
||||||
|
/** 고유아이디 */
|
||||||
|
private String uniqId;
|
||||||
|
/**
|
||||||
|
* sUserId attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getSUserId() {
|
||||||
|
return sUserId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* sUserId attribute 값을 설정한다.
|
||||||
|
* @param sUserId String
|
||||||
|
*/
|
||||||
|
public void setSUserId(String userId) {
|
||||||
|
sUserId = userId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* sUserNm attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getSUserNm() {
|
||||||
|
return sUserNm;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* sUserNm attribute 값을 설정한다.
|
||||||
|
* @param sUserNm String
|
||||||
|
*/
|
||||||
|
public void setSUserNm(String userNm) {
|
||||||
|
sUserNm = userNm;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* sEmail attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getSEmail() {
|
||||||
|
return sEmail;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* sEmail attribute 값을 설정한다.
|
||||||
|
* @param sEmail String
|
||||||
|
*/
|
||||||
|
public void setSEmail(String email) {
|
||||||
|
sEmail = email;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* sUserSe attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getSUserSe() {
|
||||||
|
return sUserSe;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* sUserSe attribute 값을 설정한다.
|
||||||
|
* @param sUserSe String
|
||||||
|
*/
|
||||||
|
public void setSUserSe(String userSe) {
|
||||||
|
sUserSe = userSe;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* orgnztId attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getOrgnztId() {
|
||||||
|
return orgnztId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* orgnztId attribute 값을 설정한다.
|
||||||
|
* @param orgnztId String
|
||||||
|
*/
|
||||||
|
public void setOrgnztId(String orgnztId) {
|
||||||
|
this.orgnztId = orgnztId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* uniqId attribute 를 리턴한다.
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public String getUniqId() {
|
||||||
|
return uniqId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* uniqId attribute 값을 설정한다.
|
||||||
|
* @param uniqId String
|
||||||
|
*/
|
||||||
|
public void setUniqId(String uniqId) {
|
||||||
|
this.uniqId = uniqId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package egovframework.com.cmm.annotation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 컴포넌트의 포함 정보 표현을 위한 annotation 클래스
|
||||||
|
* 기본적으로 Controller 클래스에 annotation을 부여하되,
|
||||||
|
* 하나의 Controller에 여러 개의 목록성 url mapping이 제공되는 경우에는
|
||||||
|
* 메소드에 annotation을 부여한다.
|
||||||
|
* @author 공통컴포넌트 정진오
|
||||||
|
* @since 2011.08.26
|
||||||
|
* @version 2.0.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2011.08.26 정진오 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
public @interface IncludedInfo {
|
||||||
|
String name() default ""; // 컴포넌트의 한글 이름
|
||||||
|
String listUrl() default ""; // 컴포넌트의 목록정보조회를 위한 URL
|
||||||
|
int order() default 0; // 자동 생성되는 메뉴 목록에 표시되는 순서
|
||||||
|
int gid() default 0; // 컴포넌트의 Group ID(대분류 구분)
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
package egovframework.com.cmm.config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EgovLoginConfig 클래스
|
||||||
|
* <Notice>
|
||||||
|
* 사용자 인증수행제한에 대한 설정을 관리하는 클래스
|
||||||
|
* <Disclaimer>
|
||||||
|
* N/A
|
||||||
|
*
|
||||||
|
* @author 장동한
|
||||||
|
* @since 2017.07.17
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2016.07.17 장동한 최초 생성
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
public class EgovLoginConfig {
|
||||||
|
//로그인 인증 제한 여부
|
||||||
|
boolean lock = false;
|
||||||
|
//로그인 인증 제한 횟수
|
||||||
|
int lockCount = 0;
|
||||||
|
|
||||||
|
public boolean isLock() {
|
||||||
|
return lock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLock(boolean lock) {
|
||||||
|
this.lock = lock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLockCount() {
|
||||||
|
return lockCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLockCount(int lockCount) {
|
||||||
|
this.lockCount = lockCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,202 @@
|
|||||||
|
package egovframework.com.cmm.config;
|
||||||
|
|
||||||
|
import javax.servlet.FilterRegistration;
|
||||||
|
import javax.servlet.ServletContext;
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.ServletRegistration;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.web.WebApplicationInitializer;
|
||||||
|
import org.springframework.web.context.ContextLoaderListener;
|
||||||
|
import org.springframework.web.context.support.XmlWebApplicationContext;
|
||||||
|
import org.springframework.web.filter.DelegatingFilterProxy;
|
||||||
|
import org.springframework.web.filter.HiddenHttpMethodFilter;
|
||||||
|
import org.springframework.web.multipart.support.MultipartFilter;
|
||||||
|
import org.springframework.web.servlet.DispatcherServlet;
|
||||||
|
|
||||||
|
import egovframework.com.cmm.filter.HTMLTagFilter;
|
||||||
|
import egovframework.com.cmm.filter.SessionTimeoutCookieFilter;
|
||||||
|
import egovframework.com.cmm.service.EgovProperties;
|
||||||
|
import egovframework.com.sec.security.filter.EgovSpringSecurityLoginFilter;
|
||||||
|
import egovframework.com.sec.security.filter.EgovSpringSecurityLogoutFilter;
|
||||||
|
import egovframework.com.uat.uap.filter.EgovLoginPolicyFilter;
|
||||||
|
import egovframework.com.utl.wed.filter.CkFilter;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EgovWebApplicationInitializer 클래스
|
||||||
|
* <Notice>
|
||||||
|
* 사용자 인증 권한처리를 분리(session, spring security) 하기 위해서 web.xml의 기능을
|
||||||
|
* Servlet3.x WebApplicationInitializer 기능으로 처리
|
||||||
|
* <Disclaimer>
|
||||||
|
* N/A
|
||||||
|
*
|
||||||
|
* @author 장동한
|
||||||
|
* @since 2016.06.23
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2016.06.23 장동한 최초 생성
|
||||||
|
* 2018.10.02 신용호 Facebook 관련 HiddenHttpMethodFilter 추가
|
||||||
|
* 2018.10.26 신용호 EgovLoginPolicyFilter 추가 (IP접근처리)
|
||||||
|
* 2018.12.03 신용호 springMultipartFilter,HTMLTagFilter 추가 (XSS방지처리)
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
public class EgovWebApplicationInitializer implements WebApplicationInitializer {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(EgovWebApplicationInitializer.class);
|
||||||
|
@Override
|
||||||
|
public void onStartup(ServletContext servletContext) throws ServletException {
|
||||||
|
LOGGER.debug("EgovWebApplicationInitializer START-============================================");
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// Egov Web ServletContextListener 설정
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
servletContext.addListener(new egovframework.com.cmm.context.EgovWebServletContextListener());
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// Spring CharacterEncodingFilter 설정
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
FilterRegistration.Dynamic characterEncoding = servletContext.addFilter("encodingFilter", new org.springframework.web.filter.CharacterEncodingFilter());
|
||||||
|
characterEncoding.setInitParameter("encoding", "UTF-8");
|
||||||
|
characterEncoding.setInitParameter("forceEncoding", "true");
|
||||||
|
characterEncoding.addMappingForUrlPatterns(null, false, "*.do");
|
||||||
|
//characterEncoding.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), true, "*.do");
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// Spring ServletContextListener 설정
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
XmlWebApplicationContext rootContext = new XmlWebApplicationContext();
|
||||||
|
rootContext.setConfigLocations(new String[] { "classpath*:egovframework/spring/com/**/context-*.xml" });
|
||||||
|
//rootContext.setConfigLocations(new String[] { "classpath*:egovframework/spring/com/context-*.xml","classpath*:egovframework/spring/com/*/context-*.xml" });
|
||||||
|
rootContext.refresh();
|
||||||
|
rootContext.start();
|
||||||
|
|
||||||
|
servletContext.addListener(new ContextLoaderListener(rootContext));
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// Spring ServletContextListener 설정
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
XmlWebApplicationContext xmlWebApplicationContext = new XmlWebApplicationContext();
|
||||||
|
xmlWebApplicationContext.setConfigLocation("/WEB-INF/config/egovframework/springmvc/egov-com-*.xml");
|
||||||
|
ServletRegistration.Dynamic dispatcher = servletContext.addServlet("dispatcher", new DispatcherServlet(xmlWebApplicationContext));
|
||||||
|
//dispatcher.addMapping("*.do");
|
||||||
|
dispatcher.addMapping("/"); // Facebook OAuth 사용시 변경
|
||||||
|
dispatcher.setLoadOnStartup(1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* if("security".equals(EgovProperties.getProperty("Globals.Auth").trim())) {
|
||||||
|
*
|
||||||
|
* //------------------------------------------------------------- //
|
||||||
|
* springSecurityFilterChain 설정
|
||||||
|
* //-------------------------------------------------------------
|
||||||
|
* FilterRegistration.Dynamic springSecurityFilterChain =
|
||||||
|
* servletContext.addFilter("springSecurityFilterChain", new
|
||||||
|
* DelegatingFilterProxy());
|
||||||
|
* springSecurityFilterChain.addMappingForUrlPatterns(null, false, "*");
|
||||||
|
* //servletContext.addFilter("springSecurityFilterChain", new
|
||||||
|
* DelegatingFilterProxy("springSecurityFilterChain")).addMappingForUrlPatterns(
|
||||||
|
* null, false, "/*");
|
||||||
|
*
|
||||||
|
* //------------------------------------------------------------- //
|
||||||
|
* HttpSessionEventPublisher 설정
|
||||||
|
* //-------------------------------------------------------------
|
||||||
|
* servletContext.addListener(new
|
||||||
|
* org.springframework.security.web.session.HttpSessionEventPublisher());
|
||||||
|
*
|
||||||
|
* //------------------------------------------------------------- //
|
||||||
|
* EgovSpringSecurityLoginFilter 설정
|
||||||
|
* //-------------------------------------------------------------
|
||||||
|
* FilterRegistration.Dynamic egovSpringSecurityLoginFilter =
|
||||||
|
* servletContext.addFilter("egovSpringSecurityLoginFilter", new
|
||||||
|
* EgovSpringSecurityLoginFilter()); //로그인 실패시 반활 될 URL설정
|
||||||
|
* egovSpringSecurityLoginFilter.setInitParameter("loginURL",
|
||||||
|
* "/uat/uia/egovLoginUsr.do"); //로그인 처리 URL설정
|
||||||
|
* egovSpringSecurityLoginFilter.setInitParameter("loginProcessURL",
|
||||||
|
* "/uat/uia/actionLogin.do"); //처리 Url Pattern
|
||||||
|
* egovSpringSecurityLoginFilter.addMappingForUrlPatterns(null, false, "*.do");
|
||||||
|
*
|
||||||
|
* //------------------------------------------------------------- //
|
||||||
|
* EgovSpringSecurityLogoutFilter 설정
|
||||||
|
* //-------------------------------------------------------------
|
||||||
|
* FilterRegistration.Dynamic egovSpringSecurityLogoutFilter =
|
||||||
|
* servletContext.addFilter("egovSpringSecurityLogoutFilter", new
|
||||||
|
* EgovSpringSecurityLogoutFilter());
|
||||||
|
* egovSpringSecurityLogoutFilter.addMappingForUrlPatterns(null, false,
|
||||||
|
* "/uat/uia/actionLogout.do");
|
||||||
|
*
|
||||||
|
* } else
|
||||||
|
* if("session".equals(EgovProperties.getProperty("Globals.Auth").trim())) {
|
||||||
|
* //------------------------------------------------------------- //
|
||||||
|
* EgovLoginPolicyFilter 설정
|
||||||
|
* //-------------------------------------------------------------
|
||||||
|
* FilterRegistration.Dynamic egovLoginPolicyFilter =
|
||||||
|
* servletContext.addFilter("LoginPolicyFilter", new EgovLoginPolicyFilter());
|
||||||
|
* egovLoginPolicyFilter.addMappingForUrlPatterns(null, false,
|
||||||
|
* "/uat/uia/actionLogin.do");
|
||||||
|
*
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// 스프링 Security 필터 설정 추가 JWKIM
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
FilterRegistration.Dynamic springSecurityFilterChain = servletContext.addFilter("springSecurityFilterChain", new org.springframework.web.filter.DelegatingFilterProxy());
|
||||||
|
springSecurityFilterChain.addMappingForUrlPatterns(null, false, "/*");
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// CkFilter 설정 (CKEditor 사용시 설정)
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
FilterRegistration.Dynamic regCkFilter = servletContext.addFilter("CKFilter", new CkFilter());
|
||||||
|
regCkFilter.setInitParameter("properties", "egovframework/egovProps/ck.properties");
|
||||||
|
regCkFilter.addMappingForUrlPatterns(null, false, "/ckUploadImage");
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// HiddenHttpMethodFilter 설정 (Facebook OAuth 사용시 설정)
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
FilterRegistration.Dynamic hiddenHttpMethodFilter = servletContext.addFilter("hiddenHttpMethodFilter", new HiddenHttpMethodFilter());
|
||||||
|
hiddenHttpMethodFilter.addMappingForUrlPatterns(null, false, "/*");
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// Tomcat의 경우 allowCasualMultipartParsing="true" 추가
|
||||||
|
// <Context docBase="" path="/" reloadable="true" allowCasualMultipartParsing="true">
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
MultipartFilter springMultipartFilter = new MultipartFilter();
|
||||||
|
springMultipartFilter.setMultipartResolverBeanName("multipartResolver");
|
||||||
|
FilterRegistration.Dynamic multipartFilter = servletContext.addFilter("springMultipartFilter", springMultipartFilter);
|
||||||
|
multipartFilter.addMappingForUrlPatterns(null, false, "*.do");
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// HTMLTagFilter의 경우는 파라미터에 대하여 XSS 오류 방지를 위한 변환을 처리합니다.
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// HTMLTagFIlter의 경우는 JSP의 <c:out /> 등을 사용하지 못하는 특수한 상황에서 사용하시면 됩니다.
|
||||||
|
// (<c:out />의 경우 뷰단에서 데이터 출력시 XSS 방지 처리가 됨)
|
||||||
|
FilterRegistration.Dynamic htmlTagFilter = servletContext.addFilter("htmlTagFilter", new HTMLTagFilter());
|
||||||
|
htmlTagFilter.addMappingForUrlPatterns(null, false, "*.do");
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// SessionTimeoutCookieFilter는 쿠키에 타임아웃 시간을 기록한다.
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// latestServerTime - 서버 최근 시간
|
||||||
|
// expireSessionTime - 세션이 만료되는 시간
|
||||||
|
FilterRegistration.Dynamic sessionTimeoutFilter = servletContext.addFilter("sessionTimeoutFilter", new SessionTimeoutCookieFilter());
|
||||||
|
sessionTimeoutFilter.addMappingForUrlPatterns(null, false, "*.do");
|
||||||
|
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
// Spring RequestContextListener 설정
|
||||||
|
//-------------------------------------------------------------
|
||||||
|
servletContext.addListener(new org.springframework.web.context.request.RequestContextListener());
|
||||||
|
|
||||||
|
LOGGER.debug("EgovWebApplicationInitializer END-============================================");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
package egovframework.com.cmm.context;
|
||||||
|
|
||||||
|
import javax.servlet.ServletContextEvent;
|
||||||
|
import javax.servlet.ServletContextListener;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import egovframework.com.cmm.service.EgovProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EgovWebServletContextListener 클래스
|
||||||
|
* <Notice>
|
||||||
|
* 데이터베이스 설정을 spring.profiles.active 방식으로 처리
|
||||||
|
* (공통컴포넌트 특성상 데이터베이스별 분리/개발,검증,운영서버로 분리 가능)
|
||||||
|
* <Disclaimer>
|
||||||
|
* N/A
|
||||||
|
*
|
||||||
|
* @author 장동한
|
||||||
|
* @since 2016.06.23
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2016.06.23 장동한 최초 생성
|
||||||
|
* 2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EgovWebServletContextListener implements ServletContextListener {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(EgovWebServletContextListener.class);
|
||||||
|
|
||||||
|
public EgovWebServletContextListener(){
|
||||||
|
setEgovProfileSetting();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void contextInitialized(ServletContextEvent event){
|
||||||
|
if(System.getProperty("spring.profiles.active") == null){
|
||||||
|
setEgovProfileSetting();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void contextDestroyed(ServletContextEvent event) {
|
||||||
|
if(System.getProperty("spring.profiles.active") != null){
|
||||||
|
System.clearProperty("spring.profiles.active");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEgovProfileSetting(){
|
||||||
|
try {
|
||||||
|
LOGGER.debug("===========================Start EgovServletContextLoad START ===========");
|
||||||
|
System.setProperty("spring.profiles.active", EgovProperties.getProperty("Globals.DbType")+","+EgovProperties.getProperty("Globals.Auth"));
|
||||||
|
LOGGER.debug("Setting spring.profiles.active>"+System.getProperty("spring.profiles.active"));
|
||||||
|
LOGGER.debug("===========================END EgovServletContextLoad END ===========");
|
||||||
|
//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() +"] search fail : " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package egovframework.com.cmm.exception;
|
||||||
|
|
||||||
|
import org.egovframe.rte.fdl.cmmn.exception.BaseRuntimeException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EgovXssException 클래스
|
||||||
|
*
|
||||||
|
* @author 장동한
|
||||||
|
* @since 2016.10.27
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2016.10.17 장동한 최초 생성
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EgovXssException extends BaseRuntimeException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EgovXssException 생성자.
|
||||||
|
*
|
||||||
|
* @param defaultMessage 메세지 지정
|
||||||
|
* @param wrappedException 원인 Exception
|
||||||
|
*/
|
||||||
|
public EgovXssException(String message, String messageKey) {
|
||||||
|
this.messageKey = messageKey;
|
||||||
|
this.messageParameters = null;
|
||||||
|
this.message = message;
|
||||||
|
this.wrappedException = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* 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 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;
|
||||||
|
|
||||||
|
public class HTMLTagFilter implements Filter{
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
private FilterConfig config;
|
||||||
|
|
||||||
|
public void doFilter(ServletRequest request, ServletResponse response,
|
||||||
|
FilterChain chain) throws IOException, ServletException {
|
||||||
|
|
||||||
|
chain.doFilter(new HTMLTagFilterRequestWrapper((HttpServletRequest)request), response);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(FilterConfig config) throws ServletException {
|
||||||
|
this.config = config;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void destroy() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,187 @@
|
|||||||
|
/*
|
||||||
|
* 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.util.Map;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletRequestWrapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* HTMLTagFilterRequestWrapper
|
||||||
|
* @author 공통컴포넌트 팀 신용호
|
||||||
|
* @since 2018.03.21
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2018.03.21 신용호 getParameterMap()구현 추가
|
||||||
|
* 2019.01.31 신용호 whiteList 태그 추가
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class HTMLTagFilterRequestWrapper extends HttpServletRequestWrapper {
|
||||||
|
|
||||||
|
// Tag 화이트 리스트 ( 허용할 태그 등록 )
|
||||||
|
static private String[] whiteListTag = { "<p>","<br />","<br>","</p>", "</p", "<" ,"</", ">" };
|
||||||
|
|
||||||
|
public HTMLTagFilterRequestWrapper(HttpServletRequest request) {
|
||||||
|
super(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getParameterValues(String parameter) {
|
||||||
|
|
||||||
|
String[] values = super.getParameterValues(parameter);
|
||||||
|
|
||||||
|
if(values==null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < values.length; i++) {
|
||||||
|
if (values[i] != null) {
|
||||||
|
values[i] = getSafeParamData(values[i]);
|
||||||
|
//System.out.println( "[HTMLTagFilter getParameterValues] "+ parameter + "===>>>"+values[i] );
|
||||||
|
} else {
|
||||||
|
values[i] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParameter(String parameter) {
|
||||||
|
|
||||||
|
String value = super.getParameter(parameter);
|
||||||
|
|
||||||
|
if(value==null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
value = getSafeParamData(value);
|
||||||
|
//System.out.println( "[HTMLTagFilter getParameter] "+ parameter + "===>>>"+value );
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map으로 바인딩된 경우를 처리한다.
|
||||||
|
*
|
||||||
|
* @return Map - String Type Key / String배열타입 값
|
||||||
|
*/
|
||||||
|
public Map<String, String[]> getParameterMap() {
|
||||||
|
Map<String, String[]> 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2011.07.01 서준식 최초 생성
|
||||||
|
* 2011.09.07 서준식 인증이 필요없는 URL을 패스하는 로직 추가
|
||||||
|
* 2017.08.31 장동한 인증된 사용자 체크로직 변경 및 관리자 권한 체크 로직 추가
|
||||||
|
* 2021.08.27 신용호 dummy모드 사용시 "60. 권한관리" 접근오류 수정
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
public class AuthenticInterceptor extends HandlerInterceptorAdapter {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Environment environment;
|
||||||
|
|
||||||
|
/** log */
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(AuthenticInterceptor.class);
|
||||||
|
|
||||||
|
/** 관리자 접근 권한 패턴 목록 */
|
||||||
|
private List<String> adminAuthPatternList;
|
||||||
|
|
||||||
|
public List<String> getAdminAuthPatternList() {
|
||||||
|
return adminAuthPatternList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAdminAuthPatternList(List<String> 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<String> authList = (List<String>)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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ---------- -------- ---------------------------
|
||||||
|
* 2013.03.28 이기하 최초 생성
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
217
src/main/java/egovframework/com/cmm/service/CmmnDetailCode.java
Normal file
217
src/main/java/egovframework/com/cmm/service/CmmnDetailCode.java
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
package egovframework.com.cmm.service;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 공통상세코드 모델 클래스
|
||||||
|
* @author 공통서비스 개발팀 이중호
|
||||||
|
* @since 2009.04.01
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.04.01 이중호 최초 생성
|
||||||
|
* 2017.09.07 이정은 표준프레임워크 v3.7 개선(clCode 추가)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.03.11 이삼섭 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public interface EgovCmmUseService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (문화원) 공통코드를 조회한다.
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return List(코드)
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<CmmCodeVO> selectCmmCode(CmmCodeVO cmmCode) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (문화원) 공통코드를 조회한다.
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return List(코드)
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<CmmCodeVO> selectAditCodeItem(String bbsId) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 공통코드를 조회한다.
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return List(코드)
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<CmmnDetailCode> selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ComDefaultCodeVO의 리스트를 받아서 여러개의 코드 리스트를 맵에 담아서 리턴한다.
|
||||||
|
*
|
||||||
|
* @param voList
|
||||||
|
* @return Map(코드)
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public Map<String, List<CmmnDetailCode>> selectCmmCodeDetails(List<?> voList) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 조직정보를 코드형태로 리턴한다.
|
||||||
|
*
|
||||||
|
* @param 조회조건정보 vo
|
||||||
|
* @return 조직정보 List
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<CmmnDetailCode> selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 그룹정보를 코드형태로 리턴한다.
|
||||||
|
*
|
||||||
|
* @param 조회조건정보 vo
|
||||||
|
* @return 그룹정보 List
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<CmmnDetailCode> selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<AttachmentVO> 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<AttachmentVO> deleteFiles) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 파일에 대한 목록을 조회한다.
|
||||||
|
*
|
||||||
|
* @param fvo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<FileVO> 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<String, Object> selectFileListByFileNm(FileVO fvo) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 이미지 파일에 대한 목록을 조회한다.
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<FileVO> selectImageFileList(FileVO vo) throws Exception;
|
||||||
|
|
||||||
|
}
|
||||||
524
src/main/java/egovframework/com/cmm/service/EgovFileMngUtil.java
Normal file
524
src/main/java/egovframework/com/cmm/service/EgovFileMngUtil.java
Normal file
@ -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<MultipartFile> 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<FileVO> parseFileInf(Map<String, MultipartFile> 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<Entry<String, MultipartFile>> itr = files.entrySet().iterator();
|
||||||
|
MultipartFile file;
|
||||||
|
String filePath = "";
|
||||||
|
List<FileVO> result = new ArrayList<FileVO>();
|
||||||
|
FileVO fvo;
|
||||||
|
|
||||||
|
while (itr.hasNext()) {
|
||||||
|
Entry<String, MultipartFile> 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<FileVO> parseFileInf(List<MultipartFile> 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<FileVO> result = new ArrayList<FileVO>();
|
||||||
|
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<String, String> uploadFile(MultipartFile file) throws Exception {
|
||||||
|
|
||||||
|
HashMap<String, String> map = new HashMap<String, String>();
|
||||||
|
//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("<html>");
|
||||||
|
printwriter.println("<br><br><br><h2>Could not get file name:<br>" + requestedFile + "</h2>");
|
||||||
|
printwriter.println("<br><br><br><center><h3><a href='javascript: history.go(-1)'>Back</a></h3></center>");
|
||||||
|
printwriter.println("<br><br><br>© webAccess");
|
||||||
|
printwriter.println("</html>");
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
182
src/main/java/egovframework/com/cmm/service/EgovProperties.java
Normal file
182
src/main/java/egovframework/com/cmm/service/EgovProperties.java
Normal file
@ -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<Map<String, String>> loadPropertyFile(String property) {
|
||||||
|
|
||||||
|
// key - value 형태로 된 배열 결과
|
||||||
|
ArrayList<Map<String, String>> keyList = new ArrayList<Map<String, String>>();
|
||||||
|
|
||||||
|
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<String, String> map = new HashMap<String, String>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<String> getAuthorities();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 인증된 사용자 여부를 체크한다.
|
||||||
|
* @return Boolean - 인증된 사용자 여부(TRUE / FALSE)
|
||||||
|
*/
|
||||||
|
public Boolean isAuthenticated();
|
||||||
|
|
||||||
|
}
|
||||||
148
src/main/java/egovframework/com/cmm/service/FileResizeUtil.java
Normal file
148
src/main/java/egovframework/com/cmm/service/FileResizeUtil.java
Normal file
@ -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<FileVO> 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<FileVO> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
240
src/main/java/egovframework/com/cmm/service/FileVO.java
Normal file
240
src/main/java/egovframework/com/cmm/service/FileVO.java
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
59
src/main/java/egovframework/com/cmm/service/Globals.java
Normal file
59
src/main/java/egovframework/com/cmm/service/Globals.java
Normal file
@ -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");
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<CmmCodeVO> selectCmmCode(CmmCodeVO cmmCode) {
|
||||||
|
return (List<CmmCodeVO>) list("CmmUseDAO.selectCmmCode",cmmCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (문화원) 주어진 조건에 따른 공통코드를 불러온다.
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<CmmCodeVO> selectAditCodeItem(String bbsId) {
|
||||||
|
return selectList("CmmUseDAO.selectAditCodeItem", bbsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 주어진 조건에 따른 공통코드를 불러온다.
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<CmmnDetailCode> selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception {
|
||||||
|
return (List<CmmnDetailCode>) list("CmmUseDAO.selectCmmCodeDetail", vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 공통코드로 사용할 조직정보를 를 불러온다.
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<CmmnDetailCode> selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception {
|
||||||
|
return (List<CmmnDetailCode>) list("CmmUseDAO.selectOgrnztIdDetail", vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 공통코드로 사용할그룹정보를 를 불러온다.
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<CmmnDetailCode> selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception {
|
||||||
|
return (List<CmmnDetailCode>) list("CmmUseDAO.selectGroupIdDetail", vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 개정이력(Modification Information)
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2011. 8. 12. 서준식 최초생성
|
||||||
|
* 2017. 9. 04. 장동한 클래스 이름 변경(EgovTestUserDetailsServiceImpl > EgovUserDetailsService)
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EgoDummyUserDetailsServiceImpl extends EgovAbstractServiceImpl implements
|
||||||
|
EgovUserDetailsService {
|
||||||
|
|
||||||
|
//로그인 객체
|
||||||
|
LoginVO loginVO = new LoginVO();
|
||||||
|
//권한목록 객체
|
||||||
|
List<String> listAuth = new ArrayList<String>();
|
||||||
|
|
||||||
|
@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<String> 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<CmmCodeVO> selectCmmCode(CmmCodeVO cmmCode) throws Exception {
|
||||||
|
return cmmUseDAO.selectCmmCode(cmmCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (문화원) 공통코드를 조회한다.
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CmmCodeVO> selectAditCodeItem(String bbsId) throws Exception {
|
||||||
|
return cmmUseDAO.selectAditCodeItem(bbsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 공통코드를 조회한다.
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<CmmnDetailCode> selectCmmCodeDetail(ComDefaultCodeVO vo) throws Exception {
|
||||||
|
return cmmUseDAO.selectCmmCodeDetail(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ComDefaultCodeVO의 리스트를 받아서 여러개의 코드 리스트를 맵에 담아서 리턴한다.
|
||||||
|
*
|
||||||
|
* @param voList
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public Map<String, List<CmmnDetailCode>> selectCmmCodeDetails(List<?> voList) throws Exception {
|
||||||
|
ComDefaultCodeVO vo;
|
||||||
|
Map<String, List<CmmnDetailCode>> map = new HashMap<String, List<CmmnDetailCode>>();
|
||||||
|
|
||||||
|
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<CmmnDetailCode> selectOgrnztIdDetail(ComDefaultCodeVO vo) throws Exception {
|
||||||
|
return cmmUseDAO.selectOgrnztIdDetail(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 그룹정보를 코드형태로 리턴한다.
|
||||||
|
*
|
||||||
|
* @param 조회조건정보 vo
|
||||||
|
* @return 그룹정보 List
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<CmmnDetailCode> selectGroupIdDetail(ComDefaultCodeVO vo) throws Exception {
|
||||||
|
return cmmUseDAO.selectGroupIdDetail(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2011. 9. 23. 서준식 최초 생성
|
||||||
|
* 2016. 5. 11. 장동한 myBatis 방식 적용
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
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> 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> 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 <K, V> Map<K, V> 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 <K, V> Map<K, V> 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 <K, V> Map<K, V> 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 <E> List<E> 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 <E> List<E> 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 <E> List<E> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<AttachmentVO> 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<AttachmentVO> 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<FileVO> 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<String, Object> selectFileListByFileNm(FileVO fvo) throws Exception {
|
||||||
|
List<FileVO> result = fileMngDAO.selectFileListByFileNm(fvo);
|
||||||
|
int cnt = fileMngDAO.selectFileListCntByFileNm(fvo);
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
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<FileVO> selectImageFileList(FileVO vo) throws Exception {
|
||||||
|
return fileMngDAO.selectImageFileList(vo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 개정이력(Modification Information)
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2011. 8. 12. 서준식 최초생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EgovUserDetailsSessionServiceImpl extends EgovAbstractServiceImpl implements EgovUserDetailsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 인증된 사용자객체를 VO형식으로 가져온다.
|
||||||
|
* @return Object - 사용자 ValueObject
|
||||||
|
*/
|
||||||
|
public Object getAuthenticatedUser() {
|
||||||
|
if (EgovUserDetailsHelper.isAuthenticated()) {
|
||||||
|
return EgovUserDetailsHelper.getAuthenticatedUser();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getAuthorities() {
|
||||||
|
// 권한 설정을 리턴한다.
|
||||||
|
return EgovUserDetailsHelper.getAuthorities();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean isAuthenticated() {
|
||||||
|
// 인증된 유저인지 확인한다.
|
||||||
|
return EgovUserDetailsHelper.isAuthenticated();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<AttachmentVO> selectFileListByCntntsId(AttachmentVO attachmentVO) throws Exception {
|
||||||
|
return selectList("FileManageDAO.selectFileListByCntntsId", attachmentVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AttachmentVO> 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<AttachmentVO> 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<FileVO> selectFileInfs(FileVO vo) throws Exception {
|
||||||
|
return (List<FileVO>) 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<FileVO> selectFileListByFileNm(FileVO fvo) throws Exception {
|
||||||
|
return (List<FileVO>) 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<FileVO> selectImageFileList(FileVO vo) throws Exception {
|
||||||
|
return (List<FileVO>) list("FileManageDAO.selectImageFileList", vo);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2014.08.07 표준프레임워크센터 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
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<String, String> map = null;
|
||||||
|
|
||||||
|
if (session.getAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY) == null) {
|
||||||
|
map = new HashMap<String, String>();
|
||||||
|
|
||||||
|
session.setAttribute(EgovDoubleSubmitHelper.SESSION_TOKEN_KEY, map);
|
||||||
|
} else {
|
||||||
|
map = (Map<String, String>) 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("<input type='hidden' name='").append(EgovDoubleSubmitHelper.PARAMETER_NAME).append("' value='").append(map.get(tokenKey)).append("'/>");
|
||||||
|
|
||||||
|
try {
|
||||||
|
pageContext.getOut().print(buffer.toString());
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new JspTagException("Error: IOException while writing to the user");
|
||||||
|
}
|
||||||
|
|
||||||
|
return SKIP_BODY;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2014.09.18 표준프레임워크센터 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2014.08.07 표준프레임워크센터 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
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<String, String> map = (Map<String, String>) 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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 <pre>
|
||||||
|
* web.xml 상에 다음과 같은 Listener 등록 필요
|
||||||
|
* <listener>
|
||||||
|
* <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
|
||||||
|
* </listener>
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
135
src/main/java/egovframework/com/cmm/util/EgovMybaitsUtil.java
Normal file
135
src/main/java/egovframework/com/cmm/util/EgovMybaitsUtil.java
Normal file
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2016.06.07 장동한 최초 생성
|
||||||
|
* 2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
|
||||||
|
* 2017.07.21 장동한 isEquals에서 String Character 비교 가능하도록
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2014.09.18 표준프레임워크센터 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
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!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2009.03.10 sjyoon 최초 생성
|
||||||
|
* 2011.07.01 서준식 interface 생성후 상세 로직의 분리
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
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<String> getAuthorities() {
|
||||||
|
return egovUserDetailsService.getAuthorities();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 인증된 사용자 여부를 체크한다.
|
||||||
|
* @return Boolean - 인증된 사용자 여부(TRUE / FALSE)
|
||||||
|
*/
|
||||||
|
public static Boolean isAuthenticated() {
|
||||||
|
return egovUserDetailsService.isAuthenticated();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<String> baseNames = new ArrayList<String>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
89
src/main/java/egovframework/com/cmm/util/EgovXssChecker.java
Normal file
89
src/main/java/egovframework/com/cmm/util/EgovXssChecker.java
Normal file
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- ------------- ----------------------
|
||||||
|
* 2016.10.17 장동한 최초 생성
|
||||||
|
* 2017.03.03 조성원 시큐어코딩(ES)-오류 메시지를 통한 정보노출[CWE-209]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
27
src/main/java/egovframework/com/cmm/util/URLEncodeUtil.java
Normal file
27
src/main/java/egovframework/com/cmm/util/URLEncodeUtil.java
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,213 @@
|
|||||||
|
package egovframework.com.cmm.web;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 컴포넌트 설치 후 설치된 컴포넌트들을 IncludedInfo annotation을 통해 찾아낸 후
|
||||||
|
* 화면에 표시할 정보를 처리하는 Controller 클래스
|
||||||
|
* <Notice>
|
||||||
|
* 개발시 메뉴 구조가 잡히기 전에 배포파일들에 포함된 공통 컴포넌트들의 목록성 화면에
|
||||||
|
* URL을 제공하여 개발자가 편하게 활용하도록 하기 위해 작성된 것으로,
|
||||||
|
* 실제 운영되는 시스템에서는 적용해서는 안 됨
|
||||||
|
* 실 운영 시에는 삭제해서 배포해도 좋음
|
||||||
|
* <Disclaimer>
|
||||||
|
* 운영시에 본 컨트롤을 사용하여 메뉴를 구성하는 경우 성능 문제를 일으키거나
|
||||||
|
* 사용자별 메뉴 구성에 오류를 발생할 수 있음
|
||||||
|
* @author 공통컴포넌트 정진오
|
||||||
|
* @since 2011.08.26
|
||||||
|
* @version 2.0.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ---------- -------- ---------------------------
|
||||||
|
* 2011.08.26 정진오 최초 생성
|
||||||
|
* 2011.09.16 서준식 컨텐츠 페이지 생성
|
||||||
|
* 2011.09.26 이기하 header, footer 페이지 생성
|
||||||
|
* 2019.12.04 신용호 KISA 보안코드 점검 : Map<Integer, IncludedCompInfoVO> map를 지역변수로 수정
|
||||||
|
* 2020.07.08 신용호 비밀번호를 수정한후 경과한 날짜 조회
|
||||||
|
* 2020.08.28 정진호 표준프레임워크 v3.10 개선
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
|
||||||
|
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<Integer, IncludedCompInfoVO> map = new TreeMap<Integer, IncludedCompInfoVO>();
|
||||||
|
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<String, Object> 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";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<String> 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";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(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.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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<String, Object> 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<String, String> 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, "파일을 찾을 수 없습니다.");
|
||||||
|
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.3.25 이삼섭 최초 생성
|
||||||
|
* 2016.10.13 장동한 deleteFileInf 메소드 return 방식 수정
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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<String, Object> 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<AttachmentVO> 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<String, Object> 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<AttachmentVO> 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<AttachmentVO> 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<String, Object> commandMap, ModelMap model) throws Exception {
|
||||||
|
String atchFileId = (String)commandMap.get("param_atchFileId");
|
||||||
|
|
||||||
|
fileVO.setAtchFileId(atchFileId);
|
||||||
|
List<FileVO> 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<String, Object> commandMap,
|
||||||
|
//SessionVO sessionVO,
|
||||||
|
ModelMap model) throws Exception {
|
||||||
|
|
||||||
|
String atchFileId = (String)commandMap.get("param_atchFileId");
|
||||||
|
|
||||||
|
fileVO.setAtchFileId(atchFileId);
|
||||||
|
|
||||||
|
List<FileVO> 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<String, Object> commandMap,
|
||||||
|
//SessionVO sessionVO,
|
||||||
|
ModelMap model) throws Exception {
|
||||||
|
|
||||||
|
String atchFileId = (String)commandMap.get("atchFileId");
|
||||||
|
|
||||||
|
fileVO.setAtchFileId(atchFileId);
|
||||||
|
List<FileVO> result = fileService.selectImageFileList(fileVO);
|
||||||
|
|
||||||
|
model.addAttribute("fileList", result);
|
||||||
|
|
||||||
|
return "egovframework/com/cmm/fms/EgovImgFileList";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<String, Object> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ---------- -------- ---------------------------
|
||||||
|
* 2009.03.25 이삼섭 최초 생성
|
||||||
|
* 2011.06.11 서준식 스프링 3.0 업그레이드 API변경으로인한 수정
|
||||||
|
* 2020.10.27 신용호 예외처리 수정
|
||||||
|
* 2020.10.29 신용호 허용되지 않는 확장자 업로드 제한 (globals.properties > Globals.fileUpload.Extensions)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
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<FileItem> fileItems, String encoding) {
|
||||||
|
|
||||||
|
// 스프링 3.0변경으로 수정한 부분
|
||||||
|
MultiValueMap<String, MultipartFile> multipartFiles = new LinkedMultiValueMap<String, MultipartFile>();
|
||||||
|
Map<String, String[]> multipartParameters = new HashMap<String, String[]>();
|
||||||
|
String whiteListFileUploadExtensions = EgovProperties.getProperty("Globals.fileUpload.Extensions");
|
||||||
|
Map<String, String> mpParamContentTypes = new HashMap<String, String>();
|
||||||
|
|
||||||
|
// Extract multipart files and multipart parameters.
|
||||||
|
for (Iterator<FileItem> 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 처리
|
||||||
|
}
|
||||||
|
}
|
||||||
341
src/main/java/egovframework/com/cop/bbs/service/Blog.java
Normal file
341
src/main/java/egovframework/com/cop/bbs/service/Blog.java
Normal file
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ----------- -------- ---------------------------
|
||||||
|
* 2017.09.12 양희훈 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
362
src/main/java/egovframework/com/cop/bbs/service/BlogUser.java
Normal file
362
src/main/java/egovframework/com/cop/bbs/service/BlogUser.java
Normal file
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ----------- -------- ---------------------------
|
||||||
|
* 2017.09.12 양희훈 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
319
src/main/java/egovframework/com/cop/bbs/service/BlogUserVO.java
Normal file
319
src/main/java/egovframework/com/cop/bbs/service/BlogUserVO.java
Normal file
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ----------- -------- ---------------------------
|
||||||
|
* 2017.09.12 양희훈 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
443
src/main/java/egovframework/com/cop/bbs/service/BlogVO.java
Normal file
443
src/main/java/egovframework/com/cop/bbs/service/BlogVO.java
Normal file
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.4.2 이삼섭 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
573
src/main/java/egovframework/com/cop/bbs/service/Board.java
Normal file
573
src/main/java/egovframework/com/cop/bbs/service/Board.java
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
553
src/main/java/egovframework/com/cop/bbs/service/BoardMaster.java
Normal file
553
src/main/java/egovframework/com/cop/bbs/service/BoardMaster.java
Normal file
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.03.12 이삼섭 최초 생성
|
||||||
|
* 2009.06.26 한성곤 2단계 기능 추가 (댓글관리, 만족도조사)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.3.12 이삼섭 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
675
src/main/java/egovframework/com/cop/bbs/service/BoardVO.java
Normal file
675
src/main/java/egovframework/com/cop/bbs/service/BoardVO.java
Normal file
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.3.19 이삼섭 최초 생성
|
||||||
|
* 2009.06.29 한성곤 2단계 기능 추가 (댓글관리, 만족도조사)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<String, Object> selectArticleList(BoardVO boardVO);
|
||||||
|
|
||||||
|
BoardVO selectArticleDetail(BoardVO boardVO);
|
||||||
|
|
||||||
|
void insertArticle(Board board) throws FdlException;
|
||||||
|
|
||||||
|
void updateArticle(Board board);
|
||||||
|
|
||||||
|
void deleteArticle(Board board) throws Exception;
|
||||||
|
|
||||||
|
List<BoardVO> selectNoticeArticleList(BoardVO boardVO);
|
||||||
|
|
||||||
|
Map<String, Object> selectGuestArticleList(BoardVO vo);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 블로그 관련
|
||||||
|
*/
|
||||||
|
BoardVO selectArticleCnOne(BoardVO boardVO);
|
||||||
|
|
||||||
|
List<BoardVO> selectBlogNmList(BoardVO boardVO);
|
||||||
|
|
||||||
|
Map<String, Object> selectBlogListManager(BoardVO boardVO);
|
||||||
|
|
||||||
|
List<BoardVO> selectArticleDetailDefault(BoardVO boardVO);
|
||||||
|
|
||||||
|
int selectArticleDetailDefaultCnt(BoardVO boardVO);
|
||||||
|
|
||||||
|
List<BoardVO> selectArticleDetailCn(BoardVO boardVO);
|
||||||
|
|
||||||
|
int selectLoginUser(BoardVO boardVO);
|
||||||
|
}
|
||||||
@ -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<String, Object> selectNotUsedBdMstrList(BoardMasterVO boardMasterVO);
|
||||||
|
|
||||||
|
void deleteBBSMasterInf(BoardMaster boardMaster);
|
||||||
|
|
||||||
|
void updateBBSMasterInf(BoardMaster boardMaster) throws Exception;
|
||||||
|
|
||||||
|
BoardMasterVO selectBBSMasterInf(BoardMasterVO boardMasterVO) throws Exception;
|
||||||
|
|
||||||
|
Map<String, Object> selectBBSMasterInfs(BoardMasterVO boardMasterVO);
|
||||||
|
|
||||||
|
void insertBBSMasterInf(BoardMaster boardMaster) throws Exception;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 블로그 관련
|
||||||
|
*/
|
||||||
|
Map<String, Object> 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<BlogVO> selectBlogListPortlet(BlogVO blogVO) throws Exception;
|
||||||
|
|
||||||
|
List<BoardMasterVO> selectBBSListPortlet(BoardMasterVO boardMasterVO) throws Exception;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package egovframework.com.cop.bbs.service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 만족도조사를 위한 서비스 인터페이스 클래스
|
||||||
|
* @author 공통컴포넌트개발팀 한성곤
|
||||||
|
* @since 2009.06.29
|
||||||
|
* @version 1.0
|
||||||
|
* @see
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.06.29 한성곤 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public interface EgovBBSSatisfactionService {
|
||||||
|
/**
|
||||||
|
* 만족도조사 사용 가능 여부를 확인한다.
|
||||||
|
*
|
||||||
|
* @param bbsId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public boolean canUseSatisfaction(String bbsId) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 만족도조사에 대한 목록을 조회 한다.
|
||||||
|
*
|
||||||
|
* @param satisfactionVO
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public Map<String, Object> 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;
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.06.29 한성곤 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.06.29 한성곤 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* << 개정이력(Modification Information) >>
|
||||||
|
*
|
||||||
|
* 수정일 수정자 수정내용
|
||||||
|
* ------- -------- ---------------------------
|
||||||
|
* 2009.06.26 한성곤 최초 생성
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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<BoardVO> selectNoticeArticleList(BoardVO boardVO) {
|
||||||
|
return (List<BoardVO>) 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<BoardVO> selectBlogNmList(BoardVO boardVO) {
|
||||||
|
return (List<BoardVO>) 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<BoardVO> selectArticleDetailDefault(BoardVO boardVO) {
|
||||||
|
return (List<BoardVO>) list("BBSArticle.selectArticleDetailDefault", boardVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int selectArticleDetailDefaultCnt(BoardVO boardVO) {
|
||||||
|
return (Integer)selectOne("BBSArticle.selectArticleDetailDefaultCnt", boardVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<BoardVO> selectArticleDetailCn(BoardVO boardVO) {
|
||||||
|
return (List<BoardVO>) list("BBSArticle.selectArticleDetailCn", boardVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int selectLoginUser(BoardVO boardVO) {
|
||||||
|
return (Integer)selectOne("BBSArticle.selectLoginUser", boardVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -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<String, Object> selectArticleList(BoardVO boardVO) {
|
||||||
|
List<?> list = egovArticleDao.selectArticleList(boardVO);
|
||||||
|
|
||||||
|
|
||||||
|
int cnt = egovArticleDao.selectArticleListCnt(boardVO);
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
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<BoardVO> selectArticleDetailDefault(BoardVO boardVO) {
|
||||||
|
return egovArticleDao.selectArticleDetailDefault(boardVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int selectArticleDetailDefaultCnt(BoardVO boardVO){
|
||||||
|
return egovArticleDao.selectArticleDetailDefaultCnt(boardVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BoardVO> 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<BoardVO> selectNoticeArticleList(BoardVO boardVO) {
|
||||||
|
return egovArticleDao.selectNoticeArticleList(boardVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BoardVO> selectBlogNmList(BoardVO boardVO) {
|
||||||
|
return egovArticleDao.selectBlogNmList(boardVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> selectGuestArticleList(BoardVO vo) {
|
||||||
|
List<?> list = egovArticleDao.selectGuestArticleList(vo);
|
||||||
|
|
||||||
|
|
||||||
|
int cnt = egovArticleDao.selectGuestArticleListCnt(vo);
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
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<String, Object> selectBlogListManager(BoardVO vo) {
|
||||||
|
List<?> result = egovArticleDao.selectBlogListManager(vo);
|
||||||
|
int cnt = egovArticleDao.selectBlogListManagerCnt(vo);
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
map.put("resultList", result);
|
||||||
|
map.put("resultCnt", Integer.toString(cnt));
|
||||||
|
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user