Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-1543

Improve reliability of canAddMixin

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4
    • 1.5
    • jackrabbit-spi
    • None

    Description

      The current implementation of canAddMixin in JCR2SPI lacks flexibility. It only consults the (SPI) node type registry, checking for (1) whether the mixin exists, and (2) whether it is already present and (3) whether it's consistent with the node's type.

      This is fine for stores where any legal mixin can be added anywhere. It doesn't work well for stores that are limited in what they can do; for instance when nt:file nodes can be made mix:versionable, but nt:folder nodes can't.

      Proposal: enhance QNodeTypeDefinition with

      public Name[] getSupportedMixins();

      where the return value is either null (no constraints or no constraints known), or a list of mixin types that are supported for this node type.

      Attachments

        1. JCR1543.diff
          9 kB
          Julian Reschke
        2. JCR1543.diff
          8 kB
          Julian Reschke
        3. JCR1543.diff
          5 kB
          Julian Reschke

        Activity

          People

            reschke Julian Reschke
            reschke Julian Reschke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: