AnsweredAssumed Answered

Alfresco skips contentstream extensions?

Question asked by nick.l on Apr 2, 2013
hi there,

By using OpenCMIS API, I want to create contentstream with extensions in Alfresco4.2 community. Code as below. But when I trace the code, it looks like Alfresco doesn't save this extensions.

        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put(PropertyIds.OBJECT_TYPE_ID, CMISConstants.CMIS_DOCUMENT);
        properties.put(PropertyIds.NAME, filename);
        List<CmisExtensionElement> extensions = new ArrayList();
        String namespace = "";
        String name = "ext";
        Map<String, String> attributes = new HashMap();
        attributes.put("description", "this is description");
        String value = "a extension value";
        CmisExtensionElementImpl extensionElement = new CmisExtensionElementImpl(namespace, name, attributes, value);
        Document document = folder.createDocument(properties, contentStream, VersioningState.MAJOR);

Do I must use aspect to save custom properties by importing Alfresco OpenCMIS extension?