private void checkNewParent( DN newParent ) throws LdapException
{
if ( newParent.size() != 3 )
{
throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
I18n.err( I18n.ERR_402 ) );
}
RDN rdn = newParent.getRdn();
if ( !schemaManager.getAttributeTypeRegistry().getOidByName( rdn.getNormType() ).equals(
SchemaConstants.OU_AT_OID ) )
{
throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err( I18n.ERR_403 ) );
}
if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( "syntaxes" ) )
{
throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err( I18n.ERR_363 ) );
}
}