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

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


        // -------------------------------------------------------------------
        // load the bootstrap schemas to pre-load into the partition
        // -------------------------------------------------------------------

        // always include these core bootstrap schemas
        BootstrapSchema schema = new SystemSchema();
        schemas.put( schema.getSchemaName(), schema );

        schema = new ApacheSchema();
        schemas.put( schema.getSchemaName(), schema );

        schema = new ApachemetaSchema();
        schemas.put( schema.getSchemaName(), schema );

        schema = new CoreSchema();
        schemas.put( schema.getSchemaName(), schema );

        getLog().info( "------------------------------------------------------------------------" );
        getLog().info( "Found bootstrap schemas: " );
        getLog().info( "------------------------------------------------------------------------" );
        getLog().info( "" );

        // start loading other schemas from the plugin's configuration section
        ClassLoader parent = getClass().getClassLoader();
        URL[] urls = new URL[classpathElements.size()];
        int i = 0;

        for ( String classpathElement : classpathElements )
        {
            try
            {
                urls[i++] = new File( classpathElement ).toURI().toURL();
            }
            catch ( MalformedURLException e )
            {
                throw ( MojoFailureException ) new MojoFailureException( "Could not construct classloader: " )
                    .initCause( e );
            }
        }

        ClassLoader cl = new URLClassLoader( urls, parent );

        for ( String bootstrapSchemaClass : bootstrapSchemaClasses )
        {
            try
            {
                Class<?> schemaClass = cl.loadClass( bootstrapSchemaClass );
                schema = ( BootstrapSchema ) schemaClass.newInstance();
                schemas.put( schema.getSchemaName(), schema );
            }
            catch ( ClassNotFoundException e )
            {
                getLog().info( "ClassLoader " + getClass().getClassLoader() );
                getLog()
View Full Code Here


        // Generate for each schema
        for ( int ii = 0; ii < schemas.length; ii++ )
        {
            try
            {
                BootstrapSchema bootstrapSchema = new AbstractBootstrapSchema( schemas[ii].getOwner(), schemas[ii]
                    .getName(), schemas[ii].getPkg(), schemas[ii].getDependencies() )
                {
                };

                if ( isStale( bootstrapSchema ) )
View Full Code Here

TOP

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

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.