Package com.easydesk.util
Class RepositoryHelper
java.lang.Object
com.easydesk.util.RepositoryHelper
Deprecated.
please use RepositoryService instead
EasyDesk System 에서 파일들의 저장/반출에 관한 helper class
- Version:
- $Id: RepositoryHelper.java,v 1.32 2008/04/26 05:36:05 youngho Exp $
- Author:
- Youngho Cho
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PatternDeprecated.DOCUMENT ME!static final StringDeprecated.DOCUMENT ME!static final StringDeprecated.DOCUMENT ME!static final PatternDeprecated.동일 이름이 존재할 경우 처리 Pattern *static FileFilterDeprecated.DOCUMENT ME!static final PatternDeprecated.resouce file pattern 1 : ModuleCode info 2 : resource holder type 3 : namestatic final PatternDeprecated.경로에서 Module code 부분을 찾는 patternstatic final StringDeprecated.ModuleOption 들의 json file 저장소 Keystatic final String[]Deprecated.DOCUMENT ME!static final StringDeprecated.Item 등록시 임시 저장소static final PatternDeprecated.ABC-1234 for template path or ABC1234 for resource path -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringgetAttachmentIdFromPath(String pathname) Deprecated.DOCUMENT ME!static FilegetDedupeCheckFile(String filename) Deprecated.Repository 에 동일한 이름의 File 이 존재하면 파일이름에 (count) 를 추가한다.static final FileDeprecated.문서의 Root Directory (FileSystem)static final FileDeprecated.DOCUMENT ME!static final org.apache.commons.io.filefilter.IOFileFilterDeprecated.DOCUMENT ME!static final StringgetItemRepoPath(Item item, Object obj, String filename) Deprecated.Item 에 속한 파일 경로를 구한다.static StringgetOptionRelativePath(Module module, String name) Deprecated.ModuleOption 의 json getRelativePath 를 구한다.static FilegetOptionRepository(Module module, String name) Deprecated.ModuleOption 의 json Repository File 를 구한다.static StringgetRelativePath(Artifactizable artifactizable, String name) Deprecated.Artifactizable 의 resource 상대 경로를 구한다.static StringgetRelativePath(Attachment attachment) Deprecated.Attachment getRelativePath 를 구한다.static StringgetRelativePath(AttributeValue value) Deprecated.AttributeValue getRelativePath 를 구한다.static final StringgetRelativePath(Item item, Object obj, String filename) Deprecated.저장하고자 하는 파일의 Repository 상대 경로를 구한다.static StringDeprecated.ModuleOption 의 json getRelativePath 를 구한다.static StringgetRelativePath(Module module, String name) Deprecated.Module Contents 의 getRelativePath 를 구한다. ( EASYDESK-2805 )static StringgetRelativePath(Optionable optionable) Deprecated.Optionable 의 json getRelativePath 를 구한다.static final StringgetRelativePath(File file) Deprecated.DOCUMENT ME!static FilegetRepository(Attachment attachment) Deprecated.please use repository.getRepository(attachment.getFileName()) insteadstatic FilegetRepository(AttributeValue value) Deprecated.AttributeValue 의 Repository File 를 구한다.static final FilegetRepository(Item item, Object obj, String filename) Deprecated.Repository 를구한다.static FileDeprecated.ModuleAttribute 의 json Repository File 를 구한다.static FilegetRepository(Module module, String name) Deprecated.Module Contents 의 Repository 를 구한다. ( EASYDESK-2805 )static FilegetRepository(Optionable optionable) Deprecated.Optionable 의 json Repository File 를 구한다.static final StringDeprecated.Get the repository path info as given in the configuration. if the path begins with a '/', it is assumed to be absolute.static FilegetResource(Artifactizable artifactizable, String name) Deprecated.Artifactizable 의 resource 파일을 구한다.static final FilegetTempDirectory(Module module) Deprecated.Module 의 임시 파일 저장소 item 등록시 임시 File 의 저장소이다static final booleanhasTemplatePath(String pathname) Deprecated.주어진 pathname 에 item uniqueId pattern 이 존재하는지 확인한다.
-
Field Details
-
ATTRIBUTE_PREFIX
Deprecated.DOCUMENT ME!- See Also:
-
ATTACHMENT_PREFIX
Deprecated.DOCUMENT ME!- See Also:
-
TEMP_FOLDER
Deprecated.Item 등록시 임시 저장소- See Also:
-
MODULE_OPTION_FOLDER
Deprecated.ModuleOption 들의 json file 저장소 Key- See Also:
-
MODULE_CODE_PATH_PATTERN
Deprecated.경로에서 Module code 부분을 찾는 pattern -
TEMPLATE_PATH_PATTERN
Deprecated.ABC-1234 for template path or ABC1234 for resource path -
ATTACHMENT_PATTERN
Deprecated.DOCUMENT ME! -
LOCAL_RESOURCE_PATTERN
Deprecated.resouce file pattern 1 : ModuleCode info 2 : resource holder type 3 : name -
DEDUPE_NAME_PATTERN
Deprecated.동일 이름이 존재할 경우 처리 Pattern * -
supportedType
Deprecated.DOCUMENT ME! -
IMAGE_FILE_FILTER
Deprecated.DOCUMENT ME!
-
-
Constructor Details
-
RepositoryHelper
public RepositoryHelper()Deprecated.새로운RepositoryHelper인스턴스를 생성한다.
-
-
Method Details
-
getDoumentRoot
Deprecated.문서의 Root Directory (FileSystem)- Returns:
- 문서의 Root Directory
-
getImageFileFilter
public static final org.apache.commons.io.filefilter.IOFileFilter getImageFileFilter()Deprecated.DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
hasTemplatePath
Deprecated.주어진 pathname 에 item uniqueId pattern 이 존재하는지 확인한다.- Parameters:
pathname- resource pathname- Returns:
- true/false
-
getAttachmentIdFromPath
Deprecated.DOCUMENT ME!- Parameters:
pathname- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getTempDirectory
Deprecated.Module 의 임시 파일 저장소 item 등록시 임시 File 의 저장소이다- Parameters:
module- 대상 Module- Returns:
- file
-
getRelativePath
Deprecated.DOCUMENT ME!- Parameters:
file- DOCUMENT ME!- Returns:
- DOCUMENT ME!
- Throws:
Exception- DOCUMENT ME!
-
getRepositoryDirectory
Deprecated.Get the repository path info as given in the configuration. if the path begins with a '/', it is assumed to be absolute. Otherwise the path is constructed relative to the webapp directory. Windows note : windows 는 '/Drive: 와 같은 형태로 설정되어야 한다.- Returns:
- repository directory 경로
- See Also:
-
getRelativePath
Deprecated.저장하고자 하는 파일의 Repository 상대 경로를 구한다.- Parameters:
item- 파일이 속한 itemobj- attachment or attributeValuefilename- 파일 이름- Returns:
- Repository 에 대한 상대 경로
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우UnsupportedOperationException- obj 가 User 인 경우
-
getFile
Deprecated.DOCUMENT ME!- Parameters:
pathname- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getRepository
Deprecated.Repository 를구한다.- Parameters:
item- 파일이 속한 itemobj- attachment, attributeValuefilename- 파일 이름- Returns:
- File
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getItemRepoPath
Deprecated.Item 에 속한 파일 경로를 구한다. The path to an attachment file relative to the base file repository. Files are saved according to:moduleCode/(item_IdCount/1000)/itemID/attID/filenamewhere moduleId and attId are primary keys of the related module and this attachment. itemID is the unique id generally used to specify the item within the ui. item_IdCount is the numerical suffix of the unique id. So if the pk of module PACS is 201 and this attachment pk is 123 the path would be: 201/0/PACS_5/123/diff.txt or if the item count were higher: 201/2/PACS_2115/123/diff.txt. The first two directories are used to keep the number of files per directory reasonable while the item unique id and the final textual filename allow someone browsing the file system to be better able to pick out relevant files. 주의 : ItemID 는 PACS-2 의 format 이고 path 에서는 PACS2 의 형태를 취한다.- Parameters:
item- 파일이 속한 itemobj- attachment or attributeValuefilename- 파일 이름- Returns:
- Repository 에 대한 item 파일의 상대 경로
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getDedupeCheckFile
Deprecated.Repository 에 동일한 이름의 File 이 존재하면 파일이름에 (count) 를 추가한다.- Parameters:
filename- 확인할 파일 경로- Returns:
- dedupe free file
- Throws:
IOException- 파일 확인 중 오류가 발생한 경우
-
getOptionRepository
Deprecated.ModuleOption 의 json Repository File 를 구한다.- Parameters:
module- 대상 Modulename- option 이름- Returns:
- json Repository File
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRepository
Deprecated.ModuleAttribute 의 json Repository File 를 구한다.- Parameters:
ma- 대상 ModuleAttribute- Returns:
- json Repository File
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRepository
Deprecated.Module Contents 의 Repository 를 구한다. ( EASYDESK-2805 )- Parameters:
module- 대상 Modulename- contents 이름- Returns:
- Repository File
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRepository
Deprecated.Optionable 의 json Repository File 를 구한다.- Parameters:
optionable- 대상 Optionable- Returns:
- json Repository File
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRepository
Deprecated.please use repository.getRepository(attachment.getFileName()) insteadAttachment 의 Repository File 를 구한다.- Parameters:
attachment- 대상 Attachment- Returns:
- Repository File
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRepository
Deprecated.AttributeValue 의 Repository File 를 구한다.- Parameters:
value- 대상 AttributeValue- Returns:
- Repository File
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRelativePath
Deprecated.Optionable 의 json getRelativePath 를 구한다. EASYDESK-2147 참조- Parameters:
optionable- 대상 Optionable- Returns:
class 이름(소문자)/optionable 이름.json형식의 상대 경로- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRelativePath
Deprecated.Attachment getRelativePath 를 구한다.- Parameters:
attachment- 대상 Attachment- Returns:
- Repository 에 대한 상대 경로
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRelativePath
Deprecated.AttributeValue getRelativePath 를 구한다.- Parameters:
value- 대상 AttributeValue- Returns:
- Repository 에 대한 상대 경로
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getOptionRelativePath
Deprecated.ModuleOption 의 json getRelativePath 를 구한다.- Parameters:
module- 대상 Modulename- option 이름- Returns:
- Repository 에 대한 상대 경로
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRelativePath
Deprecated.ModuleOption 의 json getRelativePath 를 구한다. EASYDESK-2147 참조- Parameters:
ma- 대상 ModuleAttribute- Returns:
- Repository 에 대한 상대 경로
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRelativePath
Deprecated.Module Contents 의 getRelativePath 를 구한다. ( EASYDESK-2805 )- Parameters:
module- 대상 Modulename- contents 이름- Returns:
moduleCode/name형식의 상대 경로- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getResource
Deprecated.Artifactizable 의 resource 파일을 구한다.- Parameters:
artifactizable- 대상 Artifactizable (현재는 Module 만 지원)name- resource 이름- Returns:
- resource 파일
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우
-
getRelativePath
Deprecated.Artifactizable 의 resource 상대 경로를 구한다.- Parameters:
artifactizable- 대상 Artifactizable (현재는 Module 만 지원)name- resource 이름- Returns:
- Repository 에 대한 상대 경로
- Throws:
Exception- 경로를 구하는 중 오류가 발생한 경우UnsupportedOperationException- Module 이 아닌 경우
-