@ Override public boolean setGroup ( Node node ) throws Exception { LdapGroup newLdapGroup = ( LdapGroup ) node ; newLdapGroup = updateGroupMembers ( newLdapGroup ) ; LdapGroup oldLdapGroup = ( LdapGroup ) getGroup ( newLdapGroup . getCn ( ) ) ; if ( oldLdapGroup . isEmpty ( ) ) { creationCount ++ ; Logger . info ( LOG_BIND + getOuForNode ( newLdapGroup ) ) ; ctx . bind ( getOuForNode ( newLdapGroup ) , null , newLdapGroup . getAttributes ( ) ) ; return true ; } else { ModificationItem [ ] mods = buildModificationsForGroup ( newLdapGroup , oldLdapGroup ) ; if ( mods . length > 0 ) { modificationCount ++ ; Logger . info ( LOG_MODIFY_ATTRIBUTES + getOuForNode ( newLdapGroup ) ) ; ctx . modifyAttributes ( getOuForNode ( newLdapGroup ) , mods ) ; return true ; } } return false ; }
Adds or updates a LDAP - Group .