org.apache.directory.server.schema.registries
Class DefaultRegistries

java.lang.Object
  extended by org.apache.directory.server.schema.registries.DefaultRegistries
All Implemented Interfaces:
Registries

public class DefaultRegistries
extends java.lang.Object
implements Registries

A set of boostrap registries used to fire up the server.

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

Constructor Summary
DefaultRegistries(java.lang.String name, SchemaLoader schemaLoader, OidRegistry registry)
           
 
Method Summary
 void addToLoadedSet(Schema schema)
          Adds a schema to the loaded set but does not load the schema in question.
 java.util.List<java.lang.Throwable> checkRefInteg()
          Attempts to resolve the dependent schema objects of all entities that refer to other objects within the registries.
 AttributeTypeRegistry getAttributeTypeRegistry()
           
 ComparatorRegistry getComparatorRegistry()
           
 DITContentRuleRegistry getDitContentRuleRegistry()
           
 DITStructureRuleRegistry getDitStructureRuleRegistry()
           
 java.util.Map<java.lang.String,Schema> getLoadedSchemas()
          Alterations to the returned map of schema names to schema objects does not change the map returned from this method.
 MatchingRuleRegistry getMatchingRuleRegistry()
           
 MatchingRuleUseRegistry getMatchingRuleUseRegistry()
           
 java.lang.String getName()
           
 NameFormRegistry getNameFormRegistry()
           
 NormalizerRegistry getNormalizerRegistry()
           
 ObjectClassRegistry getObjectClassRegistry()
           
 OidRegistry getOidRegistry()
           
 Schema getSchema(java.lang.String schemaName)
           
 SyntaxCheckerRegistry getSyntaxCheckerRegistry()
           
 SyntaxRegistry getSyntaxRegistry()
           
 void load(java.lang.String schemaName)
           
 void load(java.lang.String schemaName, java.util.Properties schemaProperties)
           
 void removeFromLoadedSet(java.lang.String schemaName)
          Removes a schema from the loaded set without unloading the schema.
 SchemaLoader setSchemaLoader()
           
 void unload(java.lang.String schemaName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRegistries

public DefaultRegistries(java.lang.String name,
                         SchemaLoader schemaLoader,
                         OidRegistry registry)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Registries

getAttributeTypeRegistry

public AttributeTypeRegistry getAttributeTypeRegistry()
Specified by:
getAttributeTypeRegistry in interface Registries

getComparatorRegistry

public ComparatorRegistry getComparatorRegistry()
Specified by:
getComparatorRegistry in interface Registries

getDitContentRuleRegistry

public DITContentRuleRegistry getDitContentRuleRegistry()
Specified by:
getDitContentRuleRegistry in interface Registries

getDitStructureRuleRegistry

public DITStructureRuleRegistry getDitStructureRuleRegistry()
Specified by:
getDitStructureRuleRegistry in interface Registries

getMatchingRuleRegistry

public MatchingRuleRegistry getMatchingRuleRegistry()
Specified by:
getMatchingRuleRegistry in interface Registries

getMatchingRuleUseRegistry

public MatchingRuleUseRegistry getMatchingRuleUseRegistry()
Specified by:
getMatchingRuleUseRegistry in interface Registries

getNameFormRegistry

public NameFormRegistry getNameFormRegistry()
Specified by:
getNameFormRegistry in interface Registries

getNormalizerRegistry

public NormalizerRegistry getNormalizerRegistry()
Specified by:
getNormalizerRegistry in interface Registries

getObjectClassRegistry

public ObjectClassRegistry getObjectClassRegistry()
Specified by:
getObjectClassRegistry in interface Registries

getOidRegistry

public OidRegistry getOidRegistry()
Specified by:
getOidRegistry in interface Registries

getSyntaxCheckerRegistry

public SyntaxCheckerRegistry getSyntaxCheckerRegistry()
Specified by:
getSyntaxCheckerRegistry in interface Registries

getSyntaxRegistry

public SyntaxRegistry getSyntaxRegistry()
Specified by:
getSyntaxRegistry in interface Registries

checkRefInteg

public java.util.List<java.lang.Throwable> checkRefInteg()
Attempts to resolve the dependent schema objects of all entities that refer to other objects within the registries. Null references will be handed appropriately.

Specified by:
checkRefInteg in interface Registries
Returns:
a list of exceptions encountered while resolving entities

getLoadedSchemas

public java.util.Map<java.lang.String,Schema> getLoadedSchemas()
Alterations to the returned map of schema names to schema objects does not change the map returned from this method. The returned map is however mutable.

Specified by:
getLoadedSchemas in interface Registries

load

public void load(java.lang.String schemaName)
          throws java.lang.Exception
Specified by:
load in interface Registries
Throws:
java.lang.Exception

load

public void load(java.lang.String schemaName,
                 java.util.Properties schemaProperties)
          throws java.lang.Exception
Specified by:
load in interface Registries
Throws:
java.lang.Exception

unload

public void unload(java.lang.String schemaName)
            throws java.lang.Exception
Specified by:
unload in interface Registries
Throws:
java.lang.Exception

setSchemaLoader

public SchemaLoader setSchemaLoader()
Specified by:
setSchemaLoader in interface Registries

getSchema

public Schema getSchema(java.lang.String schemaName)
Specified by:
getSchema in interface Registries

addToLoadedSet

public void addToLoadedSet(Schema schema)
Description copied from interface: Registries
Adds a schema to the loaded set but does not load the schema in question. This may be a temporary fix for new schemas being added which are enabled yet do not have any schema entities associated with them to load. In this case all objects added under this schema will load when added instead of in bulk.

Specified by:
addToLoadedSet in interface Registries
Parameters:
schema - the schema object to add to the loaded set.

removeFromLoadedSet

public void removeFromLoadedSet(java.lang.String schemaName)
Description copied from interface: Registries
Removes a schema from the loaded set without unloading the schema. This should be used ONLY when an enabled schema is deleted.

Specified by:
removeFromLoadedSet in interface Registries
Parameters:
schemaName - the name of the schema to remove


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