{
if ( addContext.getDn().size() != 3 )
{
String msg = I18n.err( I18n.ERR_81 );
LOG.error( msg );
throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, msg );
}
String ouValue = addContext.getDn().getRdn().getNormValue().getString();
ouValue = ouValue.trim().toLowerCase();
if ( ! VALID_OU_VALUES.contains( ouValue ) )
{
String msg = I18n.err( I18n.ERR_82, VALID_OU_VALUES );
LOG.error( msg );
throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, msg );
}
// this is a valid container.
return;
}