Package org.apache.directory.server.schema.bootstrap

Examples of org.apache.directory.server.schema.bootstrap.Schema


        for ( Schema schema : schemaMap.values() )
        {
            createSchemaAndContainers( schema );
        }

        Schema other = new Schema()
        {
            public String[] getDependencies()
            {
                return OTHER_SCHEMA_DEPENDENCIES;
            }
View Full Code Here


        AttributeTypeRegistry attributeTypeRegistry = registries.getAttributeTypeRegistry();

        for ( AttributeType attributeType:attributeTypeRegistry )
        {
            String schemaName = attributeTypeRegistry.getSchemaName( attributeType.getOid() );
            Schema schema = registries.getLoadedSchemas().get( schemaName );
            getLog().info( "\t\t o [" + schemaName + "] - " + getNameOrNumericoid( attributeType ) );
            LdapDN dn = checkCreateSchema( schemaName );
            dn.add( SchemaConstants.OU_AT + "=attributeTypes" );
            dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
            checkCreateContainer( dn );
View Full Code Here

        ObjectClassRegistry objectClassRegistry = registries.getObjectClassRegistry();

        for ( ObjectClass objectClass:objectClassRegistry )
        {
            String schemaName = objectClassRegistry.getSchemaName( objectClass.getOid() );
            Schema schema = registries.getLoadedSchemas().get( schemaName );
            getLog().info( "\t\t o [" + schemaName + "] - " + getNameOrNumericoid( objectClass ) );
            LdapDN dn = checkCreateSchema( schemaName );
            dn.add( SchemaConstants.OU_AT + "=objectClasses" );
            dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
            checkCreateContainer( dn );
View Full Code Here

        MatchingRuleRegistry matchingRuleRegistry = registries.getMatchingRuleRegistry();

        for ( MatchingRule matchingRule : matchingRuleRegistry )
        {
            String schemaName = matchingRuleRegistry.getSchemaName( matchingRule.getOid() );
            Schema schema = registries.getLoadedSchemas().get( schemaName );
            getLog().info( "\t\t o [" + schemaName + "] - " + getNameOrNumericoid( matchingRule ) );
            LdapDN dn = checkCreateSchema( schemaName );
            dn.add( SchemaConstants.OU_AT + "=matchingRules" );
            dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
            checkCreateContainer( dn );
View Full Code Here

        ComparatorRegistry comparatorRegistry = registries.getComparatorRegistry();

        for ( String oid : comparatorRegistry )
        {
            String schemaName = comparatorRegistry.getSchemaName( oid );
            Schema schema = registries.getLoadedSchemas().get( schemaName );
            getLog().info( "\t\t o [" + schemaName + "] - " + oid );
            LdapDN dn = checkCreateSchema( schemaName );
            dn.add( SchemaConstants.OU_AT + "=comparators" );
            dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
            checkCreateContainer( dn );
View Full Code Here

        NormalizerRegistry normalizerRegistry = registries.getNormalizerRegistry();

        for ( String oid : normalizerRegistry )
        {
            String schemaName = normalizerRegistry.getSchemaName( oid );
            Schema schema = registries.getLoadedSchemas().get( schemaName );
            getLog().info( "\t\t o [" + schemaName + "] - " + oid );
            LdapDN dn = checkCreateSchema( schemaName );
            dn.add( SchemaConstants.OU_AT + "=normalizers" );
            dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
            checkCreateContainer( dn );
View Full Code Here

        for ( Syntax syntax : syntaxRegistry )
        {
            getLog().info( "\t\t o [" + syntax.getSchema() + "] - " + getNameOrNumericoid( syntax ) );
            LdapDN dn = checkCreateSchema( syntax.getSchema() );
            Schema schema = registries.getLoadedSchemas().get( syntax.getSchema() );
            dn.add( SchemaConstants.OU_AT + "=syntaxes" );
            dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
            checkCreateContainer( dn );
            ServerEntry entry = attributesFactory.getAttributes( syntax, schema, registries );
            dn.add( MetaSchemaConstants.M_OID_AT + "=" + syntax.getOid() );
View Full Code Here

        SyntaxCheckerRegistry syntaxCheckerRegistry = registries.getSyntaxCheckerRegistry();

        for ( SyntaxChecker syntaxChecker : syntaxCheckerRegistry )
        {
            String schemaName = syntaxCheckerRegistry.getSchemaName( syntaxChecker.getSyntaxOid() );
            Schema schema = registries.getLoadedSchemas().get( schemaName );
            getLog().info( "\t\t o [" + schemaName + "] - " + syntaxChecker.getSyntaxOid() );
            LdapDN dn = checkCreateSchema( schemaName );
            dn.add( SchemaConstants.OU_AT + "=syntaxCheckers" );
            dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
            checkCreateContainer( dn );
View Full Code Here

    }


    private LdapDN checkCreateSchema( String schemaName ) throws Exception
    {
        Schema schema = schemas.get( schemaName );
        LdapDN dn = new LdapDN( SchemaConstants.CN_AT + "=" + schemaName + "," + SchemaConstants.OU_AT + "=schema" );
        dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );

        if ( hasEntry( dn ) )
        {
View Full Code Here

    protected boolean modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry,
        boolean cascade ) throws Exception
    {
        String oid = getOid( entry );
        Schema schema = getSchema( name );
        ObjectClass oc = factory.getObjectClass( targetEntry, targetRegistries, schema.getSchemaName() );

        if ( ! schema.isDisabled() )
        {
            objectClassRegistry.unregister( oid );
            objectClassRegistry.register( oc );
           
            return SCHEMA_MODIFIED;
View Full Code Here

TOP

Related Classes of org.apache.directory.server.schema.bootstrap.Schema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.