if ( oc.contains( SchemaConstants.ORGANIZATIONAL_UNIT_OC ) )
{
if ( opContext.getDn().size() != 3 )
{
throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_378 ) );
}
String ouValue = ( String ) opContext.getDn().getRdn().getNormValue();
ouValue = ouValue.trim().toLowerCase();
if ( ! VALID_OU_VALUES.contains( ouValue ) )
{
throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
I18n.err( I18n.ERR_379, VALID_OU_VALUES ) );
}
return;
}
throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM );
}