jcr:mixinTypes property

Singaiah_Chintalapudi

MVP

19-05-2016

Hi,

I want to add the below property programatically:

Name: jcr:mixinTypes
Type: Name[]
Value: cq:LiveRelationship, cq:LiveSync, cq:LiveSyncCancelled

I am using JCR API but when I create this property, it is adding this property type as string[] not Name[]. Can anyone help me to resolve this issue?

Thanks.

Answers (4)

Answers (4)

naniv22657571

23-05-2016

String []  array = new String[]{"cq:LiveRelationship", "cq:LiveSync", "cq:LiveSyncCancelled"};

Then set the property like below

   node.setProperty(" jcr:mixinTypes",array);

  node.getSesssion().Save();

 

Hope this would you are expecting.

 

Reply if you are not getting.

Singaiah_Chintalapudi

MVP

23-05-2016

Deepikaa Nagesh wrote...

Hi,

hope you are using Node.addMixin method?

If not how exactly you are adding mixins to node?

 

Thanks,

Deepikaa

 

 

Yes. I have tried to use the same method. 

http://www.day.com/specs/jsr170/javadocs/jcr-2.0/javax/jcr/Node.html#addMixin(java.lang.String)

But it is throwing exceptions. 

Singaiah_Chintalapudi

MVP

20-05-2016

noksc wrote...

Hi,

I want to add the below property programatically:

Name: jcr:mixinTypes
Type: Name[]
Value: cq:LiveRelationship, cq:LiveSync, cq:LiveSyncCancelled

I am using JCR API but when I create this property, it is adding this property type as string[] not Name[]. Can anyone help me to resolve this issue?

Thanks.

 

Can someone help me to solve this issue?