/**
* Creates the SSSE by extracting all the SchemaObjects from the registries.
*/
private void generateSchemaSubentry( ServerEntry mods ) throws NamingException
{
ServerEntry attrs = new DefaultServerEntry( getSchemaManager(), mods.getDn() );
// add the objectClass attribute : 'top', 'subschema', 'subentry' and 'apacheSubschema'
attrs.put( SchemaConstants.OBJECT_CLASS_AT,
SchemaConstants.TOP_OC,
SchemaConstants.SUBSCHEMA_OC,
SchemaConstants.SUBENTRY_OC,
ApacheSchemaConstants.APACHE_SUBSCHEMA_OC
);
// add the cn attribute as required for the RDN
attrs.put( SchemaConstants.CN_AT, "schema" );
// generate all the other operational attributes
attrs.put( generateComparators() );
attrs.put( generateNormalizers() );
attrs.put( generateSyntaxCheckers() );
attrs.put( generateObjectClasses() );
attrs.put( generateAttributeTypes() );
attrs.put( generateMatchingRules() );
attrs.put( generateMatchingRuleUses() );
attrs.put( generateSyntaxes() );
attrs.put( generateDitContextRules() );
attrs.put( generateDitStructureRules() );
attrs.put( generateNameForms() );
attrs.put( SchemaConstants.SUBTREE_SPECIFICATION_AT, "{}" );
// -------------------------------------------------------------------
// set standard operational attributes for the subentry
// -------------------------------------------------------------------
// Add the createTimestamp
EntryAttribute createTimestamp = mods.get( SchemaConstants.CREATE_TIMESTAMP_AT );
attrs.put( SchemaConstants.CREATE_TIMESTAMP_AT, createTimestamp.get() );
// Add the creatorsName
attrs.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN );
// Add the modifyTimestamp
EntryAttribute schemaModifyTimestamp = mods.get( ApacheSchemaConstants.SCHEMA_MODIFY_TIMESTAMP_AT );
attrs.put( SchemaConstants.MODIFY_TIMESTAMP_AT, schemaModifyTimestamp.get() );
// Add the modifiersName
EntryAttribute schemaModifiersName = mods.get( ApacheSchemaConstants.SCHEMA_MODIFIERS_NAME_AT );
attrs.put( SchemaConstants.MODIFIERS_NAME_AT, schemaModifiersName.get() );
// don't swap out if a request for the subentry is in progress or we
// can give back an inconsistent schema back to the client so we block
synchronized ( lock )
{