You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2016/06/15 12:30:01 UTC

svn commit: r1748572 [5/23] - in /directory/apacheds/branches/apacheds-value: ./ benchmarks/installers-maven-plugin/ benchmarks/installers-maven-plugin/.settings/ benchmarks/installers-maven-plugin/target/ benchmarks/installers-maven-plugin/target/clas...

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractChangeOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractChangeOperationContext.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractChangeOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractChangeOperationContext.java Wed Jun 15 12:29:57 2016
@@ -104,6 +104,7 @@ public abstract class AbstractChangeOper
     /**
      * @see org.apache.directory.server.core.api.interceptor.context.ChangeOperationContext#getChangeLogEvent()
      */
+    @Override
     public ChangeLogEvent getChangeLogEvent()
     {
         return changeLogEvent;
@@ -119,6 +120,7 @@ public abstract class AbstractChangeOper
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setLogChange( LogChange logChange )
     {
         this.logChange = logChange;
@@ -128,6 +130,7 @@ public abstract class AbstractChangeOper
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isLogChange()
     {
         return logChange != LogChange.FALSE;

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java Wed Jun 15 12:29:57 2016
@@ -53,10 +53,10 @@ public abstract class AbstractOperationC
     protected Entry originalEntry;
 
     /** The associated request's controls */
-    protected Map<String, Control> requestControls = new HashMap<String, Control>( 4 );
+    protected Map<String, Control> requestControls = new HashMap<>( 4 );
 
     /** The associated response's controls */
-    protected Map<String, Control> responseControls = new HashMap<String, Control>( 4 );
+    protected Map<String, Control> responseControls = new HashMap<>( 4 );
 
     /** the Interceptors bypassed by this operation */
     protected Collection<String> byPassed;
@@ -105,6 +105,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public CoreSession getSession()
     {
         return session;
@@ -132,6 +133,7 @@ public abstract class AbstractOperationC
     /**
      * @return The associated Dn
      */
+    @Override
     public Dn getDn()
     {
         return dn;
@@ -143,6 +145,7 @@ public abstract class AbstractOperationC
      *
      * @param dn The Dn to set
      */
+    @Override
     public void setDn( Dn dn )
     {
         this.dn = dn;
@@ -152,6 +155,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public void addRequestControl( Control requestControl )
     {
         requestControls.put( requestControl.getOid(), requestControl );
@@ -161,6 +165,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public Control getRequestControl( String numericOid )
     {
         return requestControls.get( numericOid );
@@ -170,6 +175,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean hasRequestControl( String numericOid )
     {
         return requestControls.containsKey( numericOid );
@@ -179,6 +185,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean hasRequestControls()
     {
         return !requestControls.isEmpty();
@@ -188,6 +195,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public void addResponseControl( Control responseControl )
     {
         responseControls.put( responseControl.getOid(), responseControl );
@@ -197,6 +205,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public Control getResponseControl( String numericOid )
     {
         return responseControls.get( numericOid );
@@ -206,6 +215,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean hasResponseControl( String numericOid )
     {
         return responseControls.containsKey( numericOid );
@@ -215,6 +225,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public Control[] getResponseControls()
     {
         if ( responseControls.isEmpty() )
@@ -229,6 +240,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean hasResponseControls()
     {
         return !responseControls.isEmpty();
@@ -238,6 +250,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public int getResponseControlCount()
     {
         return responseControls.size();
@@ -247,6 +260,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public void addRequestControls( Control[] requestControls )
     {
         for ( Control c : requestControls )
@@ -268,6 +282,7 @@ public abstract class AbstractOperationC
     /**
      * @return the operation name
      */
+    @Override
     public abstract String getName();
 
 
@@ -292,6 +307,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public final void setInterceptors( List<String> interceptors )
     {
         this.interceptors = interceptors;
@@ -301,6 +317,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public final String getNextInterceptor()
     {
         if ( currentInterceptor == interceptors.size() )
@@ -318,6 +335,7 @@ public abstract class AbstractOperationC
     /**
      * @return The number of the current interceptor in the list
      */
+    @Override
     public int getCurrentInterceptor()
     {
         return currentInterceptor;
@@ -329,6 +347,7 @@ public abstract class AbstractOperationC
      * 
      * @param currentInterceptor The new current interceptor value
      */
+    @Override
     public void setCurrentInterceptor( int currentInterceptor )
     {
         this.currentInterceptor = currentInterceptor;
@@ -344,6 +363,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public void delete( Dn dn ) throws LdapException
     {
         DeleteOperationContext deleteContext = new DeleteOperationContext( session, dn );
@@ -355,6 +375,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
         return session.getDirectoryService().getOperationManager().lookup( lookupContext );
@@ -365,6 +386,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public LookupOperationContext newLookupContext( Dn dn, String... attributes )
     {
         LookupOperationContext lookupContext = new LookupOperationContext( session, dn, attributes );
@@ -377,6 +399,7 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
+    @Override
     public LdapPrincipal getEffectivePrincipal()
     {
         if ( authorizedPrincipal != null )
@@ -394,6 +417,7 @@ public abstract class AbstractOperationC
     /**
      * @param entry the entry to set
      */
+    @Override
     public void setEntry( Entry entry )
     {
         this.entry = entry;
@@ -403,6 +427,7 @@ public abstract class AbstractOperationC
     /**
      * @return the entry
      */
+    @Override
     public Entry getEntry()
     {
         return entry;
@@ -412,6 +437,7 @@ public abstract class AbstractOperationC
     /**
      * Set the throwReferral flag to true
      */
+    @Override
     public void throwReferral()
     {
         throwReferral = true;
@@ -421,6 +447,7 @@ public abstract class AbstractOperationC
     /**
      * @return <code>true</code> if the referrals are thrown
      */
+    @Override
     public boolean isReferralThrown()
     {
         return throwReferral;
@@ -430,6 +457,7 @@ public abstract class AbstractOperationC
     /**
      * Set the throwReferral flag to false
      */
+    @Override
     public void ignoreReferral()
     {
         throwReferral = false;
@@ -439,6 +467,7 @@ public abstract class AbstractOperationC
     /**
      * @return <code>true</code> if the referrals are ignored
      */
+    @Override
     public boolean isReferralIgnored()
     {
         return !throwReferral;

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java Wed Jun 15 12:29:57 2016
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.api.interceptor.context;
 
 
-import org.apache.directory.api.ldap.model.entry.BinaryValue;
 import org.apache.directory.api.ldap.model.entry.Value;
 import org.apache.directory.api.ldap.model.message.CompareRequest;
 import org.apache.directory.api.ldap.model.message.MessageTypeEnum;
@@ -47,7 +46,7 @@ public class CompareOperationContext ext
     private AttributeType attributeType;
 
     /** The value to be compared */
-    private Value<?> value;
+    private Value value;
 
 
     /**
@@ -121,7 +120,7 @@ public class CompareOperationContext ext
      * Creates a new instance of LookupOperationContext.
      *
      */
-    public CompareOperationContext( CoreSession session, Dn dn, String oid, Value<?> value )
+    public CompareOperationContext( CoreSession session, Dn dn, String oid, Value value )
     {
         super( session, dn );
         this.oid = oid;
@@ -179,7 +178,7 @@ public class CompareOperationContext ext
     /**
      * @return The value to compare
      */
-    public Value<?> getValue()
+    public Value getValue()
     {
         return value;
     }
@@ -189,7 +188,7 @@ public class CompareOperationContext ext
      * Set the value to compare
      * @param value The value to compare
      */
-    public void setValue( Value<?> value )
+    public void setValue( Value value )
     {
         this.value = value;
     }
@@ -234,9 +233,9 @@ public class CompareOperationContext ext
             + ( ( value != null ) 
                 ? ", value :'"
                     + ( ( value.isHumanReadable() )
-                        ? value.getString()
+                        ? value.getValue()
                         : ( ( !value.isHumanReadable() )
-                            ? Strings.dumpBytes( ( ( BinaryValue ) value ).getReference() )
+                            ? Strings.dumpBytes( value.getBytes() )
                             : "unknown value type" ) )
                 + "'"
                 : "" );

Added: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModDnAva.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModDnAva.java?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModDnAva.java (added)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ModDnAva.java Wed Jun 15 12:29:57 2016
@@ -0,0 +1,89 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+package org.apache.directory.server.core.api.interceptor.context;
+
+import org.apache.directory.api.ldap.model.name.Ava;
+
+/**
+ * A class used to hold the RDN changed during a Rename or a MoveAndRename operation.
+ * We store and AVA that is part of the oldRDN or the new RDN in an instance of this class.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class ModDnAva
+{
+    /** The type of modification */
+    public enum ModDnType
+    {
+        ADD,            // for added AttributeTypes 
+        UPDATE_ADD,     // for attributeTypes present in both Rdn but with a different value 
+        UPDATE_DELETE,  // for attributeTypes present in 
+        DELETE          // for deleted attributeTypes
+    }
+    
+    /** The type of modification applied on this AVA */
+    private ModDnType type;
+    
+    /** The added or removed Ava */
+    private Ava ava;
+
+    /**
+     * Creates a new instance of a ModDnAva
+     * @param type The type of modification
+     * @param ava The AVA to store
+     */
+    public ModDnAva( ModDnType type, Ava ava )
+    {
+        this.type = type;
+        this.ava = ava;
+    }
+    
+    
+    /**
+     * @return the ava
+     */
+    public Ava getAva()
+    {
+        return ava;
+    }
+    
+    
+    /**
+     * @return the modification type
+     */
+    public ModDnType getType()
+    {
+        return type;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( '<' ).append( type ).append( ',' ).append( ava ).append( '>' );
+        
+        return sb.toString();
+    }
+}

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java Wed Jun 15 12:29:57 2016
@@ -20,6 +20,9 @@
 package org.apache.directory.server.core.api.interceptor.context;
 
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.api.ldap.model.message.ModifyDnRequest;
 import org.apache.directory.api.ldap.model.message.controls.ManageDsaIT;
@@ -41,6 +44,8 @@ public class MoveAndRenameOperationConte
     /** The new superior Dn */
     private Dn newSuperiorDn;
 
+    /** The map of modified AVAs */
+    private Map<String, List<ModDnAva>> modifiedAvas;
 
     /**
      * Creates a new instance of MoveAndRenameOperationContext.
@@ -89,7 +94,19 @@ public class MoveAndRenameOperationConte
     {
         // super sets the newRdn and the delOldRdn members and tests
         super( session, modifyDnRequest );
-        this.newSuperiorDn = modifyDnRequest.getNewSuperior();
+        newSuperiorDn = modifyDnRequest.getNewSuperior();
+        
+        if ( !newSuperiorDn.isSchemaAware() )
+        {
+            try
+            {
+                newSuperiorDn = new Dn( session.getDirectoryService().getSchemaManager(), newSuperiorDn );
+            }
+            catch ( LdapInvalidDnException lide )
+            {
+                throw new IllegalStateException( I18n.err( I18n.ERR_325, modifyDnRequest ), lide );
+            }
+        }
 
         if ( session != null )
         {
@@ -112,11 +129,11 @@ public class MoveAndRenameOperationConte
 
         try
         {
-            newDn = newSuperiorDn.add( newRdn ).apply( session.getDirectoryService().getSchemaManager() );
+            newDn = newSuperiorDn.add( newRdn );
         }
         catch ( LdapInvalidDnException lide )
         {
-            throw new IllegalStateException( I18n.err( I18n.ERR_325, modifyDnRequest ) );
+            throw new IllegalStateException( I18n.err( I18n.ERR_325, modifyDnRequest ), lide );
         }
     }
 
@@ -144,8 +161,27 @@ public class MoveAndRenameOperationConte
     /**
      * @see Object#toString()
      */
+    @Override
     public String toString()
     {
         return "ReplaceContext for old Dn '" + getDn().getName() + "' : " + newDn;
     }
+
+
+    /**
+     * @return the modifiedAvas
+     */
+    public Map<String, List<ModDnAva>> getModifiedAvas()
+    {
+        return modifiedAvas;
+    }
+
+
+    /**
+     * @param modifiedAvas the modifiedAvas to set
+     */
+    public void setModifiedAvas( Map<String, List<ModDnAva>> modifiedAvas )
+    {
+        this.modifiedAvas = modifiedAvas;
+    }
 }

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveOperationContext.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveOperationContext.java Wed Jun 15 12:29:57 2016
@@ -74,7 +74,7 @@ public class MoveOperationContext extend
         super( session, oldDn );
         this.newSuperior = newSuperior;
         oldSuperior = oldDn.getParent();
-        rdn = ( oldDn.getRdn().clone() );
+        rdn = oldDn.getRdn().clone();
 
         if ( session != null )
         {
@@ -124,7 +124,7 @@ public class MoveOperationContext extend
         }
 
         oldSuperior = modifyDnRequest.getName().getParent();
-        rdn = ( modifyDnRequest.getName().getRdn().clone() );
+        rdn = modifyDnRequest.getName().getRdn().clone();
 
         try
         {
@@ -147,6 +147,15 @@ public class MoveOperationContext extend
 
 
     /**
+     * @param oldSuperior the oldSuperior to set
+     */
+    public void setOldSuperior( Dn oldSuperior )
+    {
+        this.oldSuperior = oldSuperior;
+    }
+
+
+    /**
      *  @return The newSuperior Dn
      */
     public Dn getNewSuperior()
@@ -156,6 +165,15 @@ public class MoveOperationContext extend
 
 
     /**
+     * @param newSuperior the newSuperior to set
+     */
+    public void setNewSuperior( Dn newSuperior )
+    {
+        this.newSuperior = newSuperior;
+    }
+
+
+    /**
      *  @return The Rdn
      */
     public Rdn getRdn()
@@ -165,6 +183,15 @@ public class MoveOperationContext extend
 
 
     /**
+     * @param rdn the rdn to set
+     */
+    public void setRdn( Rdn rdn )
+    {
+        this.rdn = rdn;
+    }
+
+
+    /**
      *  @return The new Dn
      */
     public Dn getNewDn()
@@ -174,8 +201,18 @@ public class MoveOperationContext extend
 
 
     /**
+     * @param newDn the newDn to set
+     */
+    public void setNewDn( Dn newDn )
+    {
+        this.newDn = newDn;
+    }
+
+
+    /**
      * @return the operation name
      */
+    @Override
     public String getName()
     {
         return MessageTypeEnum.MODIFYDN_REQUEST.name();
@@ -185,6 +222,7 @@ public class MoveOperationContext extend
     /**
      * @see Object#toString()
      */
+    @Override
     public String toString()
     {
         return "ReplaceContext for old Dn '" + getDn().getName() + "'" + ", newSuperior '" + newSuperior + "'";

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/normalization/FilterNormalizingVisitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/normalization/FilterNormalizingVisitor.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/normalization/FilterNormalizingVisitor.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/normalization/FilterNormalizingVisitor.java Wed Jun 15 12:29:57 2016
@@ -23,7 +23,6 @@ package org.apache.directory.server.core
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.api.ldap.model.entry.StringValue;
 import org.apache.directory.api.ldap.model.entry.Value;
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.filter.AndNode;
@@ -37,6 +36,9 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.filter.SimpleNode;
 import org.apache.directory.api.ldap.model.filter.SubstringNode;
 import org.apache.directory.api.ldap.model.schema.AttributeType;
+import org.apache.directory.api.ldap.model.schema.MatchingRule;
+import org.apache.directory.api.ldap.model.schema.Normalizer;
+import org.apache.directory.api.ldap.model.schema.PrepareString.AssertionType;
 import org.apache.directory.api.ldap.model.schema.SchemaManager;
 import org.apache.directory.api.ldap.model.schema.normalizers.NameComponentNormalizer;
 import org.slf4j.Logger;
@@ -75,144 +77,27 @@ public class FilterNormalizingVisitor im
      * '\0' | '(' | ')' | '*' | '\'
      */
     private static final boolean[] FILTER_CHAR =
-        { true, false, false, false, false, false, false, false, // 00 -> 07 NULL
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 08 -> 0F
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 10 -> 17
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 18 -> 1F
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 20 -> 27
-            true,
-            true,
-            true,
-            false,
-            false,
-            false,
-            false,
-            false, // 28 -> 2F '(', ')', '*'
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 30 -> 37
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 38 -> 3F 
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 40 -> 47
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 48 -> 4F
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 50 -> 57
-            false,
-            false,
-            false,
-            false,
-            true,
-            false,
-            false,
-            false, // 58 -> 5F '\'
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 60 -> 67
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 68 -> 6F
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false, // 70 -> 77
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false,
-            false // 78 -> 7F
+        { 
+            true,  false, false, false, false, false, false, false, // 00 -> 07 NULL
+            false, false, false, false, false, false, false, false, // 08 -> 0F
+            false, false, false, false, false, false, false, false, // 10 -> 17
+            false, false, false, false, false, false, false, false, // 18 -> 1F
+            false, false, false, false, false, false, false, false, // 20 -> 27
+            true,  true,  true,  false, false, false, false, false, // 28 -> 2F '(', ')', '*'
+            false, false, false, false, false, false, false, false, // 30 -> 37
+            false, false, false, false, false, false, false, false, // 38 -> 3F 
+            false, false, false, false, false, false, false, false, // 40 -> 47
+            false, false, false, false, false, false, false, false, // 48 -> 4F
+            false, false, false, false, false, false, false, false, // 50 -> 57
+            false, false, false, false, true,  false, false, false, // 58 -> 5F '\'
+            false, false, false, false, false, false, false, false, // 60 -> 67
+            false, false, false, false, false, false, false, false, // 68 -> 6F
+            false, false, false, false, false, false, false, false, // 70 -> 77
+            false, false, false, false, false, false, false, false  // 78 -> 7F
     };
 
 
     /**
-     * Check if the given char is a filter escaped char
-     * &lt;filterEscapedChars&gt; ::= '\0' | '(' | ')' | '*' | '\'
-     *
-     * @param c the char we want to test
-     * @return true if the char is a pair char only
-     */
-    public static boolean isFilterChar( char c )
-    {
-        return ( ( ( c | 0x7F ) == 0x7F ) && FILTER_CHAR[c & 0x7f] );
-    }
-
-
-    /**
      * 
      * Creates a new instance of NormalizingVisitor.
      *
@@ -227,6 +112,19 @@ public class FilterNormalizingVisitor im
 
 
     /**
+     * Check if the given char is a filter escaped char
+     * &lt;filterEscapedChars&gt; ::= '\0' | '(' | ')' | '*' | '\'
+     *
+     * @param c the char we want to test
+     * @return true if the char is a pair char only
+     */
+    public static boolean isFilterChar( char c )
+    {
+        return ( ( c | 0x7F ) == 0x7F ) && FILTER_CHAR[c & 0x7f];
+    }
+
+
+    /**
      * A private method used to normalize a value. At this point, the value
      * is a Value<byte[]>, we have to translate it to a Value<String> if its
      * AttributeType is H-R. Then we have to normalize the value accordingly
@@ -236,20 +134,20 @@ public class FilterNormalizingVisitor im
      * @param value The value to normalize
      * @return the normalized value
      */
-    private Value<?> normalizeValue( AttributeType attributeType, Value<?> value )
+    private Value normalizeValue( AttributeType attributeType, Value value )
     {
         try
         {
-            Value<?> normalized = null;
+            Value normalized;
 
             if ( attributeType.getSyntax().isHumanReadable() )
             {
-                normalized = new StringValue(
-                    ( String ) ncn.normalizeByName( attributeType.getOid(), value.getString() ) );
+                normalized = new Value( attributeType, 
+                    ( String ) ncn.normalizeByName( attributeType.getOid(), value.getValue() ) );
             }
             else
             {
-                normalized = ( Value<?> ) ncn.normalizeByName( attributeType.getOid(), value.getBytes() );
+                normalized = ( Value ) ncn.normalizeByName( attributeType.getOid(), value.getBytes() );
             }
 
             return normalized;
@@ -306,10 +204,11 @@ public class FilterNormalizingVisitor im
                 return null;
             }
 
-            node.setAttributeType( schemaManager.lookupAttributeTypeRegistry( node.getAttribute() ) );
+            AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
+            node.setAttributeType( attributeType );
         }
 
-        Value<?> normalized = normalizeValue( node.getAttributeType(), node.getValue() );
+        Value normalized = normalizeValue( node.getAttributeType(), node.getValue() );
 
         if ( normalized == null )
         {
@@ -333,81 +232,59 @@ public class FilterNormalizingVisitor im
      */
     private ExprNode visitSubstringNode( SubstringNode node ) throws LdapException
     {
-        // still need this check here in case the top level is a leaf node
-        // with an undefined attributeType for its attribute
-        if ( !ncn.isDefined( node.getAttribute() ) )
-        {
-            return null;
-        }
-
-        node.setAttributeType( schemaManager.lookupAttributeTypeRegistry( node.getAttribute() ) );
-
-        Value<?> normInitial = null;
+        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
+        MatchingRule substringMR = attributeType.getSubstring();
+        
+        if ( ( substringMR == null ) || ( substringMR.getNormalizer() == null ) )
+        {
+            // No normalizer for a Substring filter
+            return node;
+        }
+        
+        Normalizer normalizer = substringMR.getNormalizer();
+        node.setAttributeType( attributeType );
 
         if ( node.getInitial() != null )
         {
-            normInitial = normalizeValue( node.getAttributeType(), new StringValue( node.getInitial() ) );
+            String normalizedInitial = normalizer.normalize( node.getInitial(), AssertionType.SUBSTRING_INITIAL );
 
-            if ( normInitial == null )
-            {
-                return null;
-            }
+            node.setInitial( normalizedInitial );
         }
 
         List<String> normAnys = null;
 
-        if ( ( node.getAny() != null ) && ( node.getAny().size() != 0 ) )
+        if ( ( node.getAny() != null ) && ( !node.getAny().isEmpty() ) )
         {
-            normAnys = new ArrayList<String>( node.getAny().size() );
+            normAnys = new ArrayList<>( node.getAny().size() );
 
             for ( String any : node.getAny() )
             {
-                Value<?> normAny = normalizeValue( node.getAttributeType(), new StringValue( any ) );
+                String normalizedAny = normalizer.normalize( any, AssertionType.SUBSTRING_ANY );
 
-                if ( normAny != null )
+                if ( normalizedAny != null )
                 {
-                    normAnys.add( normAny.getString() );
+                    normAnys.add( normalizedAny );
                 }
             }
 
-            if ( normAnys.size() == 0 )
+            if ( normAnys.isEmpty() )
             {
                 return null;
             }
         }
 
-        Value<?> normFinal = null;
-
         if ( node.getFinal() != null )
         {
-            normFinal = normalizeValue( node.getAttributeType(), new StringValue( node.getFinal() ) );
+            String normalizedFinal = normalizer.normalize( node.getFinal(), AssertionType.SUBSTRING_FINAL );
 
-            if ( normFinal == null )
+            if ( normalizedFinal != null )
             {
-                return null;
+                node.setFinal( normalizedFinal );
             }
         }
 
-        if ( normInitial != null )
-        {
-            node.setInitial( normInitial.getString() );
-        }
-        else
-        {
-            node.setInitial( null );
-        }
-
         node.setAny( normAnys );
 
-        if ( normFinal != null )
-        {
-            node.setFinal( normFinal.getString() );
-        }
-        else
-        {
-            node.setFinal( null );
-        }
-
         return node;
     }
 
@@ -464,16 +341,18 @@ public class FilterNormalizingVisitor im
             }
             else if ( result instanceof BranchNode )
             {
-                List<ExprNode> newChildren = new ArrayList<ExprNode>( 1 );
+                List<ExprNode> newChildren = new ArrayList<>( 1 );
                 newChildren.add( result );
                 node.setChildren( newChildren );
+                
                 return node;
             }
             else if ( result instanceof LeafNode )
             {
-                List<ExprNode> newChildren = new ArrayList<ExprNode>( 1 );
+                List<ExprNode> newChildren = new ArrayList<>( 1 );
                 newChildren.add( result );
                 node.setChildren( newChildren );
+                
                 return node;
             }
         }
@@ -486,7 +365,7 @@ public class FilterNormalizingVisitor im
             // For AND and OR, we may have more than one children.
             // We may have to remove some of them, so let's create
             // a new handler to store the correct nodes.
-            List<ExprNode> newChildren = new ArrayList<ExprNode>( children.size() );
+            List<ExprNode> newChildren = new ArrayList<>( children.size() );
 
             // Now, iterate through all the children
             for ( int i = 0; i < children.size(); i++ )
@@ -508,7 +387,7 @@ public class FilterNormalizingVisitor im
                 return null;
             }
 
-            if ( newChildren.size() == 0 )
+            if ( newChildren.isEmpty() )
             {
                 // No more children, return null
                 return null;
@@ -547,6 +426,7 @@ public class FilterNormalizingVisitor im
      * @param node the node to visit
      * @return the visited node
      */
+    @Override
     public Object visit( ExprNode node )
     {
         try
@@ -598,18 +478,30 @@ public class FilterNormalizingVisitor im
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public boolean canVisit( ExprNode node )
     {
         return true;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public boolean isPrefix()
     {
         return false;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public List<ExprNode> getOrder( BranchNode node, List<ExprNode> children )
     {
         return children;

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/partition/AbstractPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/partition/AbstractPartition.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/partition/AbstractPartition.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/partition/AbstractPartition.java Wed Jun 15 12:29:57 2016
@@ -76,6 +76,7 @@ public abstract class AbstractPartition
     /**
      * {@inheritDoc}
      */
+    @Override
     public void initialize() throws LdapException
     {
         if ( initialized )
@@ -113,6 +114,7 @@ public abstract class AbstractPartition
     /**
      * {@inheritDoc}
      */
+    @Override
     public void repair() throws Exception
     {
         // Do nothing. It will be handled by the implementation classes
@@ -146,6 +148,7 @@ public abstract class AbstractPartition
      * and clears default properties.  Once this method is invoked, {@link #isInitialized()}
      * will return <tt>false</tt>.
      */
+    @Override
     public final void destroy() throws Exception
     {
         try
@@ -162,6 +165,7 @@ public abstract class AbstractPartition
     /**
      * {@inheritDoc}
      */
+    @Override
     public final boolean isInitialized()
     {
         return initialized;
@@ -171,6 +175,7 @@ public abstract class AbstractPartition
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setSchemaManager( SchemaManager schemaManager )
     {
         this.schemaManager = schemaManager;
@@ -180,6 +185,7 @@ public abstract class AbstractPartition
     /**
      * {@inheritDoc}
      */
+    @Override
     public final SchemaManager getSchemaManager()
     {
         return schemaManager;
@@ -189,6 +195,7 @@ public abstract class AbstractPartition
     /**
      * {@inheritDoc}
      */
+    @Override
     public final String getId()
     {
         return id;
@@ -198,6 +205,7 @@ public abstract class AbstractPartition
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setId( String id )
     {
         checkInitialized( "id" );
@@ -208,6 +216,7 @@ public abstract class AbstractPartition
     /**
      * {@inheritDoc}
      */
+    @Override
     public final Dn getSuffixDn()
     {
         return suffixDn;
@@ -217,19 +226,26 @@ public abstract class AbstractPartition
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setSuffixDn( Dn suffixDn ) throws LdapInvalidDnException
     {
         checkInitialized( "suffixDn" );
 
-        this.suffixDn = suffixDn;
-
-        this.suffixDn.apply( schemaManager );
+        if ( suffixDn.isSchemaAware() )
+        {
+            this.suffixDn = suffixDn;
+        }
+        else
+        {
+            this.suffixDn = new Dn( schemaManager, this.suffixDn );
+        }
     }
 
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public void dumpIndex( OutputStream stream, String name ) throws IOException
     {
         stream.write( Strings.getBytesUtf8( "Nothing to dump for index " + name ) );

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java Wed Jun 15 12:29:57 2016
@@ -65,7 +65,7 @@ public interface PartitionNexus extends
      * @param attributeType The attribute type for which we want a value
      * @return the values associated with the given attributeType
      */
-    Value<?> getRootDseValue( AttributeType attributeType );
+    Value getRootDseValue( AttributeType attributeType );
 
 
     /**
@@ -83,7 +83,7 @@ public interface PartitionNexus extends
      * @param partitionDn the partition Dn
      * @throws Exception If the removal can't be done
      */
-    void removeContextPartition( Dn partitionDn ) throws LdapException;
+    void removeContextPartition( String partitionDn ) throws LdapException;
 
 
     /**

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/DescriptionParsers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/DescriptionParsers.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/DescriptionParsers.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/DescriptionParsers.java Wed Jun 15 12:29:57 2016
@@ -125,12 +125,12 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             try
             {
                 syntaxCheckerDescriptions[pos++] = syntaxCheckerParser
-                    .parseSyntaxCheckerDescription( value.getString() );
+                    .parseSyntaxCheckerDescription( value.getValue() );
             }
             catch ( ParseException e )
             {
@@ -157,17 +157,17 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             try
             {
-                normalizerDescriptions[pos++] = normalizerParser.parseNormalizerDescription( value.getString() );
+                normalizerDescriptions[pos++] = normalizerParser.parseNormalizerDescription( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_406,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }
@@ -188,17 +188,17 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             try
             {
-                comparatorDescriptions[pos++] = comparatorParser.parseComparatorDescription( value.getString() );
+                comparatorDescriptions[pos++] = comparatorParser.parseComparatorDescription( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_407,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }
@@ -227,19 +227,19 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             AttributeType attributeType = null;
 
             try
             {
-                attributeType = attributeTypeParser.parseAttributeTypeDescription( value.getString() );
+                attributeType = attributeTypeParser.parseAttributeTypeDescription( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_408,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }
@@ -310,19 +310,19 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             ObjectClass objectClass = null;
 
             try
             {
-                objectClass = objectClassParser.parseObjectClassDescription( value.getString() );
+                objectClass = objectClassParser.parseObjectClassDescription( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_417,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }
@@ -398,20 +398,20 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             MatchingRuleUse matchingRuleUse = null;
 
             try
             {
-                matchingRuleUse = matchingRuleUseParser.parseMatchingRuleUseDescription( value.getString() );
-                matchingRuleUse.setSpecification( value.getString() );
+                matchingRuleUse = matchingRuleUseParser.parseMatchingRuleUseDescription( value.getValue() );
+                matchingRuleUse.setSpecification( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_421,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }
@@ -442,20 +442,20 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             LdapSyntax ldapSyntax = null;
 
             try
             {
-                ldapSyntax = syntaxParser.parseLdapSyntaxDescription( value.getString() );
-                ldapSyntax.setSpecification( value.getString() );
+                ldapSyntax = syntaxParser.parseLdapSyntaxDescription( value.getValue() );
+                ldapSyntax.setSpecification( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_422,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }
@@ -494,20 +494,20 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             MatchingRule matchingRule = null;
 
             try
             {
-                matchingRule = matchingRuleParser.parseMatchingRuleDescription( value.getString() );
-                matchingRule.setSpecification( value.getString() );
+                matchingRule = matchingRuleParser.parseMatchingRuleDescription( value.getValue() );
+                matchingRule.setSpecification( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_424,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }
@@ -544,20 +544,20 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             DitStructureRule ditStructureRule = null;
 
             try
             {
-                ditStructureRule = ditStructureRuleParser.parseDITStructureRuleDescription( value.getString() );
-                ditStructureRule.setSpecification( value.getString() );
+                ditStructureRule = ditStructureRuleParser.parseDITStructureRuleDescription( value.getValue() );
+                ditStructureRule.setSpecification( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_426,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }
@@ -588,20 +588,20 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             DitContentRule ditContentRule = null;
 
             try
             {
-                ditContentRule = ditContentRuleParser.parseDITContentRuleDescription( value.getString() );
-                ditContentRule.setSpecification( value.getString() );
+                ditContentRule = ditContentRuleParser.parseDITContentRuleDescription( value.getValue() );
+                ditContentRule.setSpecification( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_427,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }
@@ -632,20 +632,20 @@ public class DescriptionParsers
 
         int pos = 0;
 
-        for ( Value<?> value : attr )
+        for ( Value value : attr )
         {
             NameForm nameForm = null;
 
             try
             {
-                nameForm = nameFormParser.parseNameFormDescription( value.getString() );
-                nameForm.setSpecification( value.getString() );
+                nameForm = nameFormParser.parseNameFormDescription( value.getValue() );
+                nameForm.setSpecification( value.getValue() );
             }
             catch ( ParseException e )
             {
                 LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
                     ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_428,
-                        value.getString() ) );
+                        value.getValue() ) );
                 iave.initCause( e );
                 throw iave;
             }

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AbstractRegistrySynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AbstractRegistrySynchronizer.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AbstractRegistrySynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AbstractRegistrySynchronizer.java Wed Jun 15 12:29:57 2016
@@ -43,6 +43,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.schema.SchemaObjectWrapper;
 import org.apache.directory.api.ldap.model.schema.registries.Schema;
 import org.apache.directory.api.ldap.schema.loader.SchemaEntityFactory;
+import org.apache.directory.api.util.Strings;
 import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.i18n.I18n;
 import org.slf4j.Logger;
@@ -69,7 +70,7 @@ public abstract class AbstractRegistrySy
     protected final SchemaEntityFactory factory;
 
     /** A map associating a SchemaObject type with its path on the partition*/
-    private static final Map<String, String> OBJECT_TYPE_TO_PATH = new HashMap<String, String>();
+    private static final Map<String, String> OBJECT_TYPE_TO_PATH = new HashMap<>();
 
     static
     {
@@ -134,7 +135,7 @@ public abstract class AbstractRegistrySy
     {
         Schema schema = schemaManager.getLoadedSchema( schemaName );
 
-        return ( ( schema != null ) && schema.isEnabled() );
+        return ( schema != null ) && schema.isEnabled();
     }
 
 
@@ -161,7 +162,7 @@ public abstract class AbstractRegistrySy
 
         Rdn rdn = dn.getRdn( size - 2 );
 
-        return rdn.getNormValue();
+        return Strings.trim( rdn.getAva().getValue().getNormalized() );
     }
 
 
@@ -215,7 +216,7 @@ public abstract class AbstractRegistrySy
                 I18n.err( I18n.ERR_338, objectType ) );
         }
 
-        if ( !rdn.getNormValue().equalsIgnoreCase( OBJECT_TYPE_TO_PATH.get( objectType ) ) )
+        if ( !rdn.getValue().equalsIgnoreCase( OBJECT_TYPE_TO_PATH.get( objectType ) ) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
                 I18n.err( I18n.ERR_339, objectType, OBJECT_TYPE_TO_PATH.get( objectType ) ) );
@@ -323,18 +324,19 @@ public abstract class AbstractRegistrySy
     /**
      * {@inheritDoc}
      */
+    @Override
     public abstract boolean modify( ModifyOperationContext modifyContext, Entry targetEntry, boolean cascade )
         throws LdapException;
 
 
     protected Set<String> getOids( Set<Entry> results ) throws Exception
     {
-        Set<String> oids = new HashSet<String>( results.size() );
+        Set<String> oids = new HashSet<>( results.size() );
 
         for ( Entry result : results )
         {
             Dn dn = result.getDn();
-            oids.add( dn.getRdn().getNormValue() );
+            oids.add( dn.getRdn().getValue() );
         }
 
         return oids;

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AttributeTypeSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AttributeTypeSynchronizer.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AttributeTypeSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/AttributeTypeSynchronizer.java Wed Jun 15 12:29:57 2016
@@ -65,6 +65,7 @@ public class AttributeTypeSynchronizer e
     /**
      * {@inheritDoc}
      */
+    @Override
     public void add( Entry entry ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -112,6 +113,7 @@ public class AttributeTypeSynchronizer e
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean modify( ModifyOperationContext modifyContext, Entry targetEntry, boolean cascade )
         throws LdapException
     {
@@ -141,6 +143,7 @@ public class AttributeTypeSynchronizer e
     /**
      * {@inheritDoc}
      */
+    @Override
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -192,6 +195,7 @@ public class AttributeTypeSynchronizer e
     /**
      * {@inheritDoc}
      */
+    @Override
     public void rename( Entry entry, Rdn newRdn, boolean cascade ) throws LdapException
     {
         String schemaName = getSchemaName( entry.getDn() );
@@ -199,8 +203,8 @@ public class AttributeTypeSynchronizer e
             .getAttributeType( schemaManager, entry, schemaManager.getRegistries(), schemaName );
 
         // Inject the new OID
-        Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = newRdn.getNormValue();
+        Entry targetEntry =  entry.clone();
+        String newOid = newRdn.getValue();
         checkOidIsUnique( newOid );
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
 
@@ -233,6 +237,10 @@ public class AttributeTypeSynchronizer e
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void moveAndRename( Dn oriChildName, Dn newParentName, Rdn newRn, boolean deleteOldRn,
         Entry entry, boolean cascade ) throws LdapException
     {
@@ -241,8 +249,8 @@ public class AttributeTypeSynchronizer e
         String newSchemaName = getSchemaName( newParentName );
         AttributeType oldAt = factory.getAttributeType( schemaManager, entry, schemaManager.getRegistries(),
             oldSchemaName );
-        Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = newRn.getNormValue();
+        Entry targetEntry = entry.clone();
+        String newOid = newRn.getValue();
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
         checkOidIsUnique( newOid );
         AttributeType newAt = factory.getAttributeType( schemaManager, targetEntry, schemaManager.getRegistries(),
@@ -285,6 +293,10 @@ public class AttributeTypeSynchronizer e
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void move( Dn oriChildName, Dn newParentName, Entry entry, boolean cascade ) throws LdapException
     {
         checkParent( newParentName, schemaManager, SchemaConstants.ATTRIBUTE_TYPE );

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ComparatorSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ComparatorSynchronizer.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ComparatorSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ComparatorSynchronizer.java Wed Jun 15 12:29:57 2016
@@ -70,6 +70,7 @@ public class ComparatorSynchronizer exte
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean modify( ModifyOperationContext modifyContext, Entry targetEntry, boolean cascade )
         throws LdapException
     {
@@ -97,6 +98,7 @@ public class ComparatorSynchronizer exte
     /**
      * {@inheritDoc}
      */
+    @Override
     public void add( Entry entry ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -144,6 +146,7 @@ public class ComparatorSynchronizer exte
     /**
      * {@inheritDoc}
      */
+    @Override
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -171,7 +174,7 @@ public class ComparatorSynchronizer exte
 
         try
         {
-            comparator = ( LdapComparator<?> ) checkComparatorOidExists( entry );
+            comparator = checkComparatorOidExists( entry );
         }
         catch ( LdapSchemaViolationException lsve )
         {
@@ -195,7 +198,7 @@ public class ComparatorSynchronizer exte
             }
         }
 
-        List<Throwable> errors = new ArrayList<Throwable>();
+        List<Throwable> errors = new ArrayList<>();
 
         if ( schema.isEnabled() && comparator.isEnabled() )
         {
@@ -221,6 +224,7 @@ public class ComparatorSynchronizer exte
     /**
      * {@inheritDoc}
      */
+    @Override
     public void rename( Entry entry, Rdn newRdn, boolean cascade ) throws LdapException
     {
         String oldOid = getOid( entry );
@@ -231,7 +235,7 @@ public class ComparatorSynchronizer exte
                 I18n.err( I18n.ERR_353, oldOid ) );
         }
 
-        String oid = newRdn.getNormValue();
+        String oid = newRdn.getValue();
         checkOidIsUniqueForComparator( oid );
 
         String schemaName = getSchemaName( entry.getDn() );
@@ -239,8 +243,8 @@ public class ComparatorSynchronizer exte
         if ( isSchemaEnabled( schemaName ) )
         {
             // Inject the new OID in the entry
-            Entry targetEntry = ( Entry ) entry.clone();
-            String newOid = newRdn.getNormValue();
+            Entry targetEntry = entry.clone();
+            String newOid = newRdn.getValue();
             checkOidIsUnique( newOid );
             targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
 
@@ -258,6 +262,10 @@ public class ComparatorSynchronizer exte
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void moveAndRename( Dn oriChildName, Dn newParentName, Rdn newRdn, boolean deleteOldRn,
         Entry entry, boolean cascade ) throws LdapException
     {
@@ -270,7 +278,7 @@ public class ComparatorSynchronizer exte
                 I18n.err( I18n.ERR_353, oldOid ) );
         }
 
-        String oid = newRdn.getNormValue();
+        String oid = newRdn.getValue();
         checkOidIsUniqueForComparator( oid );
 
         String newSchemaName = getSchemaName( newParentName );
@@ -292,6 +300,10 @@ public class ComparatorSynchronizer exte
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void move( Dn oriChildName, Dn newParentName, Entry entry, boolean cascade ) throws LdapException
     {
         checkNewParent( newParentName );
@@ -354,7 +366,7 @@ public class ComparatorSynchronizer exte
 
         if ( schemaManager.getComparatorRegistry().contains( oid ) )
         {
-            return ( LdapComparator<?> ) schemaManager.getComparatorRegistry().get( oid );
+            return schemaManager.getComparatorRegistry().get( oid );
         }
         else
         {
@@ -380,7 +392,7 @@ public class ComparatorSynchronizer exte
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err( I18n.ERR_358 ) );
         }
 
-        if ( !rdn.getNormValue().equalsIgnoreCase( SchemaConstants.COMPARATORS_AT ) )
+        if ( !rdn.getValue().equalsIgnoreCase( SchemaConstants.COMPARATORS_AT ) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err( I18n.ERR_359 ) );
         }

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/MatchingRuleSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/MatchingRuleSynchronizer.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/MatchingRuleSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/MatchingRuleSynchronizer.java Wed Jun 15 12:29:57 2016
@@ -66,6 +66,7 @@ public class MatchingRuleSynchronizer ex
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean modify( ModifyOperationContext modifyContext, Entry targetEntry, boolean cascade )
         throws LdapException
     {
@@ -94,6 +95,7 @@ public class MatchingRuleSynchronizer ex
     /**
      * {@inheritDoc}
      */
+    @Override
     public void add( Entry entry ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -141,6 +143,7 @@ public class MatchingRuleSynchronizer ex
     /**
      * {@inheritDoc}
      */
+    @Override
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -193,12 +196,13 @@ public class MatchingRuleSynchronizer ex
     /**
      * {@inheritDoc}
      */
+    @Override
     public void rename( Entry entry, Rdn newRdn, boolean cascade ) throws LdapException
     {
         String schemaName = getSchemaName( entry.getDn() );
         MatchingRule oldMr = factory.getMatchingRule( schemaManager, entry, schemaManager.getRegistries(), schemaName );
-        Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = newRdn.getNormValue();
+        Entry targetEntry = entry.clone();
+        String newOid = newRdn.getValue();
         checkOidIsUnique( newOid );
 
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
@@ -218,6 +222,10 @@ public class MatchingRuleSynchronizer ex
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void moveAndRename( Dn oriChildName, Dn newParentName, Rdn newRdn, boolean deleteOldRn,
         Entry entry, boolean cascade ) throws LdapException
     {
@@ -226,8 +234,8 @@ public class MatchingRuleSynchronizer ex
         String newSchemaName = getSchemaName( newParentName );
         MatchingRule oldMr = factory.getMatchingRule( schemaManager, entry, schemaManager.getRegistries(),
             oldSchemaName );
-        Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = newRdn.getNormValue();
+        Entry targetEntry = entry.clone();
+        String newOid = newRdn.getValue();
         checkOidIsUnique( newOid );
 
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
@@ -254,6 +262,10 @@ public class MatchingRuleSynchronizer ex
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void move( Dn oriChildName, Dn newParentName, Entry entry, boolean cascade ) throws LdapException
     {
         checkNewParent( newParentName );
@@ -301,7 +313,7 @@ public class MatchingRuleSynchronizer ex
                 I18n.err( I18n.ERR_362 ) );
         }
 
-        if ( !rdn.getNormValue().equalsIgnoreCase( SchemaConstants.MATCHING_RULES_AT ) )
+        if ( !rdn.getValue().equalsIgnoreCase( SchemaConstants.MATCHING_RULES_AT ) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
                 I18n.err( I18n.ERR_363 ) );

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/NormalizerSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/NormalizerSynchronizer.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/NormalizerSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/NormalizerSynchronizer.java Wed Jun 15 12:29:57 2016
@@ -69,6 +69,7 @@ public class NormalizerSynchronizer exte
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean modify( ModifyOperationContext modifyContext, Entry targetEntry, boolean cascade )
         throws LdapException
     {
@@ -96,6 +97,7 @@ public class NormalizerSynchronizer exte
     /**
      * {@inheritDoc}
      */
+    @Override
     public void add( Entry entry ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -116,7 +118,7 @@ public class NormalizerSynchronizer exte
         // existing Registries. It will be checked there, if the schema and the 
         // Normalizer are both enabled.
         Schema schema = schemaManager.getLoadedSchema( schemaName );
-        List<Throwable> errors = new ArrayList<Throwable>();
+        List<Throwable> errors = new ArrayList<>();
 
         if ( schema.isEnabled() && normalizer.isEnabled() )
         {
@@ -153,6 +155,7 @@ public class NormalizerSynchronizer exte
     /**
      * {@inheritDoc}
      */
+    @Override
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -196,6 +199,7 @@ public class NormalizerSynchronizer exte
     /**
      * {@inheritDoc}
      */
+    @Override
     public void rename( Entry entry, Rdn newRdn, boolean cascade ) throws LdapException
     {
         String oldOid = getOid( entry );
@@ -207,13 +211,13 @@ public class NormalizerSynchronizer exte
                 I18n.err( I18n.ERR_367, oldOid ) );
         }
 
-        String newOid = newRdn.getNormValue();
+        String newOid = newRdn.getValue();
         checkOidIsUniqueForNormalizer( newOid );
 
         if ( isSchemaEnabled( schemaName ) )
         {
             // Inject the new OID
-            Entry targetEntry = ( Entry ) entry.clone();
+            Entry targetEntry = entry.clone();
             targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
 
             // Inject the new Dn
@@ -229,6 +233,10 @@ public class NormalizerSynchronizer exte
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void moveAndRename( Dn oriChildName, Dn newParentName, Rdn newRdn, boolean deleteOldRn,
         Entry entry, boolean cascade ) throws LdapException
     {
@@ -243,7 +251,7 @@ public class NormalizerSynchronizer exte
                 I18n.err( I18n.ERR_367, oldOid ) );
         }
 
-        String oid = newRdn.getNormValue();
+        String oid = newRdn.getValue();
         checkOidIsUniqueForNormalizer( oid );
         Normalizer normalizer = factory.getNormalizer( schemaManager, entry, schemaManager.getRegistries(),
             newSchemaName );
@@ -260,6 +268,10 @@ public class NormalizerSynchronizer exte
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void move( Dn oriChildName, Dn newParentName, Entry entry, boolean cascade ) throws LdapException
     {
         checkNewParent( newParentName );
@@ -325,7 +337,7 @@ public class NormalizerSynchronizer exte
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err( I18n.ERR_371 ) );
         }
 
-        if ( !rdn.getNormValue().equalsIgnoreCase( SchemaConstants.NORMALIZERS_AT ) )
+        if ( !rdn.getValue().equalsIgnoreCase( SchemaConstants.NORMALIZERS_AT ) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err( I18n.ERR_372 ) );
         }

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ObjectClassSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ObjectClassSynchronizer.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ObjectClassSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/ObjectClassSynchronizer.java Wed Jun 15 12:29:57 2016
@@ -65,6 +65,7 @@ public class ObjectClassSynchronizer ext
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean modify( ModifyOperationContext modifyContext, Entry targetEntry, boolean cascade )
         throws LdapException
     {
@@ -90,6 +91,7 @@ public class ObjectClassSynchronizer ext
     /**
      * {@inheritDoc}
      */
+    @Override
     public void add( Entry entry ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -138,6 +140,7 @@ public class ObjectClassSynchronizer ext
     /**
      * {@inheritDoc}
      */
+    @Override
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         Dn dn = entry.getDn();
@@ -189,25 +192,14 @@ public class ObjectClassSynchronizer ext
     /**
      * {@inheritDoc}
      */
+    @Override
     public void rename( Entry entry, Rdn newRdn, boolean cascade ) throws LdapException
     {
         String schemaName = getSchemaName( entry.getDn() );
         ObjectClass oldOc = factory.getObjectClass( schemaManager, entry, schemaManager.getRegistries(), schemaName );
 
-        // Dependency constraints are not managed by this class
-        //        Set<Entry> dependees = dao.listObjectClassDependents( oldOc );
-        //        
-        //        if ( dependees != null && dependees.size() > 0 )
-        //        {
-        //            throw new LdapUnwillingToPerformException( "The objectClass with OID " + oldOc.getOid()
-        //                + " cannot be deleted until all entities" 
-        //                + " using this objectClass have also been deleted.  The following dependees exist: " 
-        //                + getOids( dependees ), 
-        //                ResultCodeEnum.UNWILLING_TO_PERFORM );
-        //        }
-
-        Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = newRdn.getNormValue();
+        Entry targetEntry = entry.clone();
+        String newOid = newRdn.getValue();
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
 
         // Inject the new Dn
@@ -238,6 +230,10 @@ public class ObjectClassSynchronizer ext
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void moveAndRename( Dn oriChildName, Dn newParentName, Rdn newRdn, boolean deleteOldRn,
         Entry entry, boolean cascade ) throws LdapException
     {
@@ -245,20 +241,9 @@ public class ObjectClassSynchronizer ext
         String oldSchemaName = getSchemaName( oriChildName );
         ObjectClass oldOc = factory.getObjectClass( schemaManager, entry, schemaManager.getRegistries(), oldSchemaName );
 
-        // this class does not handle dependencies
-        //        Set<Entry> dependees = dao.listObjectClassDependents( oldOc );
-        //        if ( dependees != null && dependees.size() > 0 )
-        //        {
-        //            throw new LdapUnwillingToPerformException( "The objectClass with OID " + oldOc.getOid()
-        //                + " cannot be deleted until all entities" 
-        //                + " using this objectClass have also been deleted.  The following dependees exist: " 
-        //                + getOids( dependees ), 
-        //                ResultCodeEnum.UNWILLING_TO_PERFORM );
-        //        }
-
         String newSchemaName = getSchemaName( newParentName );
-        Entry targetEntry = ( Entry ) entry.clone();
-        String newOid = newRdn.getNormValue();
+        Entry targetEntry = entry.clone();
+        String newOid = newRdn.getValue();
         checkOidIsUnique( newOid );
         targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
         ObjectClass oc = factory.getObjectClass( schemaManager, targetEntry, schemaManager.getRegistries(),
@@ -284,6 +269,10 @@ public class ObjectClassSynchronizer ext
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public void move( Dn oriChildName, Dn newParentName, Entry entry, boolean cascade ) throws LdapException
     {
         checkNewParent( newParentName );
@@ -291,17 +280,6 @@ public class ObjectClassSynchronizer ext
         String newSchemaName = getSchemaName( newParentName );
         ObjectClass oldAt = factory.getObjectClass( schemaManager, entry, schemaManager.getRegistries(), oldSchemaName );
 
-        // dependencies are not managed by this class
-        //        Set<Entry> dependees = dao.listObjectClassDependents( oldAt );
-        //        if ( dependees != null && dependees.size() > 0 )
-        //        {s
-        //            throw new LdapUnwillingToPerformException( "The objectClass with OID " + oldAt.getOid() 
-        //                + " cannot be deleted until all entities" 
-        //                + " using this objectClass have also been deleted.  The following dependees exist: " 
-        //                + getOids( dependees ), 
-        //                ResultCodeEnum.UNWILLING_TO_PERFORM );
-        //        }
-
         ObjectClass oc = factory.getObjectClass( schemaManager, entry, schemaManager.getRegistries(), newSchemaName );
 
         if ( isSchemaEnabled( oldSchemaName ) )
@@ -342,7 +320,7 @@ public class ObjectClassSynchronizer ext
                 I18n.err( I18n.ERR_376 ) );
         }
 
-        if ( !rdn.getNormValue().equalsIgnoreCase( SchemaConstants.OBJECT_CLASSES_AT ) )
+        if ( !rdn.getValue().equalsIgnoreCase( SchemaConstants.OBJECT_CLASSES_AT ) )
         {
             throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
                 I18n.err( I18n.ERR_377 ) );

Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java Wed Jun 15 12:29:57 2016
@@ -82,7 +82,7 @@ public class RegistrySynchronizerAdaptor
     private static final int DIT_CONTENT_RULE_INDEX = 9;
     private static final int NAME_FORM_INDEX = 10;
 
-    private static final Set<String> VALID_OU_VALUES = new HashSet<String>();
+    private static final Set<String> VALID_OU_VALUES = new HashSet<>();
     private static final String[] META_OBJECT_CLASSES = new String[]
         {
             MetaSchemaConstants.META_COMPARATOR_OC,
@@ -105,7 +105,7 @@ public class RegistrySynchronizerAdaptor
     private final AttributeType objectClassAT;
     
     private final RegistrySynchronizer[] registrySynchronizers = new RegistrySynchronizer[11];
-    private final Map<String, RegistrySynchronizer> objectClass2synchronizerMap = new HashMap<String, RegistrySynchronizer>();
+    private final Map<String, RegistrySynchronizer> objectClass2synchronizerMap = new HashMap<>();
     private final SchemaSynchronizer schemaSynchronizer;
 
     static
@@ -113,7 +113,7 @@ public class RegistrySynchronizerAdaptor
         VALID_OU_VALUES.add( Strings.toLowerCaseAscii( SchemaConstants.NORMALIZERS_AT ) );
         VALID_OU_VALUES.add( Strings.toLowerCaseAscii( SchemaConstants.COMPARATORS_AT ) );
         VALID_OU_VALUES.add( Strings.toLowerCaseAscii( SchemaConstants.SYNTAX_CHECKERS_AT ) );
-        VALID_OU_VALUES.add( Strings.toLowerCaseAscii( "syntaxes" ) );
+        VALID_OU_VALUES.add( Strings.toLowerCaseAscii( SchemaConstants.SYNTAXES ) );
         VALID_OU_VALUES.add( Strings.toLowerCaseAscii( SchemaConstants.MATCHING_RULES_AT ) );
         VALID_OU_VALUES.add( Strings.toLowerCaseAscii( SchemaConstants.MATCHING_RULE_USE_AT ) );
         VALID_OU_VALUES.add( Strings.toLowerCaseAscii( SchemaConstants.ATTRIBUTE_TYPES_AT ) );
@@ -163,10 +163,10 @@ public class RegistrySynchronizerAdaptor
         Attribute oc = addContext.getEntry().get( objectClassAT );
 
         // First check if we are adding a schemaObject
-        for ( Value<?> value : oc )
+        for ( Value value : oc )
         {
 
-            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getString() );
+            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getValue() );
 
             if ( objectClass2synchronizerMap.containsKey( oid ) )
             {
@@ -201,7 +201,7 @@ public class RegistrySynchronizerAdaptor
                 throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, msg );
             }
 
-            String ouValue = addContext.getDn().getRdn().getNormValue();
+            String ouValue = addContext.getDn().getRdn().getValue();
             ouValue = Strings.toLowerCaseAscii( Strings.trim( ouValue ) );
 
             if ( !VALID_OU_VALUES.contains( ouValue ) )
@@ -231,9 +231,9 @@ public class RegistrySynchronizerAdaptor
 
         Attribute oc = entry.get( objectClassAT );
 
-        for ( Value<?> value : oc )
+        for ( Value value : oc )
         {
-            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getString() );
+            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getValue() );
 
             if ( objectClass2synchronizerMap.containsKey( oid ) )
             {
@@ -256,7 +256,7 @@ public class RegistrySynchronizerAdaptor
                 throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_378 ) );
             }
 
-            String ouValue = deleteContext.getDn().getRdn().getNormValue();
+            String ouValue = deleteContext.getDn().getRdn().getValue();
             ouValue = Strings.toLowerCaseAscii( Strings.trim( ouValue ) );
 
             if ( !VALID_OU_VALUES.contains( ouValue ) )
@@ -286,22 +286,21 @@ public class RegistrySynchronizerAdaptor
         Entry entry = modifyContext.getEntry();
         Attribute oc = entry.get( objectClassAT );
 
-        for ( Value<?> value : oc )
+        for ( Value value : oc )
         {
-            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getString() );
+            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getValue() );
 
             if ( objectClass2synchronizerMap.containsKey( oid ) )
             {
                 RegistrySynchronizer synchronizer = objectClass2synchronizerMap.get( oid );
-                boolean hasModification = synchronizer.modify( modifyContext, targetEntry, doCascadeModify );
-                return hasModification;
+                
+                return synchronizer.modify( modifyContext, targetEntry, doCascadeModify );
             }
         }
 
         if ( oc.contains( MetaSchemaConstants.META_SCHEMA_OC ) )
         {
-            boolean hasModification = schemaSynchronizer.modify( modifyContext, targetEntry, doCascadeModify );
-            return hasModification;
+            return schemaSynchronizer.modify( modifyContext, targetEntry, doCascadeModify );
         }
 
         if ( oc.contains( ApacheSchemaConstants.SCHEMA_MODIFICATION_ATTRIBUTES_OC ) )
@@ -328,9 +327,9 @@ public class RegistrySynchronizerAdaptor
         Entry originalEntry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getOriginalEntry();
         Attribute oc = originalEntry.get( objectClassAT );
 
-        for ( Value<?> value : oc )
+        for ( Value value : oc )
         {
-            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getString() );
+            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getValue() );
 
             if ( objectClass2synchronizerMap.containsKey( oid ) )
             {
@@ -357,9 +356,9 @@ public class RegistrySynchronizerAdaptor
     {
         Attribute oc = entry.get( objectClassAT );
 
-        for ( Value<?> value : oc )
+        for ( Value value : oc )
         {
-            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getString() );
+            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getValue() );
 
             if ( objectClass2synchronizerMap.containsKey( oid ) )
             {
@@ -387,9 +386,9 @@ public class RegistrySynchronizerAdaptor
     {
         Attribute oc = entry.get( objectClassAT );
 
-        for ( Value<?> value : oc )
+        for ( Value value : oc )
         {
-            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getString() );
+            String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getValue() );
 
             if ( objectClass2synchronizerMap.containsKey( oid ) )
             {