2014-03-06 60 views
1

我有一個Alfresco 4.2文檔/Sites/swsdp/documentLibrary/Presentations/test1.txt與編號workspace://SpacesStore/626216a1-5f9e-4010-a424-e2e0ec4f2663;1.0DotCMIS IDocument沒有給出文件路徑

這是我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 
} 

爲什麼paths空列表?
爲什麼不包含/Sites/swsdp/documentLibrary/Presentations/test1.txt

我知道這是不完全一樣,但OpenCMIS文件說,本作同樣的方法:

返回此對象或空列表的路徑列表,如果該對象是未歸檔,或者如果該對象是根文件夾

回答

0

這不是一個答案,但我不能添加評論,因爲我的代表太低。

它適用於我。我使用露天4.2系統

順便說一句,你的代碼應該是

String filename = document.ContentStreamFileName; //camel case 
IList<String> paths = document.Paths; //IList vs List 
1

的問題是,我用的是露天的舊CMIS URL得到了一個文件的路徑。

它是通過使用新的URL格式解決:

http://<host>/alfresco/api/-default-/public/cmis/versions/1.0/atom 
相關問題