void migrateGroup ( Node oldGroupNode ) throws Exception { String groupName = oldGroupNode . getName ( ) ; String desc = utils . readString ( oldGroupNode , GroupProperties . JOS_DESCRIPTION ) ; String label = utils . readString ( oldGroupNode , GroupProperties . JOS_LABEL ) ; String parentId = utils . readString ( oldGroupNode , MigrationTool . JOS_PARENT_ID ) ; GroupImpl group = new GroupImpl ( groupName , parentId ) ; group . setDescription ( desc ) ; group . setLabel ( label ) ; Group parentGroup = findGroupById ( group . getParentId ( ) ) ; if ( findGroupById ( group . getId ( ) ) != null ) { removeGroup ( group , false ) ; } addChild ( parentGroup , group , false ) ; }
Method for group migration .