【发布时间】:2017-11-09 14:21:21
【问题描述】:
我正在尝试使用 CMIS 1.1 以编程方式将辅助属性(标题、描述)添加到 Alfresco 中的文档。
代码sn-p:
properties.put(PropertyIds.NAME, fileName);
properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document,P:cm:titled");
properties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, "P:cm:titled");
properties.put("cm:title", "test title");
properties.put("cm:description", "description of document");
代码成功将文档上传到 Alfresco 站点,没有任何问题,但在 Alfresco UI 中标题和描述为空。
我也尝试将标签设置为文档。露天网站中的标签也是空的。
代码sn-p
document = parentFolder.createDocument(properties, contentStream, null);
AlfrescoDocument alfDoc = (AlfrescoDocument) document;
Map<String, Object> properties1 = new HashMap<String, Object>();
List<String> tags = new ArrayList<String>();
tags.add("cmisTag");
tags.add("testTag");
properties1.put("cm:taggable",tags);
alfDoc.updateProperties(properties1);
【问题讨论】: