Package org.apache.ldap.server.schema.bootstrap

Examples of org.apache.ldap.server.schema.bootstrap.BootstrapRegistries


    {
        // --------------------------------------------------------------------
        // Load the schema here and check that it is ok!
        // --------------------------------------------------------------------

        BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();

        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();

        String[] schemas = DEFAULT_SCHEMAS;

        if ( initialEnv.containsKey( EnvKeys.SCHEMAS ) )
        {
            String schemaList = ( String ) initialEnv.get( EnvKeys.SCHEMAS );

            schemaList = StringTools.deepTrim( schemaList );

            schemas = schemaList.split( " " );

            for ( int ii = 0; ii < schemas.length; ii++ )
            {
                schemas[ii] = schemas[ii].trim();
            }
        }

        loader.load( schemas, bootstrapRegistries );

        List errors = bootstrapRegistries.checkRefInteg();

        if ( !errors.isEmpty() )
        {
            NamingException e = new NamingException();

            e.setRootCause( ( Throwable ) errors.get( 0 ) );

            throw e;
        }

        // --------------------------------------------------------------------
        // Fire up the system partition
        // --------------------------------------------------------------------

        String wkdir = DEFAULT_WKDIR;

        if ( initialEnv.containsKey( EnvKeys.WKDIR ) )
        {
            wkdir = ( ( String ) initialEnv.get( EnvKeys.WKDIR ) ).trim();
        }

        File wkdirFile = new File( wkdir );

        if ( wkdirFile.isAbsolute() )
        {
            if ( !wkdirFile.exists() )
            {
                throw new NamingException( "working directory " + wkdir + " does not exist" );
            }
        }
        else
        {
            File current = new File( "." );

            mkdirs( current.getAbsolutePath(), wkdir );
        }

        LdapName suffix = new LdapName();

        suffix.add( SystemPartition.SUFFIX );

        Database db = new JdbmDatabase( suffix, suffix, wkdir );

        AttributeTypeRegistry attributeTypeRegistry;

        attributeTypeRegistry = bootstrapRegistries .getAttributeTypeRegistry();

        OidRegistry oidRegistry;

        oidRegistry = bootstrapRegistries.getOidRegistry();

        ExpressionEvaluator evaluator;

        evaluator = new ExpressionEvaluator( db, oidRegistry, attributeTypeRegistry );
View Full Code Here


    {
        // --------------------------------------------------------------------
        // Load the schema here and check that it is ok!
        // --------------------------------------------------------------------

        BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();

        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
        loader.load( startupConfiguration.getBootstrapSchemas(), bootstrapRegistries );

        java.util.List errors = bootstrapRegistries.checkRefInteg();
        if ( !errors.isEmpty() )
        {
            NamingException e = new NamingException();

            e.setRootCause( ( Throwable ) errors.get( 0 ) );
View Full Code Here

    {
        // --------------------------------------------------------------------
        // Load the schema here and check that it is ok!
        // --------------------------------------------------------------------

        BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();

        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
        loader.load( startupConfiguration.getBootstrapSchemas(), bootstrapRegistries );

        java.util.List errors = bootstrapRegistries.checkRefInteg();
        if ( !errors.isEmpty() )
        {
            NamingException e = new NamingException();

            e.setRootCause( ( Throwable ) errors.get( 0 ) );
View Full Code Here

    {
        // --------------------------------------------------------------------
        // Load the schema here and check that it is ok!
        // --------------------------------------------------------------------

        BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();

        BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
        loader.load( startupConfiguration.getBootstrapSchemas(), bootstrapRegistries );

        java.util.List errors = bootstrapRegistries.checkRefInteg();
        if ( !errors.isEmpty() )
        {
            NamingException e = new NamingException();

            e.setRootCause( ( Throwable ) errors.get( 0 ) );
View Full Code Here

TOP

Related Classes of org.apache.ldap.server.schema.bootstrap.BootstrapRegistries

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.