| 限定符和类型 | 方法和说明 |
|---|---|
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)
设定访问账号和密码,必须与仓库实际一致。
|
boolean |
supportFullTextSearch() |
public void setLoginAccount(String user, String password)
setLoginAccount 在接口中 FileStoreuser - 用户名password - 密码public String putFile(File file, String StoreFileName, String relativePath) throws FileStoreException
需要注意的时不能往一个节点位置放置太多(几万以上)平行文件,而应该用文件夹分开存放,否则影响性能。
putFile 在接口中 FileStorefile - 文件对象StoreFileName - 存储库中使用的文件名。如果为null或空,则使用file参数所含的文件名。relativePath - 存储相对路径。如放在根目录为"",要放在"根目录/a/b/c"目录下则参数为"a/b/c",以此类推。目录如果不存在,会自动创建。FileStoreExceptionpublic FileInfo getFile(String uuid) throws FileStoreException
getFile 在接口中 FileStoreuuid - 文件uuidFileStoreExceptionpublic long getFileSize(String uuid) throws FileStoreException
getFileSize 在接口中 FileStoreuuid - 文件uuidFileStoreExceptionpublic boolean exist(String uuid) throws FileStoreException
exist 在接口中 FileStoreuuid - 文件uuidFileStoreExceptionpublic boolean deleteFile(String uuid) throws FileStoreException
deleteFile 在接口中 FileStoreuuid - FileStoreExceptionpublic List<String> searchFullText(String keyword) throws FileStoreException
searchFullText 在接口中 FileStorekeyword - 需要检索的关键字FileStoreExceptionExceptionpublic Map<String,String> searchFullTextWithExcerpt(String keyword) throws FileStoreException
searchFullTextWithExcerpt 在接口中 FileStorekeyword - 需要检索的关键字FileStoreExceptionpublic boolean supportFullTextSearch()
supportFullTextSearch 在接口中 FileStoreCopyright © 2017. All rights reserved.