// First get the old schema.
int size = name.size();
if (size < 1) {
// ldap.38=Can't modify schema root
throw new SchemaViolationException(Messages.getString("ldap.38")); //$NON-NLS-1$
}
Hashtable<String, Object> subSchemaTree = doLookup(name
.getPrefix(size - 1), size - 1);
String subSchemaType = name.getSuffix(size - 1).toString()
.toLowerCase();
Object schema = subSchemaTree.get(jndi2ldap(subSchemaType));
if (schema == null) {
throw new NameNotFoundException(name.toString());
}
if (level - size == 2) {
// ldap.38=Can't modify schema root
throw new SchemaViolationException(Messages.getString("ldap.38")); //$NON-NLS-1$
}
if (modificationItems.length == 0) {
return;
}