org.apache.directory.server.core.schema.bootstrap
Class BootstrapSchemaLoader

java.lang.Object
  extended by org.apache.directory.server.core.schema.bootstrap.BootstrapSchemaLoader

public class BootstrapSchemaLoader
extends java.lang.Object

Class which handles bootstrap schema class file loading.

Version:
$Rev: 434579 $
Author:
Apache Directory Project

Constructor Summary
BootstrapSchemaLoader()
          Creates a BootstrapSchema loader.
 
Method Summary
 void load(BootstrapSchema schema, BootstrapRegistries registries)
          Loads a schema by loading and running all producers for te schema.
 void load(java.util.Collection bootstrapSchemas, BootstrapRegistries registries)
          Loads a set of schemas by loading and running all producers for each dependent schema first.
 void loadDepsFirst(java.util.Stack beenthere, java.util.HashMap notLoaded, BootstrapSchema schema, BootstrapRegistries registries)
          Recursive method which loads schema's with their dependent schemas first and tracks what schemas it has seen so the recursion does not go out of control with depenency cycle detection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BootstrapSchemaLoader

public BootstrapSchemaLoader()
Creates a BootstrapSchema loader.

Method Detail

load

public final void load(java.util.Collection bootstrapSchemas,
                       BootstrapRegistries registries)
                throws javax.naming.NamingException
Loads a set of schemas by loading and running all producers for each dependent schema first.

Parameters:
bootstrapSchemas - Collection of BootstrapSchemas to load
registries - the registries to fill with producer created objects
Throws:
javax.naming.NamingException - if there are any failures during this process

loadDepsFirst

public final void loadDepsFirst(java.util.Stack beenthere,
                                java.util.HashMap notLoaded,
                                BootstrapSchema schema,
                                BootstrapRegistries registries)
                         throws javax.naming.NamingException
Recursive method which loads schema's with their dependent schemas first and tracks what schemas it has seen so the recursion does not go out of control with depenency cycle detection.

Parameters:
beenthere - stack of schema names we have visited and have yet to load
notLoaded - hash of schemas keyed by name which have yet to be loaded
schema - the current schema we are attempting to load
registries - the set of registries to use while loading
Throws:
javax.naming.NamingException - if there is a cycle detected and/or another failure results while loading, producing and or registering schema objects

load

public final void load(BootstrapSchema schema,
                       BootstrapRegistries registries)
                throws javax.naming.NamingException
Loads a schema by loading and running all producers for te schema.

Parameters:
schema - the schema to load
registries - the registries to fill with producer created objects
Throws:
javax.naming.NamingException - if there are any failures during this process


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.