You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2010/11/04 21:44:41 UTC

[jira] Resolved: (SLING-1861) Support jcr:mixinTypes for jcr powered persistable value map

     [ https://issues.apache.org/jira/browse/SLING-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-1861.
-------------------------------------

    Resolution: Fixed

Implemented in revision 1031225

> Support jcr:mixinTypes for jcr powered persistable value map
> ------------------------------------------------------------
>
>                 Key: SLING-1861
>                 URL: https://issues.apache.org/jira/browse/SLING-1861
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR
>    Affects Versions: JCR Resource 2.0.6
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: JCR Resource 2.0.8
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.