directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1511167 - in /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries: Registries.java helper/DitStructureRuleHelper.java
Date Wed, 07 Aug 2013 04:21:30 GMT
Author: elecharny
Date: Wed Aug  7 04:21:30 2013
New Revision: 1511167

URL: http://svn.apache.org/r1511167
Log:
Added a missing element in the switch clause

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java?rev=1511167&r1=1511166&r2=1511167&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
Wed Aug  7 04:21:30 2013
@@ -55,6 +55,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.ldap.model.schema.registries.helper.AttributeTypeHelper;
 import org.apache.directory.api.ldap.model.schema.registries.helper.DitContentRuleHelper;
+import org.apache.directory.api.ldap.model.schema.registries.helper.DitStructureRuleHelper;
 import org.apache.directory.api.ldap.model.schema.registries.helper.LdapSyntaxHelper;
 import org.apache.directory.api.ldap.model.schema.registries.helper.MatchingRuleHelper;
 import org.apache.directory.api.ldap.model.schema.registries.helper.MatchingRuleUseHelper;
@@ -663,6 +664,10 @@ public class Registries implements Schem
                     DitContentRuleHelper.addToRegistries( ( DitContentRule ) schemaObject,
errors, this );
                     break;
 
+                case DIT_STRUCTURE_RULE:
+                    DitStructureRuleHelper.addToRegistries( ( DitStructureRule ) schemaObject,
errors, this );
+                    break;
+
                 case LDAP_SYNTAX:
                     LdapSyntaxHelper.addToRegistries( ( LdapSyntax ) schemaObject, errors,
this );
                     break;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java?rev=1511167&r1=1511166&r2=1511167&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java
Wed Aug  7 04:21:30 2013
@@ -20,6 +20,13 @@
 package org.apache.directory.api.ldap.model.schema.registries.helper;
 
 
+import java.util.List;
+
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.schema.DitStructureRule;
+import org.apache.directory.api.ldap.model.schema.registries.Registries;
+
+
 /**
  * An helper class used to store all the methods associated with an DitStructureRule
  * in relation with the Registries and SchemaManager.
@@ -28,4 +35,30 @@ package org.apache.directory.api.ldap.mo
  */
 public class DitStructureRuleHelper
 {
+    /**
+     * Inject the DitContentRule into the registries, updating the references to
+     * other SchemaObject
+     *
+     * @param ditStructureRule The DitStructureRule to add to the Registries
+     * @param errors The errors we got while adding the DitContentRule to the Registries
+     * @param registries The Registries
+     * @exception If the addition failed
+     */
+    public static void addToRegistries( DitStructureRule ditStructureRule, List<Throwable>
errors, Registries registries )
+        throws LdapException
+    {
+        if ( registries != null )
+        {
+            try
+            {
+                ditStructureRule.unlock();
+
+                // NOT YET IMPLEMENTED
+            }
+            finally
+            {
+                ditStructureRule.lock();
+            }
+        }
+    }
 }



Mime
View raw message