Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1696

Remove support for legacy (JSR-170) CND keywords not compliant with JSR-283

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.0.0.Alpha1
    • 3.0.0.Final
    • JCR
    • None

      There are a couple of keywords in CND files which are reminiscent of JSR 170 and Jackrabbit's notation, which don't comply with JSR-283:

      1) MULTIPLE
      The following:

      [inf:withsnschild] 
          + * (inf:childnode1) IGNORE MULTIPLE
      

      is accepted by modeshape and acts as if it were defined as

      [inf:withsnschild] 
          + * (inf:childnode1) IGNORE SNS
      

      This should not be supported and ModeShape should raise an explicit exception. The eclipse cnd editor plugin correctly doesn't support the MULTIPLE attribute on child node definitions, only on properties.

      2) PRIMARY
      The following definitions:

      [nt:file] > nt:hierarchyNode 
        + jcr:content (nt:base) primary mandatory
      
      [nt:linkedFile] > nt:hierarchyNode 
        - jcr:content (reference) primary mandatory
      

      should really be:

      [nt:file] > nt:hierarchyNode primaryitem jcr:content
      + jcr:content (nt:base) mandatory
      
      [nt:linkedFile] > nt:hierarchyNode primaryitem jcr:content
      - jcr:content (REFERENCE) mandatory
      

      The PRIMARY keyword should not be supported (neither on properties, nor on children) and an appropriate exception should be thrown.

      Also, the node.getPrimaryItem() method implementation should make sure it supports both nodes and properties alike.

            hchiorean Horia Chiorean (Inactive)
            bwallis42_jira Brian Wallis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: