}
public ServerEntry getAttributes( Schema schema, SchemaManager schemaManager ) throws NamingException
{
ServerEntry entry = new DefaultServerEntry( schemaManager );
entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, MetaSchemaConstants.META_SCHEMA_OC );
entry.put( SchemaConstants.CN_AT, schema.getSchemaName() );
entry.put( SchemaConstants.CREATORS_NAME_AT, schema.getOwner() );
entry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
if ( schema.isDisabled() )
{
entry.put( MetaSchemaConstants.M_DISABLED_AT, "TRUE" );
}
String[] dependencies = schema.getDependencies();
if ( dependencies != null && dependencies.length > 0 )
{
EntryAttribute attr = new DefaultServerAttribute( schemaManager.lookupAttributeTypeRegistry( MetaSchemaConstants.M_DEPENDENCIES_AT ) );
for ( String dependency:dependencies )
{
attr.add( dependency );
}
entry.put( attr );
}
return entry;
}