|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.repository.LocalFileRepository
public class LocalFileRepository
Local file system 기반의 레파지토리 기능을 제공하는 클래스이다. 이 기능을 사용하기 위하여 우선 local file 시스템 설정 정의를 위한 프로퍼티 파일을 작성해야하며, 이 파일 명을 live config 파일에 "live.localfile.config"를 Key로하여 지정해야한다. 설정 정의파일은 다음과 같은 구조이다.
# temp 파일 저장용 temp.dir.repository=/himed/file/temp temp.dir.local=D:\\temp # 첨부파일 저장용 attach.dir.repository=/himed/file/attach attach.dir.local=D:\\temp
| Field Summary | |
|---|---|
protected String |
LOCAL_FILE_CONFIG_FILE_KEY
LocalFileSystem 설정 파일을 가져오기 위한 Key. live-config.properties에 정의되어 있다. |
| Constructor Summary | |
|---|---|
LocalFileRepository(String key)
|
|
| Method Summary | |
|---|---|
boolean[] |
deleteFile(String[] filePath)
레파지토리에서 파일을 삭제한다. |
boolean[] |
deleteFile(ValueObject fileVO,
String pathKey)
레파지토리에서 파일을 삭제한다. |
void |
getFile(ValueObject fileVO,
String fileDataKey,
String getPathKey)
레파지토리에서 파일을 가져온다. |
protected String |
getPath(String rawPath)
|
void |
storeFile(String localPath,
String remotePath)
저장할 로컬 파일을 경로를 지정하여 해당 파일을 레파지토리에 저장한다. |
void |
storeFile(ValueObject fileVO,
String fileDataKey,
String rootPath,
String getPathKey,
String pathSuffix)
파일데이터가 byte[] 담겨있는 VO를 받아서 레파지토리에 저장한다. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final String LOCAL_FILE_CONFIG_FILE_KEY
| Constructor Detail |
|---|
public LocalFileRepository(String key)
| Method Detail |
|---|
public void storeFile(ValueObject fileVO,
String fileDataKey,
String rootPath,
String getPathKey,
String pathSuffix)
throws LiveException
FileRepository
storeFile in interface FileRepositoryfileVO - 파일데이터가 byte[]로 담겨있는 VOfileDataKey - fileVO에 파일데이터가 담겨있는 컬럼명rootPath - 저장할 때 사용할 root 경로를 지정한다.getPathKey - 저장 후 저장된 경로(자동생성)를 VO에 담아줄 때 사용할 컬럼명.pathSuffix - 저장 경로를 자동생성시 주어진 값을 붙여준다.
LiveException
public void storeFile(String localPath,
String remotePath)
throws LiveException
FileRepository
storeFile in interface FileRepositoryLiveException
public void getFile(ValueObject fileVO,
String fileDataKey,
String getPathKey)
throws LiveException
FileRepository
getFile in interface FileRepositoryLiveException
public boolean[] deleteFile(ValueObject fileVO,
String pathKey)
throws LiveException
FileRepository
deleteFile in interface FileRepositoryLiveException
public boolean[] deleteFile(String[] filePath)
throws LiveException
FileRepository
deleteFile in interface FileRepositoryLiveExceptionprotected String getPath(String rawPath)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||