我有一個存儲庫,並且通過露天網站,我可以在存儲庫中創建文件夾時設置名稱,標題和說明。但是,如果我嘗試通過opencmis java創建相同的錯誤,則會出現錯誤「Property'cmis:title'對此類型或其中一種輔助類型無效!」如何在社區Alfresco中設置標題和描述?
這裏是我的代碼:
Map<String, String> newFolderProps = new HashMap<String, String>();
newFolderProps.put(PropertyIds.NAME, "this is my new folder");
newFolderProps.put("cmis:description", "this is my description"); //this doesn't work.
newFolderProps.put("cmis:title", "this is my title"); //this doesn't work.
//I also tried this too:
newFolderProps.put(PropertyIds.DESCRIPTION, "this is my description"); //this doesn't work either.
newFolderProps.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder"); //this works!
Folder newFolderObject=rootfolder.createFolder(newFolderProps);
我也試過 「CM:說明」,但也不起作用。
如何在Alfresco中創建新文件夾時設置標題和說明?
此代碼基於GettingStarted.java示例代碼,位於http://chemistry.apache.org/java/developing/guide.html#getting-started-with-opencmis – user2624246