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

java.lang.Object
  extended by org.apache.directory.server.schema.registries.AbstractSchemaLoader
      extended by org.apache.directory.server.schema.bootstrap.BootstrapSchemaLoader
All Implemented Interfaces:
SchemaLoader

public class BootstrapSchemaLoader
extends AbstractSchemaLoader

Class which handles bootstrap schema class file loading.

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

Field Summary
 
Fields inherited from class org.apache.directory.server.schema.registries.AbstractSchemaLoader
listener
 
Constructor Summary
BootstrapSchemaLoader()
          Creates a BootstrapSchema loader.
BootstrapSchemaLoader(java.lang.ClassLoader cl)
           
 
Method Summary
 Schema getSchema(java.lang.String schemaName)
          Gets a schema object based on it's name.
 Schema getSchema(java.lang.String schemaName, java.util.Properties schemaProperties)
          Gets a schema object based on it's name and some properties.
 void load(Schema schema, Registries registries, boolean isDepLoad)
          Loads a schema by loading and running all producers for the schema.
 void loadWithDependencies(java.util.Collection<Schema> bootstrapSchemas, Registries registries)
          Loads a set of schemas by loading and running all producers for each dependent schema first.
 void loadWithDependencies(Schema schema, Registries registries)
          Loads a single schema at least and possibly it's dependencies.
 
Methods inherited from class org.apache.directory.server.schema.registries.AbstractSchemaLoader
loadDepsFirst, notifyListenerOrRegistries, setListener
 
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.


BootstrapSchemaLoader

public BootstrapSchemaLoader(java.lang.ClassLoader cl)
Method Detail

loadWithDependencies

public final void loadWithDependencies(Schema schema,
                                       Registries registries)
                                throws java.lang.Exception
Description copied from interface: SchemaLoader
Loads a single schema at least and possibly it's dependencies.

Parameters:
schema - the schema to load
registries - the registries to populate with these schemas
Throws:
java.lang.Exception

loadWithDependencies

public final void loadWithDependencies(java.util.Collection<Schema> bootstrapSchemas,
                                       Registries registries)
                                throws java.lang.Exception
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
java.lang.Exception

load

public final void load(Schema schema,
                       Registries registries,
                       boolean isDepLoad)
                throws javax.naming.NamingException
Loads a schema by loading and running all producers for the schema.

Parameters:
schema - the schema to load
registries - the registries to fill with producer created objects
isDepLoad - tells the loader if this load request is to satisfy a dependency
Throws:
javax.naming.NamingException - if there are any failures during this process

getSchema

public Schema getSchema(java.lang.String schemaName)
                 throws javax.naming.NamingException
Description copied from interface: SchemaLoader
Gets a schema object based on it's name.

Parameters:
schemaName - the name of the schema to load
Returns:
the Schema object associated with the name
Throws:
NamingException - if any problems while trying to find the associated Schema

getSchema

public Schema getSchema(java.lang.String schemaName,
                        java.util.Properties schemaProperties)
                 throws javax.naming.NamingException
Description copied from interface: SchemaLoader
Gets a schema object based on it's name and some properties.

Parameters:
schemaName - the name of the schema to load
schemaProperties - the properties associated with that schema to facilitate locating/loading it
Returns:
the Schema object associated with the name
Throws:
NamingException - if any problems while trying to find the associated Schema


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