Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1861

Support jcr:mixinTypes for jcr powered persistable value map

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JCR Resource 2.0.6
    • JCR Resource 2.0.8
    • JCR
    • None

    Description

      It would be nice if the jcr powered persistable value map supports setting mixin node types through the jcr:mixinTypes property:

      PersistableValueMap pvm;

      String[] types = pvm.get("jcr:mixinTypes", String[].class);
      if ( types == null )

      { pvm.put("jcr:mixinTypes", "slingshot:Photo"); }

      else

      { String[] newTypes = new String[types.length + 1]; System.arraycopy(types, 0, newTypes, 0, types.length); newTypes[types.length] = "slingshot:Photo"; pvm.put("jcr:mixinTypes", newTypes); }

      If a mixin type is several times in the array, it is only applied once.

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            cziegeler Carsten Ziegeler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: