directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Directory Server v1.5 > Syntax Registry
Date Mon, 23 Nov 2009 14:38:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=DIRxSRVx11&amp;forWysiwyg=true"
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><s>Syntax Registry</s></h2>
     <h4>Page <b>removed</b> by             <a href="">Emmanuel
     <div class="notificationGreySide">
         <div class='panelMacro'><table class='noteMacro'><colgroup><col
width='24'><col></colgroup><tr><td valign='top'><img src="/confluence/images/icons/emoticons/warning.gif"
width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Work
in progress</b><br /><p>This site is in the process of being reviewed and
<h1><a name="SyntaxRegistry-Introduction"></a>Introduction</h1>

<p>The <em><b>Syntax registry</b></em> is used to give an access
to attribute syntax checkers. Each time an attribute value is added or modified, it has to
be checked. </p>

<p>We have to go through tgis registry to get access to the correct checker function.</p>

<p>As we will have either the attribute's name or its <b>OID</b>, we should
find the correct syntax using the registry, which should know the relation between an attribute
OID and the used syntax.</p>

<h1><a name="SyntaxRegistry-Evolution"></a>Evolution</h1>

<p>In theory, we don't need at all to use a registry for that purpose. We already have
everything we need stored in each <b>AttributeType</b> objects, and we have a
way to access this object with either its name or <b>OID</b>, and the syntax checker
is stored within this object.</p>

<p>What we just need to do is to call the check() method this way :</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">  ...
  <span class="code-keyword">try</span>
      AttributeType attributeType = GlobalRegistry.getAttributeType( oid /* or name */ );
      attributeType.chec( attributeValue );
  <span class="code-keyword">catch</span> ( SyntaxException se )
      <span class="code-comment">// Handle the exception
</span>      ...

View raw message