| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
deleteFile(String uuid)
删除指定uuid的文件
|
boolean |
exist(String uuid)
判断文件是否存在
|
FileInfo |
getFile(String uuid)
从内容仓库获取文件。
|
long |
getFileSize(String uuid)
获取文件大小
|
String |
putFile(File file,
String StoreFileName,
String relativePath)
向内容仓库存储一个文件。
|
List<String> |
searchFullText(String keyword)
全文检索 检索出所有匹配关键字的uuid
|
Map<String,String> |
searchFullTextWithExcerpt(String keyword)
全文检索并显示摘要。
|
void |
setLoginAccount(String user,
String password)
SimpleFileStore不支持此方法,调用无效。
|
boolean |
supportFullTextSearch() |
public boolean supportFullTextSearch()
supportFullTextSearch 在接口中 FileStorepublic void setLoginAccount(String user, String password)
setLoginAccount 在接口中 FileStoreuser - 用户名password - 密码public String putFile(File file, String StoreFileName, String relativePath) throws FileStoreException
FileStore需要注意的时不能往一个节点位置放置太多(几万以上)平行文件,而应该用文件夹分开存放,否则影响性能。
putFile 在接口中 FileStorefile - 文件对象StoreFileName - 存储库中使用的文件名。如果为null或空,则使用file参数所含的文件名。relativePath - 存储相对路径。如放在根目录为"",要放在"根目录/a/b/c"目录下则参数为"a/b/c",
以此类推。目录如果不存在,会自动创建。有的存储实现例如SimpleFileStore会忽略该参数。FileStoreExceptionpublic FileInfo getFile(String uuid) throws FileStoreException
FileStoregetFile 在接口中 FileStoreuuid - 文件uuidFileStoreExceptionpublic long getFileSize(String uuid) throws FileStoreException
FileStoregetFileSize 在接口中 FileStoreuuid - 文件uuidFileStoreExceptionpublic boolean exist(String uuid) throws FileStoreException
FileStoreexist 在接口中 FileStoreuuid - 文件uuidFileStoreExceptionpublic boolean deleteFile(String uuid) throws FileStoreException
FileStoredeleteFile 在接口中 FileStoreFileStoreExceptionpublic List<String> searchFullText(String keyword) throws FileStoreException
FileStoresearchFullText 在接口中 FileStorekeyword - 需要检索的关键字FileStoreExceptionpublic Map<String,String> searchFullTextWithExcerpt(String keyword) throws FileStoreException
FileStoresearchFullTextWithExcerpt 在接口中 FileStorekeyword - 需要检索的关键字FileStoreExceptionCopyright © 2017. All rights reserved.