private List<AttributeType> getMustRecursive( List<AttributeType> musts, Set<ObjectClass> processed, ObjectClass objectClass ) { if ( objectClass != null ) { if ( processed.contains( objectClass ) ) { // We have found a cycle. It has already been reported, // don't add a new error, just exit. return null; } processed.add( objectClass ); for ( AttributeType must : objectClass.getMustAttributeTypes() ) { musts.add( must ); } for ( ObjectClass superior : objectClass.getSuperiors() ) { getMustRecursive( musts, processed, superior ); } } return musts; }
unregisterDescendants( attributeType, ancestor.getSuperiors() );
registerDescendants( objectClass, ancestor.getSuperiors() );
/** * {@inheritDoc} */ public ObjectClass unregister( String numericOid ) throws LdapException { try { ObjectClass removed = super.unregister( numericOid ); // Deleting an ObjectClass which might be used as a superior means we have // to recursively update the descendant map. We also have to remove // the at.oid -> descendant relation oidToDescendants.remove( numericOid ); // Now recurse if needed unregisterDescendants( removed, removed.getSuperiors() ); return removed; } catch ( LdapException ne ) { throw new LdapNoSuchAttributeException( ne.getMessage() ); } }
List<ObjectClass> sups = objectClass.getSuperiors();
if ( objectClass.getSuperiors() != null ) for ( ObjectClass superior : objectClass.getSuperiors() )