| Work in progress This site is in the process of being reviewed and updated. |
Introduction
The Syntax registry is used to give an access to attribute syntax checkers. Each time an attribute value is added or modified, it has to be checked.
We have to go through tgis registry to get access to the correct checker function.
As we will have either the attribute's name or its OID, we should find the correct syntax using the registry, which should know the relation between an attribute OID and the used syntax.
Evolution
In theory, we don't need at all to use a registry for that purpose. We already have everything we need stored in each AttributeType objects, and we have a way to access this object with either its name or OID, and the syntax checker is stored within this object.
What we just need to do is to call the check() method this way :
... try { AttributeType attributeType = GlobalRegistry.getAttributeType( oid /* or name */ ); attributeType.chec( attributeValue ); } catch ( SyntaxException se ) { // Handle the exception ... } ...
.
