|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.ldap.schema.registries.Registries
public class Registries
Document this class.
Field Summary | |
---|---|
protected AttributeTypeRegistry |
attributeTypeRegistry
The AttributeType registry |
protected ComparatorRegistry |
comparatorRegistry
The LdapSyntax registry |
protected DITContentRuleRegistry |
ditContentRuleRegistry
The DitContentRule registry |
protected DITStructureRuleRegistry |
ditStructureRuleRegistry
The DitStructureRule registry |
protected OidRegistry |
globalOidRegistry
The global OID registry |
protected LdapSyntaxRegistry |
ldapSyntaxRegistry
The LdapSyntax registry |
protected java.util.Map<java.lang.String,Schema> |
loadedSchemas
A String name to Schema object map for the schemas loaded into this registry. |
protected MatchingRuleRegistry |
matchingRuleRegistry
The MatchingRule registry |
protected MatchingRuleUseRegistry |
matchingRuleUseRegistry
The MatchingRuleUse registry |
protected NameFormRegistry |
nameFormRegistry
The NameForm registry |
protected NormalizerRegistry |
normalizerRegistry
The Normalizer registry |
protected ObjectClassRegistry |
objectClassRegistry
The ObjectClass registry |
static boolean |
RELAXED
|
static boolean |
STRICT
Two flags for RELAXED and STRUCT |
protected SyntaxCheckerRegistry |
syntaxCheckerRegistry
The SyntaxChecker registry |
protected java.util.Map<SchemaObjectWrapper,java.util.Set<SchemaObjectWrapper>> |
usedBy
A map storing a relation between a SchemaObject and all the referencing SchemaObjects. |
protected java.util.Map<SchemaObjectWrapper,java.util.Set<SchemaObjectWrapper>> |
using
A map storing a relation between a SchemaObject and all the SchemaObjects it uses. |
Constructor Summary | |
---|---|
Registries(SchemaManager schemaManager)
Creates a new instance of Registries. |
Method Summary | |
---|---|
java.util.List<java.lang.Throwable> |
add(java.util.List<java.lang.Throwable> errors,
SchemaObject schemaObject)
Applies the added SchemaObject to the given register |
void |
addReference(SchemaObject base,
SchemaObject referenced)
Add an association between a SchemaObject an the SchemaObject it refers |
java.util.Set<SchemaObjectWrapper> |
addSchema(java.lang.String schemaName)
Create a new schema association with its content |
void |
associateWithSchema(java.util.List<java.lang.Throwable> errors,
SchemaObject schemaObject)
Store the given SchemaObject in the Map associating SchemaObjetcs to their related Schema. |
void |
buildReference(java.util.List<java.lang.Throwable> errors,
SchemaObject schemaObject)
Build the SchemaObject references |
java.util.List<java.lang.Throwable> |
buildReferences()
Build the usedBy and using references from the stored elements. |
boolean |
check()
Check the registries for invalid relations. |
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. |
void |
clear()
Clear the registries from all its elements |
Registries |
clone()
Clone the Registries. |
boolean |
contains(SchemaObject schemaObject)
Tells if the given SchemaObject is present in one schema. |
void |
delCrossReferences(AttributeType attributeType)
Add the SchemaObjectReferences. |
void |
delCrossReferences(MatchingRule matchingRule)
Delete the MR references (using and usedBy) : MR -> C MR -> N MR -> S |
java.util.List<java.lang.Throwable> |
delete(java.util.List<java.lang.Throwable> errors,
SchemaObject schemaObject)
Remove the given SchemaObject from the registries |
void |
delReference(SchemaObject base,
SchemaObject referenced)
Delete an association between a SchemaObject an the SchemaObject it refers |
void |
dissociateFromSchema(java.util.List<java.lang.Throwable> errors,
SchemaObject schemaObject)
Store the given SchemaObject in the Map associating SchemaObjetcs to their related Schema. |
void |
dissociateFromSchema(SchemaObject schemaObject)
Remove the given SchemaObject from the Map associating SchemaObjetcs to their related Schema. |
java.lang.String |
dumpUsedBy()
Dump the UsedBy data structure as a String |
java.lang.String |
dumpUsing()
Dump the Using data structure as a String |
AttributeTypeRegistry |
getAttributeTypeRegistry()
|
ComparatorRegistry |
getComparatorRegistry()
|
DITContentRuleRegistry |
getDitContentRuleRegistry()
|
DITStructureRuleRegistry |
getDitStructureRuleRegistry()
|
OidRegistry |
getGlobalOidRegistry()
|
LdapSyntaxRegistry |
getLdapSyntaxRegistry()
|
Schema |
getLoadedSchema(java.lang.String schemaName)
Gets a schema that has been loaded into these Registries. |
java.util.Map<java.lang.String,Schema> |
getLoadedSchemas()
Gets an unmodifiable Map of schema names to loaded Schema objects. |
MatchingRuleRegistry |
getMatchingRuleRegistry()
|
MatchingRuleUseRegistry |
getMatchingRuleUseRegistry()
|
NameFormRegistry |
getNameFormRegistry()
|
NormalizerRegistry |
getNormalizerRegistry()
|
java.util.Map<java.lang.String,java.util.Set<SchemaObjectWrapper>> |
getObjectBySchemaName()
|
ObjectClassRegistry |
getObjectClassRegistry()
|
java.lang.String |
getOid(java.lang.String name)
Get an OID from a name. |
java.util.Set<SchemaObjectWrapper> |
getReferencing(SchemaObject schemaObject)
Check that we can remove a given SchemaObject without breaking some of its references. |
SyntaxCheckerRegistry |
getSyntaxCheckerRegistry()
|
java.util.Set<SchemaObjectWrapper> |
getUsedBy(SchemaObject schemaObject)
Gets the Set of SchemaObjects referencing the given SchemaObject |
java.util.Set<SchemaObjectWrapper> |
getUsing(SchemaObject schemaObject)
Gets the Set of SchemaObjects referenced by the given SchemaObject |
boolean |
isDisabledAccepted()
Tells if the Registries accept disabled elements. |
boolean |
isReferenced(SchemaObject schemaObject)
Checks if a specific SchemaObject is referenced by any other SchemaObject. |
boolean |
isRelaxed()
Tells if the Registries is permissive or if it must be checked against inconsistencies. |
boolean |
isSchemaLoaded(java.lang.String schemaName)
Checks to see if a particular Schema is loaded. |
boolean |
isStrict()
Tells if the Registries is strict. |
void |
removeReference(java.util.List<java.lang.Throwable> errors,
SchemaObject schemaObject)
Unlink the SchemaObject references |
void |
schemaLoaded(Schema schema)
Merely adds the schema to the set of loaded schemas. |
void |
schemaUnloaded(Schema schema)
Merely removes the schema from the set of loaded schemas. |
void |
setDisabledAccepted(boolean disabledAccepted)
Change the Registries behavior regarding disabled SchemaObject element. |
void |
setRelaxed()
Change the Registries to a relaxed mode, where invalid SchemaObjects can be registered. |
void |
setStrict()
Change the Registries to a strict mode, where invalid SchemaObjects cannot be registered. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.String,Schema> loadedSchemas
protected AttributeTypeRegistry attributeTypeRegistry
protected ObjectClassRegistry objectClassRegistry
protected ComparatorRegistry comparatorRegistry
protected DITContentRuleRegistry ditContentRuleRegistry
protected DITStructureRuleRegistry ditStructureRuleRegistry
protected MatchingRuleRegistry matchingRuleRegistry
protected MatchingRuleUseRegistry matchingRuleUseRegistry
protected NameFormRegistry nameFormRegistry
protected NormalizerRegistry normalizerRegistry
protected OidRegistry globalOidRegistry
protected SyntaxCheckerRegistry syntaxCheckerRegistry
protected LdapSyntaxRegistry ldapSyntaxRegistry
public static final boolean STRICT
public static final boolean RELAXED
protected java.util.Map<SchemaObjectWrapper,java.util.Set<SchemaObjectWrapper>> usedBy
protected java.util.Map<SchemaObjectWrapper,java.util.Set<SchemaObjectWrapper>> using
Constructor Detail |
---|
public Registries(SchemaManager schemaManager)
oidRegistry
- the OID registryMethod Detail |
---|
public AttributeTypeRegistry getAttributeTypeRegistry()
public ComparatorRegistry getComparatorRegistry()
public DITContentRuleRegistry getDitContentRuleRegistry()
public DITStructureRuleRegistry getDitStructureRuleRegistry()
public MatchingRuleRegistry getMatchingRuleRegistry()
public MatchingRuleUseRegistry getMatchingRuleUseRegistry()
public NameFormRegistry getNameFormRegistry()
public NormalizerRegistry getNormalizerRegistry()
public ObjectClassRegistry getObjectClassRegistry()
public OidRegistry getGlobalOidRegistry()
public SyntaxCheckerRegistry getSyntaxCheckerRegistry()
public LdapSyntaxRegistry getLdapSyntaxRegistry()
public java.lang.String getOid(java.lang.String name)
name
- The name we are looking at
public Schema getLoadedSchema(java.lang.String schemaName)
schemaName
- the name of the schema to lookup
public boolean isSchemaLoaded(java.lang.String schemaName)
schemaName
- the name of the Schema to check
public java.util.List<java.lang.Throwable> checkRefInteg()
public void delCrossReferences(AttributeType attributeType)
public void delCrossReferences(MatchingRule matchingRule)
public void buildReference(java.util.List<java.lang.Throwable> errors, SchemaObject schemaObject)
public void removeReference(java.util.List<java.lang.Throwable> errors, SchemaObject schemaObject)
public java.util.List<java.lang.Throwable> buildReferences()
public java.util.List<java.lang.Throwable> add(java.util.List<java.lang.Throwable> errors, SchemaObject schemaObject) throws LdapException
LdapException
public java.util.List<java.lang.Throwable> delete(java.util.List<java.lang.Throwable> errors, SchemaObject schemaObject) throws LdapException
LdapException
public void schemaLoaded(Schema schema)
schemaLoaded
in interface SchemaLoaderListener
schema
- the Schema that was loadedpublic void schemaUnloaded(Schema schema)
schemaUnloaded
in interface SchemaLoaderListener
schema
- the Schema that was unloadedpublic java.util.Map<java.lang.String,Schema> getLoadedSchemas()
public java.util.Map<java.lang.String,java.util.Set<SchemaObjectWrapper>> getObjectBySchemaName()
public boolean contains(SchemaObject schemaObject)
schemaObject
- The schemaObject we are looking for
public java.util.Set<SchemaObjectWrapper> addSchema(java.lang.String schemaName)
schemaName
- The schema namepublic void associateWithSchema(java.util.List<java.lang.Throwable> errors, SchemaObject schemaObject)
schemaObject
- The schemaObject to register
LdapException
- If there is a problempublic void dissociateFromSchema(java.util.List<java.lang.Throwable> errors, SchemaObject schemaObject) throws LdapException
schemaObject
- The schemaObject to register
LdapException
- If there is a problempublic void dissociateFromSchema(SchemaObject schemaObject) throws LdapException
schemaObject
- The schemaObject to remove
LdapException
- If there is a problempublic boolean isReferenced(SchemaObject schemaObject)
schemaObject
- The SchemaObject we are looking for
public java.util.Set<SchemaObjectWrapper> getUsedBy(SchemaObject schemaObject)
schemaObject
- The SchemaObject we are looking for
public java.lang.String dumpUsedBy()
public java.lang.String dumpUsing()
public java.util.Set<SchemaObjectWrapper> getUsing(SchemaObject schemaObject)
schemaObject
- The SchemaObject we are looking for
public void addReference(SchemaObject base, SchemaObject referenced)
base
- The base SchemaObjectreferenced
- The referenced SchemaObjectpublic void delReference(SchemaObject base, SchemaObject referenced)
base
- The base SchemaObjectreferenced
- The referenced SchemaObjectpublic boolean check()
public Registries clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public boolean isRelaxed()
public boolean isStrict()
public void setRelaxed()
public void setStrict()
public boolean isDisabledAccepted()
public java.util.Set<SchemaObjectWrapper> getReferencing(SchemaObject schemaObject)
schemaObject
- The SchemaObject to remove
public void setDisabledAccepted(boolean disabledAccepted)
acceptDisabled
- If false
, then the Registries won't accept
disabled SchemaObject or enabled SchemaObject from disabled schemapublic void clear() throws LdapException
LdapException
- If something goes wrongpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |