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

Carsten Ziegeler closed SLING-1861.
-----------------------------------


> 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.

Reply via email to