public class FullContextFileRepositoryImpl extends Object implements FullContextFileRepository
开发人员: renhui
开发时间: 2013-2-22
FILE_REPOSITORY_BEAN_NAME
Constructor and Description |
---|
FullContextFileRepositoryImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addFileObject(String path,
FileObject fileObject)
添加文件
|
void |
addSearchPath(String searchPath)
添加搜索路径
|
Map<String,FileObject> |
getAllFileObjects()
返回全路径搜索缓存的所有文件
|
String |
getFileContentType(String extName)
返回文件的ContentType
|
FileObject |
getFileObject(String path)
获取文件对象
|
FileObject |
getFileObjectDetectLocale(String path)
首先检查是否有匹配的语言,如果没有,则找默认的
|
FileObject |
getRootFileObject(String path)
返回路径所在的跟路径
|
void |
removeFileObject(String path)
删除文件
|
void |
setExcludeContextFileFinder(ExcludeContextFileFinder excludeContextFileFinder) |
void |
setFileTypeMap(Map<String,String> fileTypeMap)
返回文件类型Map
|
public void setExcludeContextFileFinder(ExcludeContextFileFinder excludeContextFileFinder)
public void addSearchPath(String searchPath)
FullContextFileRepository
addSearchPath
in interface FullContextFileRepository
searchPath
- 搜索路径public void addFileObject(String path, FileObject fileObject)
FullContextFileRepository
addFileObject
in interface FullContextFileRepository
path
- 文件相对路径fileObject
- 文件对象public FileObject getFileObject(String path)
FullContextFileRepository
getFileObject
in interface FullContextFileRepository
path
- 文件相对路径public void removeFileObject(String path)
FullContextFileRepository
removeFileObject
in interface FullContextFileRepository
public void setFileTypeMap(Map<String,String> fileTypeMap)
FullContextFileRepository
setFileTypeMap
in interface FullContextFileRepository
fileTypeMap
- Key为扩展名,value为content typepublic String getFileContentType(String extName)
FullContextFileRepository
getFileContentType
in interface FullContextFileRepository
public FileObject getRootFileObject(String path)
FullContextFileRepository
getRootFileObject
in interface FullContextFileRepository
public FileObject getFileObjectDetectLocale(String path)
FullContextFileRepository
getFileObjectDetectLocale
in interface FullContextFileRepository
path
- 文件相对路径public Map<String,FileObject> getAllFileObjects()
FullContextFileRepository
getAllFileObjects
in interface FullContextFileRepository
Copyright © 2006–2018 TinyGroup. All rights reserved.