{
serverEntry.add( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, JavaLdapSupport.JCONTAINER_ATTR );
}
catch ( LdapException le )
{
throw new SchemaViolationException( I18n.err( I18n.ERR_491, name) );
}
// Now add the CN attribute, which is mandatory
RDN rdn = target.getRdn();
if ( rdn != null )
{
if ( SchemaConstants.CN_AT.equals( rdn.getNormType() ) )
{
serverEntry.put( rdn.getUpType(), ( String ) rdn.getUpValue() );
}
else
{
// No CN in the rdn, this is an error
throw new SchemaViolationException( I18n.err( I18n.ERR_491, name) );
}
}
else
{
// No CN in the rdn, this is an error
throw new SchemaViolationException( I18n.err( I18n.ERR_491, name) );
}
/*
* Add the new context to the server which as a side effect adds
* operational attributes to the serverEntry refering instance which