chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Carlos Campanero (Created) (JIRA)" <>
Subject [jira] [Created] (CMIS-523) Inconsistency when updating properties
Date Tue, 17 Apr 2012 15:36:19 GMT
Inconsistency when updating properties

                 Key: CMIS-523
             Project: Chemistry
          Issue Type: Bug
          Components: opencmis-server-jcr
    Affects Versions: OpenCMIS 0.6.0
            Reporter: Jose Carlos Campanero

Is it possible that errors arise when updating the properties of documents or folders?

For instance, DefaultDocumentTypeHandler makes use of the content node to set the property
values ​​from the type definition at node's creation:
    public JcrNode createDocument(JcrFolder parentFolder, String name, Properties properties,
ContentStream contentStream, VersioningState versioningState) {
        try {
            Node fileNode = parentFolder.getNode().addNode(name, NodeType.NT_FILE);
            if (versioningState != VersioningState.NONE) {

            Node contentNode = fileNode.addNode(Node.JCR_CONTENT, NodeType.NT_RESOURCE);

            // compile the properties
            JcrFolder.setProperties(contentNode, getTypeDefinition(), properties);
In contrast, when the document properties are updated by the method updateProperties in JcrNode
is updated 'node', not the context node:
            // Are there properties to update?
            PropertyUpdater propertyUpdater = PropertyUpdater.create(typeManager, getTypeId(),

            JcrVersionBase jcrVersion = isVersionable()
                    ? asVersion()
                    : null;

            // Update properties. Checkout if required
            boolean autoCheckout = false;
            if (!propertyUpdater.isEmpty()) {
                autoCheckout = jcrVersion != null && !jcrVersion.isCheckedOut();
                if (autoCheckout) {

                // update the properties
Thus, when defining types derived from the base types with specific properties this causes
errors since it indicates that the properties that must be updated are not defined in the

Maybe it is necessary to override this functionality in the derived types?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message