processed.add( attributeType.getOid() );
}
else
{
// Not allowed : we have a cyle
Throwable error = new LdapSchemaViolationException( ResultCodeEnum.OTHER, I18n.err( I18n.ERR_04297,
attributeType.getOid() ) );
errors.add( error );
return;
}
}
}
// Process the Syntax. If it's null, the attributeType must have
// a Superior.
String syntaxOid = attributeType.getSyntaxOid();
if ( syntaxOid != null )
{
// Check if the Syntax is present in the registries
try
{
ldapSyntaxRegistry.lookup( syntaxOid );
}
catch ( LdapException ne )
{
// This AT's syntax has not been loaded into the Registries.
errors.add( ne );
}
}
else
{
// No Syntax : get it from the AttributeType's superior
if ( superior == null )
{
// This is an error. if the AT does not have a Syntax,
// then it must have a superior, which syntax is get from.
Throwable error = new LdapSchemaViolationException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err(
I18n.ERR_04298, attributeType.getOid() ) );
errors.add( error );
}
}