Different behavior in AEM6.0 while removeMixin(java.lang.String mixinName) | Community
Skip to main content
DEBAL_DAS
New Participant
October 16, 2015
Solved

Different behavior in AEM6.0 while removeMixin(java.lang.String mixinName)

  • October 16, 2015
  • 1 reply
  • 779 views

Hi,

As I have tried to remove the specified mixin node type from a specific node using removeMixin(java.lang.String mixinName), I have seen following behavior in CQ5/AEM repository -

1. It removes entire property (jcr:mixinTypes, Name[], mix:versionable) under that specific node in CQ5.4/CQ5.5 .

2. But in AEM6.0 it removes only the value i.e. mix:versionable from 'jcr:mixinTypes' property and that node still has jcr:mixinTypes property without any value.

Here is my code snippet -

try { 
         
            
           Repository repository = JcrUtils.getRepository("http://localhost:7502/crx/server");
           
           Session session = repository.login( new SimpleCredentials("admin", "admin".toCharArray())); 
         
           Node root = session.getRootNode(); 
         
           Node n = root.getNode("content/awsportal/en/jcr:content"); 
          
           n.removeMixin("mix:versionable");
          
         
         
          // Save the session changes and log out
          session.save(); 
          session.logout();
          }
         catch(Exception e){
          e.printStackTrace();
          } 

Does, AEM6.0 has any different feature for the same? Any idea.

 

Thanks & Regards,

Debal

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

It is jcr api & should not be changed afaik.  Please file support request

1 reply

Sham_HC
Sham_HCAccepted solution
New Participant
October 16, 2015

It is jcr api & should not be changed afaik.  Please file support request