org.apache.directory.server.schema.registries
Class AbstractSchemaLoader
java.lang.Object
org.apache.directory.server.schema.registries.AbstractSchemaLoader
- All Implemented Interfaces:
- SchemaLoader
- Direct Known Subclasses:
- BootstrapSchemaLoader, PartitionSchemaLoader
public abstract class AbstractSchemaLoader
- extends java.lang.Object
- implements SchemaLoader
An abstract class with a utility method and setListener() implemented.
- Version:
- $Rev$
- Author:
- Apache Directory Project
Method Summary |
protected void |
loadDepsFirst(Schema rootAncestor,
java.util.Stack<java.lang.String> beenthere,
java.util.Map<java.lang.String,Schema> notLoaded,
Schema schema,
Registries registries,
java.util.Properties props)
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. |
protected void |
notifyListenerOrRegistries(Schema schema,
Registries registries)
|
void |
setListener(SchemaLoaderListener listener)
Sets listener used to notify of newly loaded schemas. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
listener
protected SchemaLoaderListener listener
AbstractSchemaLoader
public AbstractSchemaLoader()
setListener
public void setListener(SchemaLoaderListener listener)
- Description copied from interface:
SchemaLoader
- Sets listener used to notify of newly loaded schemas.
- Specified by:
setListener
in interface SchemaLoader
- Parameters:
listener
- the listener to notify (only one is enough for us)
notifyListenerOrRegistries
protected final void notifyListenerOrRegistries(Schema schema,
Registries registries)
loadDepsFirst
protected final void loadDepsFirst(Schema rootAncestor,
java.util.Stack<java.lang.String> beenthere,
java.util.Map<java.lang.String,Schema> notLoaded,
Schema schema,
Registries registries,
java.util.Properties props)
throws java.lang.Exception
- 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:
rootAncestor
- the triggering schema load request: the root ancestor of dependency chainbeenthere
- stack of schema names we have visited and have yet to loadnotLoaded
- hash of schemas keyed by name which have yet to be loadedschema
- the current schema we are attempting to loadregistries
- the set of registries to use while loadingprops
- to use while trying to resolve other schemas
- Throws:
javax.naming.NamingException
- if there is a cycle detected and/or another
failure results while loading, producing and or registering schema objects
java.lang.Exception
Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.