Alfresco DotCMIS IDocument不提供文件路径
我在Alfresco DotCMIS IDocument不提供文件路径,alfresco,cmis,opencmis,dotcmis,Alfresco,Cmis,Opencmis,Dotcmis,我在/Sites/swsdp/documentLibrary/Presentations/test1.txt上有一个Alfresco 4.2文档,id为workspace://SpacesStore/626216a1-5f9e-4010-a424-e2e0ec4f2663;1.0 以下是我的DotCMIS代码,用于处理更改日志更改事件: ICmisObject cmisObject = session.GetObject( "workspace://SpacesStore/626216a
/Sites/swsdp/documentLibrary/Presentations/test1.txt上有一个Alfresco 4.2文档,id为workspace://SpacesStore/626216a1-5f9e-4010-a424-e2e0ec4f2663;1.0
以下是我的DotCMIS代码,用于处理更改日志更改事件:
ICmisObject cmisObject = session.GetObject(
"workspace://SpacesStore/626216a1-5f9e-4010-a424-e2e0ec4f2663;1.0");
if (null != (document = cmisObject as IDocument))
{
String filename = document.ContentStreamFilename; // returns: "test1.txt"
List<String> paths = document.Paths; // returns: Empty list
}
icmisbject-cmisbject=session.GetObject(
"workspace://SpacesStore/626216a1-5f9e-4010-a424-e2e0ec4f2663;1.0");
如果(null!=(文档=cmisObject作为IDocument))
{
String filename=document.ContentStreamFilename;//返回:“test1.txt”
列表路径=document.path;//返回:空列表
}
为什么路径是空列表?
为什么它不包含/Sites/swsdp/documentLibrary/Presentations/test1.txt
我知道这并不完全相同,但OpenCMIS文档中对相同的方法说:
返回此对象的路径列表,如果此对象未归档或此对象是根文件夹,则返回空列表
这不是答案,但我不能添加评论,因为我的代表太低了
它对我有用。我用Alfresco 4.2系统得到了一个文档的路径
顺便说一句,你的代码应该是
String filename = document.ContentStreamFileName; //camel case
IList<String> paths = document.Paths; //IList vs List
String filename=document.ContentStreamFileName//骆驼风格
IList路径=document.path//IList vs List
问题是我使用的是Alfresco的旧CMIS URL
通过使用新的URL格式解决此问题:
http://<host>/alfresco/api/-default-/public/cmis/versions/1.0/atom
http:///alfresco/api/-default-/public/cmis/versions/1.0/atom