向社区问好!我正在使用 alfresco Community Edition 6.0.0 和Apache Chemistry API
. 到目前为止,我已经成功地通过它(文件夹和文档文件)从 alfresco 存储库创建/获取内容。
现在我想做的是使用 Apache Chemistry API创建一个露天网站(就像我alfresco/api/-default-/public/alfresco/versions/1/sites
在露天 REST API 中使用 POST 方法一样)。
这可行吗??按照我已经在存储库中创建文件夹的方式,我所做的是:
Folder folder = retrieveSitesFolder(); // this returns the folder object using the node id of the "Sites" node
Map<String, Object> props = new HashMap<String, Object>();
props.put(PropertyIds.OBJECT_TYPE_ID, "F:st:site"); //this is recognized fine
props.put("st:siteVisibility", "PUBLIC");
props.put("st:sitePreset", "something");
props.put("cmis:name", "something");
Folder subFolder = folder.createFolder(props);
我正在关注关于我添加的属性的站点模型 https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V4.2a/root/projects/repository/config/alfresco/model /siteModel.xml
不幸的是,当我运行这段代码时,我收到以下错误:
Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: 10290059 Site something does not exist.
在我看来这很奇怪,因为我希望我的代码做的是创建该站点而不是无论如何搜索它。
更奇怪的是,当我通过 REST API 创建了一个名为“something”的站点并重新运行代码时,代码运行成功,但我没有alfresco/api/-default-/public/alfresco/versions/1/sites
在 REST API 的端点中获得任何额外的站点。
任何人都可以对此有所了解吗?任何帮助将不胜感激!