我有一个存储库,并且通过露天网站,我可以在存储库中创建文件夹时设置名称,标题和说明。但是,如果我尝试通过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