directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r411416 [1/3] - in /directory/branches/shared/optimization/ldap/src: main/antlr/ main/java/org/apache/directory/shared/ldap/codec/ main/java/org/apache/directory/shared/ldap/codec/add/ main/java/org/apache/directory/shared/ldap/codec/bind/ ...
Date Sat, 03 Jun 2006 10:07:54 GMT
Author: elecharny
Date: Sat Jun  3 03:07:50 2006
New Revision: 411416

URL: http://svn.apache.org/viewvc?rev=411416&view=rev
Log:
- Changed LdapName to LdapDN everywhere in code and tests
- Don't use Name anymore

Modified:
    directory/branches/shared/optimization/ldap/src/main/antlr/ACIItem.g
    directory/branches/shared/optimization/ldap/src/main/antlr/subtree-specification.g
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestGrammar.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryGrammar.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/EntryChangeControl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResult.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequest.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntry.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/BaseSubtreeSpecification.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecification.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationModifier.java
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserDIRSERVER_584_Test.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
    directory/branches/shared/optimization/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java

Modified: directory/branches/shared/optimization/ldap/src/main/antlr/ACIItem.g
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/antlr/ACIItem.g?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/antlr/ACIItem.g (original)
+++ directory/branches/shared/optimization/ldap/src/main/antlr/ACIItem.g Sat Jun  3 03:07:50 2006
@@ -30,7 +30,6 @@
 
 import javax.naming.directory.Attribute;
 import javax.naming.directory.BasicAttribute;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.ldap.filter.AbstractExprNode;
@@ -39,7 +38,6 @@
 import org.apache.directory.shared.ldap.filter.FilterParserImpl;
 import org.apache.directory.shared.ldap.filter.LeafNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
-import org.apache.directory.shared.ldap.name.DnParser;
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationModifier;
@@ -49,6 +47,8 @@
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 import org.apache.directory.shared.ldap.util.NoDuplicateKeysMap;
 import org.apache.directory.shared.ldap.util.OptionalComponentsMonitor;
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -98,7 +98,6 @@
     private static final Logger log = LoggerFactory.getLogger( AntlrACIItemParser.class );
     
     // subordinate parser instances
-    private DnParser dnParser;
     private final FilterParserImpl filterParser = new FilterParserImpl();
     
     private boolean isNormalizing = false;
@@ -141,26 +140,6 @@
      */
     public void init()
     {
-        try
-        {
-            if( isNormalizing )
-            {
-                dnParser = new DnParser( normalizer );
-            }
-            else
-            {
-                dnParser = new DnParser();
-            }
-        }
-        catch ( NamingException e )
-        {
-            String msg = "Failed to initialize the subordinate DnParser for this AntlrACIItemParser";
-
-            // We throw a NPE since this variable cannot be null for proper operation
-            // so we can catch the null pointer before the dnParser is even used.
-
-            throw new NullPointerException( "dnParser is null: " + msg );
-        }
     }
 
     /**
@@ -508,7 +487,7 @@
     {
         // A Dn can be considered as a set of attributeTypeAndValues
         // So, parse the set as a Dn and extract each attributeTypeAndValue
-        Name attributeTypeAndValueSetAsDn = dnParser.parse( token.getText() );
+        LdapDN attributeTypeAndValueSetAsDn = new LdapDN( token.getText() );
         Enumeration attributeTypeAndValueSet = attributeTypeAndValueSetAsDn.getAll();
         while ( attributeTypeAndValueSet.hasMoreElements() )
         {
@@ -891,7 +870,7 @@
 {
     log.debug( "entered name()" );
     Set l_name = new HashSet();
-    Name l_distinguishedName = null;
+    LdapDN l_distinguishedName = null;
 }
     :
     ID_name ( SP )+ 
@@ -914,7 +893,7 @@
 {
     log.debug( "entered userGroup()" );
     Set l_userGroup = new HashSet();
-    Name l_distinguishedName = null;
+    LdapDN l_distinguishedName = null;
 }
     :
     ID_userGroup ( SP )+ 
@@ -1075,7 +1054,7 @@
 ss_base
 {
     log.debug( "entered ss_base()" );
-    Name base = null;
+    LdapDN base = null;
 }
     :
     ID_base ( SP )+ base=distinguishedName
@@ -1119,7 +1098,7 @@
 chopBefore
 {
     log.debug( "entered chopBefore()" );
-    Name chopBeforeExclusion = null;
+    LdapDN chopBeforeExclusion = null;
 }
     :
     ID_chopBefore ( SP )* COLON ( SP )* chopBeforeExclusion=distinguishedName
@@ -1131,7 +1110,7 @@
 chopAfter
 {
     log.debug( "entered chopAfter()" );
-    Name chopAfterExclusion = null;
+    LdapDN chopAfterExclusion = null;
 }
     :
     ID_chopAfter ( SP )* COLON ( SP )* chopAfterExclusion=distinguishedName
@@ -1164,7 +1143,7 @@
     }
     ;
 
-distinguishedName returns [ Name name ] 
+distinguishedName returns [ LdapDN name ] 
 {
     log.debug( "entered distinguishedName()" );
     name = null;
@@ -1172,7 +1151,7 @@
     :
     token:SAFEUTF8STRING
     {
-        name = dnParser.parse( token.getText() );
+        name = new LdapDN( token.getText() );
         log.debug( "recognized a DistinguishedName: " + token.getText() );
     }
     ;

Modified: directory/branches/shared/optimization/ldap/src/main/antlr/subtree-specification.g
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/antlr/subtree-specification.g?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/antlr/subtree-specification.g (original)
+++ directory/branches/shared/optimization/ldap/src/main/antlr/subtree-specification.g Sat Jun  3 03:07:50 2006
@@ -24,10 +24,9 @@
 import java.util.HashSet;
 import java.util.ArrayList;
 
-import javax.naming.Name;
 import javax.naming.NamingException;
 
-import org.apache.directory.shared.ldap.name.DnParser;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.LeafNode;
@@ -75,7 +74,6 @@
 
 {
     private static final Logger log = LoggerFactory.getLogger( AntlrSubtreeSpecificationParser.class );
-    private DnParser dnParser;
     
     private boolean isNormalizing = false;
     private NameComponentNormalizer normalizer;
@@ -96,26 +94,6 @@
      */
     public void init()
     {
-        try
-        {
-            if( isNormalizing )
-            {
-                dnParser = new DnParser( normalizer );
-            }
-            else
-            {
-                dnParser = new DnParser();
-            }
-        }
-        catch ( NamingException e )
-        {
-            String msg = "Failed to initialize the subordinate DnParser for this AntlrSubtreeSpecificationParser";
-
-            // We throw a NPE since this variable cannot be null for proper operation
-            // so we can catch the null pointer before the dnParser is even used.
-
-            throw new NullPointerException( "dnParser is null: " + msg );
-        }
     }
 
     /**
@@ -218,7 +196,7 @@
 ss_base
 {
     log.debug( "entered ss_base()" );
-    Name base = null;
+    LdapDN base = null;
 }
     :
     ID_base ( SP )+ base=distinguishedName
@@ -262,7 +240,7 @@
 chopBefore
 {
     log.debug( "entered chopBefore()" );
-    Name chopBeforeExclusion = null;
+    LdapDN chopBeforeExclusion = null;
 }
     :
     ID_chopBefore ( SP )* COLON ( SP )* chopBeforeExclusion=distinguishedName
@@ -274,7 +252,7 @@
 chopAfter
 {
     log.debug( "entered chopAfter()" );
-    Name chopAfterExclusion = null;
+    LdapDN chopAfterExclusion = null;
 }
     :
     ID_chopAfter ( SP )* COLON ( SP )* chopAfterExclusion=distinguishedName
@@ -319,7 +297,7 @@
     }
     ;
     
-distinguishedName returns [ Name name ] 
+distinguishedName returns [ LdapDN name ] 
 {
     log.debug( "entered distinguishedName()" );
     name = null;
@@ -327,7 +305,7 @@
     :
     token:SAFEUTF8STRING
     {
-        name = dnParser.parse( token.getText() );
+        name = new LdapDN( token.getText() );
         log.debug( "recognized a DistinguishedName: " + token.getText() );
     }
     ;

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java Sat Jun  3 03:07:50 2006
@@ -21,7 +21,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.InvalidNameException;
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.BasicAttribute;
@@ -107,7 +106,6 @@
 import org.apache.directory.shared.ldap.message.extended.GracefulShutdownRequest;
 import org.apache.directory.shared.ldap.message.spi.Provider;
 import org.apache.directory.shared.ldap.message.spi.TransformerSpi;
-import org.apache.directory.shared.ldap.name.LdapDN;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -213,7 +211,7 @@
         // Twix : int version -> Snickers : boolean isVersion3
         snickersMessage.setVersion3( bindRequest.isLdapV3() );
 
-        // Twix : LdapDN name -> Snickers : String name
+        // Twix : LdapDN name -> Snickers : LdapDN name
         snickersMessage.setName( bindRequest.getName() );
 
         // Twix : Asn1Object authentication instanceOf SimpleAuthentication ->
@@ -253,7 +251,7 @@
         CompareRequestImpl snickersMessage = new CompareRequestImpl( messageId );
         CompareRequest compareRequest = twixMessage.getCompareRequest();
 
-        // Twix : LdapDN entry -> Snickers : private String name
+        // Twix : LdapDN entry -> Snickers : private LdapDN
         snickersMessage.setName( compareRequest.getEntry() );
 
         // Twix : LdapString attributeDesc -> Snickers : String attrId
@@ -287,7 +285,7 @@
         DeleteRequestImpl snickersMessage = new DeleteRequestImpl( messageId );
         DelRequest delRequest = twixMessage.getDelRequest();
 
-        // Twix : LdapDN entry -> Snickers : String name
+        // Twix : LdapDN entry -> Snickers : LdapDN
         snickersMessage.setName( delRequest.getEntry() );
 
         return snickersMessage;
@@ -343,16 +341,16 @@
         ModifyDnRequestImpl snickersMessage = new ModifyDnRequestImpl( messageId );
         ModifyDNRequest modifyDNRequest = twixMessage.getModifyDNRequest();
 
-        // Twix : LdapDN entry -> Snickers : String m_name
+        // Twix : LdapDN entry -> Snickers : LdapDN m_name
         snickersMessage.setName( modifyDNRequest.getEntry() );
 
-        // Twix : RelativeLdapDN newRDN -> Snickers : String m_newRdn
+        // Twix : RelativeLdapDN newRDN -> Snickers : LdapDN m_newRdn
         snickersMessage.setNewRdn( modifyDNRequest.getNewRDN() );
 
         // Twix : boolean deleteOldRDN -> Snickers : boolean m_deleteOldRdn
         snickersMessage.setDeleteOldRdn( modifyDNRequest.isDeleteOldRDN() );
 
-        // Twix : LdapDN newSuperior -> Snickers : String m_newSuperior
+        // Twix : LdapDN newSuperior -> Snickers : LdapDN m_newSuperior
         snickersMessage.setNewSuperior( modifyDNRequest.getNewSuperior() );
 
         return snickersMessage;
@@ -823,24 +821,7 @@
         }
 
         // Snickers : String matchedDn -> Twix : LdapDN matchedDN
-        try
-        {
-            String matchedDn = snickersLdapResult.getMatchedDn();
-
-            if ( ( matchedDn == null ) || ( matchedDn.length() == 0 ) )
-            {
-                twixLdapResult.setMatchedDN( LdapDN.EMPTY_LDAPDN );
-            }
-            else
-            {
-                twixLdapResult.setMatchedDN( new LdapDN( snickersLdapResult.getMatchedDn() ) );
-            }
-        }
-        catch ( InvalidNameException ine )
-        {
-            log.warn( "The DN  " + snickersLdapResult.getMatchedDn() + " is invalid : " + ine.getMessage() );
-            twixLdapResult.setMatchedDN( LdapDN.EMPTY_LDAPDN );
-        }
+        twixLdapResult.setMatchedDN( snickersLdapResult.getMatchedDn() );
 
         // Snickers : Referral referral -> Twix : ArrayList referrals
         ReferralImpl snisckersReferrals = ( ReferralImpl ) snickersLdapResult.getReferral();
@@ -1084,16 +1065,8 @@
         SearchResponseEntryImpl snickersSearchResultResponse = ( SearchResponseEntryImpl ) snickersMessage;
         SearchResultEntry searchResultEntry = new SearchResultEntry();
 
-        // Snickers : String dn -> Twix : LdapDN objectName
-        try
-        {
-            searchResultEntry.setObjectName( new LdapDN( snickersSearchResultResponse.getObjectName().getBytes() ) );
-        }
-        catch ( InvalidNameException ine )
-        {
-            log.warn( "The DN " + snickersSearchResultResponse.getObjectName() + " is invalid : " + ine.getMessage() );
-            searchResultEntry.setObjectName( LdapDN.EMPTY_LDAPDN );
-        }
+        // Snickers : LdapDN dn -> Twix : LdapDN objectName
+        searchResultEntry.setObjectName( snickersSearchResultResponse.getObjectName() );
 
         // Snickers : Attributes attributes -> Twix : ArrayList
         // partialAttributeList

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java Sat Jun  3 03:07:50 2006
@@ -36,7 +36,6 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
@@ -65,7 +64,7 @@
     // ----------------------------------------------------------------------------
 
     /** The DN to be added. */
-    private Name entry;
+    private LdapDN entry;
 
     /** The attributes list. */
     private Attributes attributes;
@@ -174,9 +173,9 @@
      * 
      * @return Returns the entry.
      */
-    public String getEntry()
+    public LdapDN getEntry()
     {
-        return ( ( entry == null ) ? "" : entry.toString() );
+        return entry;
     }
 
 
@@ -186,7 +185,7 @@
      * @param entry
      *            The entry to set.
      */
-    public void setEntry( Name entry )
+    public void setEntry( LdapDN entry )
     {
         this.entry = entry;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java Sat Jun  3 03:07:50 2006
@@ -18,7 +18,6 @@
 
 
 import javax.naming.InvalidNameException;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -143,7 +142,7 @@
                     }
                     else
                     {
-                        Name entry = null;
+                        LdapDN entry = null;
 
                         try
                         {

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequest.java Sat Jun  3 03:07:50 2006
@@ -20,8 +20,6 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
-import javax.naming.Name;
-
 import org.apache.directory.shared.asn1.ber.tlv.Length;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
@@ -46,7 +44,7 @@
     private int version;
 
     /** The name of the user requesting a bind */
-    private Name name;
+    private LdapDN name;
 
     /** The authentication used to bind the user */
     private LdapAuthentication authentication;
@@ -131,9 +129,9 @@
      * 
      * @return The user name
      */
-    public String getName()
+    public LdapDN getName()
     {
-        return ( ( name == null ) ? null : name.toString() );
+        return name;
     }
 
 
@@ -143,7 +141,7 @@
      * @param name
      *            The user name
      */
-    public void setName( Name name )
+    public void setName( LdapDN name )
     {
         this.name = name;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java Sat Jun  3 03:07:50 2006
@@ -18,7 +18,6 @@
 
 
 import javax.naming.InvalidNameException;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -213,7 +212,7 @@
                     }
                     else
                     {
-                        Name name = LdapDN.EMPTY_LDAPDN;
+                        LdapDN name = LdapDN.EMPTY_LDAPDN;
 
                         try
                         {

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequest.java Sat Jun  3 03:07:50 2006
@@ -20,8 +20,6 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
-import javax.naming.Name;
-
 import org.apache.directory.shared.asn1.ber.tlv.Length;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
@@ -48,7 +46,7 @@
     // ----------------------------------------------------------------------------
 
     /** The entry to be compared */
-    private Name entry;
+    private LdapDN entry;
 
     /** The attribute to be compared */
     private LdapString attributeDesc;
@@ -94,9 +92,9 @@
      * 
      * @return Returns the entry.
      */
-    public String getEntry()
+    public LdapDN getEntry()
     {
-        return ( ( entry == null ) ? "" : entry.toString() );
+        return entry;
     }
 
 
@@ -106,7 +104,7 @@
      * @param entry
      *            The entry to set.
      */
-    public void setEntry( Name entry )
+    public void setEntry( LdapDN entry )
     {
         this.entry = entry;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java Sat Jun  3 03:07:50 2006
@@ -18,7 +18,6 @@
 
 
 import javax.naming.InvalidNameException;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -126,7 +125,7 @@
 
                     // Get the Value and store it in the CompareRequest
                     TLV tlv = ldapMessageContainer.getCurrentTLV();
-                    Name entry = null;
+                    LdapDN entry = null;
 
                     // We have to handle the special case of a 0 length matched
                     // DN

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequest.java Sat Jun  3 03:07:50 2006
@@ -20,8 +20,6 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
-import javax.naming.Name;
-
 import org.apache.directory.shared.asn1.ber.tlv.Length;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
@@ -40,7 +38,7 @@
     // ----------------------------------------------------------------------------
 
     /** The entry to be deleted */
-    private Name entry;
+    private LdapDN entry;
 
 
     // ~ Constructors
@@ -74,9 +72,9 @@
      * 
      * @return Returns the entry.
      */
-    public String getEntry()
+    public LdapDN getEntry()
     {
-        return ( ( entry == null ) ? "" : entry.toString() );
+        return entry;
     }
 
 
@@ -86,7 +84,7 @@
      * @param entry
      *            The entry to set.
      */
-    public void setEntry( Name entry )
+    public void setEntry( LdapDN entry )
     {
         this.entry = entry;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java Sat Jun  3 03:07:50 2006
@@ -18,7 +18,6 @@
 
 
 import javax.naming.InvalidNameException;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -100,7 +99,7 @@
 
                     // We have to handle the special case of a 0 length matched
                     // DN
-                    Name entry = null;
+                    LdapDN entry = null;
 
                     if ( tlv.getLength().getLength() == 0 )
                     {

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java Sat Jun  3 03:07:50 2006
@@ -36,7 +36,6 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
@@ -67,7 +66,7 @@
     // ----------------------------------------------------------------------------
 
     /** The DN to be modified. */
-    private Name object;
+    private LdapDN object;
 
     /** The modifications list. This is an array of ModificationItem. */
     private ArrayList modifications;
@@ -227,9 +226,9 @@
      * 
      * @return Returns the object.
      */
-    public String getObject()
+    public LdapDN getObject()
     {
-        return ( ( object == null ) ? "" : object.toString() );
+        return object;
     }
 
 
@@ -239,7 +238,7 @@
      * @param object
      *            The DN to set.
      */
-    public void setObject( Name object )
+    public void setObject( LdapDN object )
     {
         this.object = object;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java Sat Jun  3 03:07:50 2006
@@ -18,7 +18,6 @@
 
 
 import javax.naming.InvalidNameException;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -130,7 +129,7 @@
 
                     TLV tlv = ldapMessageContainer.getCurrentTLV();
 
-                    Name object = LdapDN.EMPTY_LDAPDN;
+                    LdapDN object = LdapDN.EMPTY_LDAPDN;
 
                     // Store the value.
                     if ( tlv.getLength().getLength() == 0 )

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequest.java Sat Jun  3 03:07:50 2006
@@ -20,8 +20,6 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
-import javax.naming.Name;
-
 import org.apache.directory.shared.asn1.ber.tlv.Length;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
@@ -45,7 +43,7 @@
     // ----------------------------------------------------------------------------
 
     /** The DN to be modified. */
-    private Name entry;
+    private LdapDN entry;
 
     /** The new RDN to be added to the RDN or to the new superior, if present */
     private Rdn newRDN;
@@ -54,7 +52,7 @@
     private boolean deleteOldRDN;
 
     /** The optional superior, which will be concatened to the newRdn */
-    private Name newSuperior;
+    private LdapDN newSuperior;
 
     /** The modify DN request length */
     private transient int modifyDNRequestLength;
@@ -91,9 +89,9 @@
      * 
      * @return Returns the entry.
      */
-    public String getEntry()
+    public LdapDN getEntry()
     {
-        return ( ( entry == null ) ? "" : entry.toString() );
+        return entry;
     }
 
 
@@ -103,7 +101,7 @@
      * @param entry
      *            The entry to set.
      */
-    public void setEntry( Name entry )
+    public void setEntry( LdapDN entry )
     {
         this.entry = entry;
     }
@@ -137,9 +135,9 @@
      * 
      * @return Returns the newRDN.
      */
-    public String getNewRDN()
+    public Rdn getNewRDN()
     {
-        return ( ( newRDN == null ) ? "" : newRDN.toString() );
+        return newRDN;
     }
 
 
@@ -160,9 +158,9 @@
      * 
      * @return Returns the newSuperior.
      */
-    public String getNewSuperior()
+    public LdapDN getNewSuperior()
     {
-        return ( ( newSuperior == null ) ? "" : newSuperior.toString() );
+        return newSuperior;
     }
 
 
@@ -172,7 +170,7 @@
      * @param newSuperior
      *            The newSuperior to set.
      */
-    public void setNewSuperior( Name newSuperior )
+    public void setNewSuperior( LdapDN newSuperior )
     {
         this.newSuperior = newSuperior;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java Sat Jun  3 03:07:50 2006
@@ -18,7 +18,6 @@
 
 
 import javax.naming.InvalidNameException;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -132,7 +131,7 @@
 
                     // We have to handle the special case of a 0 length matched
                     // DN
-                    Name entry = null;
+                    LdapDN entry = null;
 
                     if ( tlv.getLength().getLength() == 0 )
                     {
@@ -215,7 +214,7 @@
                     {
                         try
                         {
-                            Name dn = new LdapDN( tlv.getValue().getData() );
+                            LdapDN dn = new LdapDN( tlv.getValue().getData() );
                             dn = LdapDN.normalize( dn );
                             newRdn = ( ( LdapDN ) dn ).getRdn( 0 );
                         }
@@ -345,7 +344,7 @@
 
                     // We have to handle the special case of a 0 length matched
                     // DN
-                    Name newSuperior = LdapDN.EMPTY_LDAPDN;
+                    LdapDN newSuperior = LdapDN.EMPTY_LDAPDN;
 
                     if ( tlv.getLength().getLength() == 0 )
                     {

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java Sat Jun  3 03:07:50 2006
@@ -31,7 +31,6 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -51,7 +50,7 @@
     // ----------------------------------------------------------------------------
 
     /** The base DN */
-    private Name baseObject;
+    private LdapDN baseObject;
 
     /** The scope. It could be baseObject, singleLevel or wholeSubtree. */
     private int scope;
@@ -152,9 +151,9 @@
      * 
      * @return Returns the baseObject.
      */
-    public String getBaseObject()
+    public LdapDN getBaseObject()
     {
-        return ( ( baseObject == null ) ? null : baseObject.toString() );
+        return baseObject;
     }
 
 
@@ -164,7 +163,7 @@
      * @param baseObject
      *            The baseObject to set.
      */
-    public void setBaseObject( Name baseObject )
+    public void setBaseObject( LdapDN baseObject )
     {
         this.baseObject = baseObject;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestGrammar.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestGrammar.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestGrammar.java Sat Jun  3 03:07:50 2006
@@ -18,7 +18,6 @@
 
 
 import javax.naming.InvalidNameException;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -134,7 +133,7 @@
                     TLV tlv = ldapMessageContainer.getCurrentTLV();
 
                     // We have to check that this is a correct DN
-                    Name baseObject = LdapDN.EMPTY_LDAPDN;
+                    LdapDN baseObject = LdapDN.EMPTY_LDAPDN;
 
                     // We have to handle the special case of a 0 length base
                     // object,

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java Sat Jun  3 03:07:50 2006
@@ -33,7 +33,6 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import javax.naming.Name;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
@@ -59,7 +58,7 @@
     // ----------------------------------------------------------------------------
 
     /** The DN of the returned entry */
-    private Name objectName;
+    private LdapDN objectName;
 
     /** The attributes list. It contains javax.naming.directory.Attribute */
     private Attributes partialAttributeList;
@@ -112,9 +111,9 @@
      * 
      * @return Returns the objectName.
      */
-    public String getObjectName()
+    public LdapDN getObjectName()
     {
-        return ( ( objectName == null ) ? null : objectName.toString() );
+        return objectName;
     }
 
 
@@ -124,7 +123,7 @@
      * @param objectName
      *            The objectName to set.
      */
-    public void setObjectName( Name objectName )
+    public void setObjectName( LdapDN objectName )
     {
         this.objectName = objectName;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryGrammar.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryGrammar.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryGrammar.java Sat Jun  3 03:07:50 2006
@@ -18,7 +18,6 @@
 
 
 import javax.naming.InvalidNameException;
-import javax.naming.Name;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -133,7 +132,7 @@
 
                     TLV tlv = ldapMessageContainer.getCurrentTLV();
 
-                    Name objectName = LdapDN.EMPTY_LDAPDN;
+                    LdapDN objectName = LdapDN.EMPTY_LDAPDN;
 
                     // Store the value.
                     if ( tlv.getLength().getLength() == 0 )

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControl.java Sat Jun  3 03:07:50 2006
@@ -24,9 +24,8 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.asn1.util.Asn1StringUtils;
-import org.apache.directory.shared.ldap.codec.util.LdapString;
-import org.apache.directory.shared.ldap.codec.util.LdapStringEncodingException;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.StringTools;
 
 
 /**
@@ -85,7 +84,9 @@
 
     private int changeNumber = UNDEFINED_CHANGE_NUMBER;
 
-    private LdapString previousDn = null;
+    private LdapDN previousDn = null;
+    
+    private byte[] previousDnBytes = null;
 
     private transient int eccSeqLength;
 
@@ -104,7 +105,8 @@
 
         if ( previousDn != null )
         {
-            previousDnLength = 1 + Length.getNbBytes( previousDn.getNbBytes() ) + previousDn.getNbBytes();
+            previousDnBytes = StringTools.getBytesUtf8( previousDn.getName() );
+            previousDnLength = 1 + Length.getNbBytes( previousDnBytes.length ) + previousDnBytes.length;
         }
 
         if ( changeNumber != UNDEFINED_CHANGE_NUMBER )
@@ -140,7 +142,7 @@
 
         if ( previousDn != null )
         {
-            Value.encode( bb, previousDn.getBytes() );
+            Value.encode( bb, previousDnBytes );
         }
         if ( changeNumber != UNDEFINED_CHANGE_NUMBER )
         {
@@ -184,26 +186,13 @@
     }
 
 
-    public String getPreviousDn()
+    public LdapDN getPreviousDn()
     {
-        return previousDn == null ? "" : previousDn.getString();
+        return previousDn;
     }
 
 
-    public void setPreviousDn( String previousDn )
-    {
-        try
-        {
-            this.previousDn = new LdapString( Asn1StringUtils.getBytesUtf8( previousDn ) );
-        }
-        catch ( LdapStringEncodingException e )
-        {
-            e.printStackTrace();
-        }
-    }
-
-
-    public void setPreviousDn( LdapString previousDn )
+    public void setPreviousDn( LdapDN previousDn )
     {
         this.previousDn = previousDn;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java Sat Jun  3 03:07:50 2006
@@ -200,12 +200,11 @@
                 else
                 {
                     Value value = entryChangeContainer.getCurrentTLV().getValue();
-                    String previousDn;
+                    LdapDN previousDn = null;
 
                     try
                     {
-                        previousDn = StringTools.utf8ToString( value.getData() );
-                        new LdapDN( previousDn );
+                        previousDn = new LdapDN( StringTools.utf8ToString( value.getData() ) );
                     }
                     catch ( InvalidNameException ine )
                     {

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java Sat Jun  3 03:07:50 2006
@@ -29,6 +29,8 @@
 
 import javax.naming.directory.Attributes;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 
 /**
  * Add protocol operation request used to add a new entry to the DIT.
@@ -51,7 +53,7 @@
      * 
      * @return the Dn of the added entry.
      */
-    String getEntry();
+    LdapDN getEntry();
 
 
     /**
@@ -60,7 +62,7 @@
      * @param entry
      *            the Dn of the added entry.
      */
-    void setEntry( String entry );
+    void setEntry( LdapDN entry );
 
 
     /**

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java Sat Jun  3 03:07:50 2006
@@ -19,6 +19,7 @@
 
 import javax.naming.directory.Attributes;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 
 
@@ -33,7 +34,7 @@
     static final long serialVersionUID = 7534132448349520346L;
 
     /** Distinguished name of the new entry. */
-    private String entry;
+    private LdapDN entry;
 
     /** A MultiMap of the new entry's attributes and their values */
     private Attributes attributes;
@@ -66,7 +67,7 @@
      * 
      * @return the Dn of the added entry.
      */
-    public String getEntry()
+    public LdapDN getEntry()
     {
         return entry;
     }
@@ -78,7 +79,7 @@
      * @param entry
      *            the Dn of the added entry.
      */
-    public void setEntry( String entry )
+    public void setEntry( LdapDN entry )
     {
         this.entry = entry;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java Sat Jun  3 03:07:50 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 
 /**
  * Bind protocol operation request which authenticates and begins a client
@@ -89,7 +91,7 @@
      * 
      * @return the DN of the authenticating user.
      */
-    String getName();
+    LdapDN getName();
 
 
     /**
@@ -103,7 +105,7 @@
      *            the DN of the authenticating user - leave null for annonymous
      *            user.
      */
-    void setName( String name );
+    void setName( LdapDN name );
 
 
     /**

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java Sat Jun  3 03:07:50 2006
@@ -17,6 +17,7 @@
 package org.apache.directory.shared.ldap.message;
 
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -36,7 +37,7 @@
      * Distinguished name identifying the name of the authenticating subject -
      * defaults to the empty string
      */
-    private String name = "";
+    private LdapDN name;
 
     /** The passwords, keys or tickets used to verify user identity */
     private byte[] credentials;
@@ -167,7 +168,7 @@
      * 
      * @return the DN of the authenticating user.
      */
-    public String getName()
+    public LdapDN getName()
     {
         return name;
     }
@@ -184,7 +185,7 @@
      *            the DN of the authenticating user - leave null for annonymous
      *            user.
      */
-    public void setName( String name )
+    public void setName( LdapDN name )
     {
         this.name = name;
     }
@@ -299,11 +300,29 @@
             return false;
         }
 
-        if ( !req.getName().equals( getName() ) )
+        LdapDN dn1 = req.getName();
+        LdapDN dn2 = getName();
+        
+        if ( dn1 == null )
         {
-            return false;
+            if ( dn2 != null )
+            {
+                return false;
+            }
         }
-
+        else
+        {
+            if ( dn2 == null )
+            {
+                return false;
+            }
+            else if ( !dn1.equals( dn2 ) )
+            {
+                return false;
+            }
+                
+        }
+        
         if ( !ArrayUtils.isEquals( req.getCredentials(), getCredentials() ) )
         {
             return false;

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java Sat Jun  3 03:07:50 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 
 /**
  * Compare request protocol message that tests an entry to see if it abides by
@@ -39,7 +41,7 @@
      * 
      * @return the DN of the compared entry.
      */
-    String getName();
+    LdapDN getName();
 
 
     /**
@@ -49,7 +51,7 @@
      * @param a_name
      *            the DN of the compared entry.
      */
-    void setName( String a_name );
+    void setName( LdapDN name );
 
 
     /**

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java Sat Jun  3 03:07:50 2006
@@ -19,6 +19,7 @@
 
 import java.util.Arrays;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 
@@ -33,7 +34,7 @@
     static final long serialVersionUID = 1699731530016468977L;
 
     /** Distinguished name identifying the compared entry */
-    private String name;
+    private LdapDN name;
 
     /** The id of the attribute used in the comparison */
     private String attrId;
@@ -71,7 +72,7 @@
      * 
      * @return the DN of the compared entry.
      */
-    public String getName()
+    public LdapDN getName()
     {
         return name;
     }
@@ -84,7 +85,7 @@
      * @param name
      *            the DN of the compared entry.
      */
-    public void setName( String name )
+    public void setName( LdapDN name )
     {
         this.name = name;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java Sat Jun  3 03:07:50 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 
 /**
  * Delete request protocol message used to remove an existing leaf entry from
@@ -39,7 +41,7 @@
      * 
      * @return the DN of the leaf entry to delete.
      */
-    String getName();
+    LdapDN getName();
 
 
     /**
@@ -49,5 +51,5 @@
      * @param a_name
      *            the DN of the leaf entry to delete.
      */
-    void setName( String a_name );
+    void setName( LdapDN name );
 }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java Sat Jun  3 03:07:50 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 
 /**
  * Delete request implementation.
@@ -28,7 +30,7 @@
     static final long serialVersionUID = 3187847454305567542L;
 
     /** The distinguished name of the entry to delete */
-    private String name;
+    private LdapDN name;
 
     private DeleteResponse response;
 
@@ -60,7 +62,7 @@
      * 
      * @return the DN of the leaf entry to delete.
      */
-    public String getName()
+    public LdapDN getName()
     {
         return name;
     }
@@ -73,7 +75,7 @@
      * @param name
      *            the DN of the leaf entry to delete.
      */
-    public void setName( String name )
+    public void setName( LdapDN name )
     {
         this.name = name;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/EntryChangeControl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/EntryChangeControl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/EntryChangeControl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/EntryChangeControl.java Sat Jun  3 03:07:50 2006
@@ -18,10 +18,8 @@
 
 
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.asn1.util.Asn1StringUtils;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
-import org.apache.directory.shared.ldap.codec.util.LdapString;
-import org.apache.directory.shared.ldap.codec.util.LdapStringEncodingException;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -87,7 +85,7 @@
 
     private int changeNumber = UNDEFINED_CHANGE_NUMBER;
 
-    private LdapString previousDn = null;
+    private LdapDN previousDn = null;
 
 
     public EntryChangeControl()
@@ -109,26 +107,13 @@
     }
 
 
-    public String getPreviousDn()
+    public LdapDN getPreviousDn()
     {
-        return previousDn.getString();
+        return previousDn;
     }
 
 
-    public void setPreviousDn( String previousDn )
-    {
-        try
-        {
-            this.previousDn = new LdapString( Asn1StringUtils.getBytesUtf8( previousDn ) );
-        }
-        catch ( LdapStringEncodingException e )
-        {
-            e.printStackTrace();
-        }
-    }
-
-
-    public void setPreviousDn( LdapString previousDn )
+    public void setPreviousDn( LdapDN previousDn )
     {
         this.previousDn = previousDn;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResult.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResult.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResult.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResult.java Sat Jun  3 03:07:50 2006
@@ -26,6 +26,8 @@
 
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 
 /**
  * LDAPv3 result structure embedded into Responses. See section 4.1.10 in <a
@@ -79,7 +81,7 @@
      * 
      * @return the Dn of the lowest matched entry.
      */
-    String getMatchedDn();
+    LdapDN getMatchedDn();
 
 
     /**
@@ -89,7 +91,7 @@
      * @param dn
      *            the Dn of the lowest matched entry.
      */
-    void setMatchedDn( String dn );
+    void setMatchedDn( LdapDN dn );
 
 
     /**

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java Sat Jun  3 03:07:50 2006
@@ -26,6 +26,8 @@
 
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 
 /**
  * LdapResult implementation.
@@ -38,7 +40,7 @@
     static final long serialVersionUID = -1446626887394613213L;
 
     /** Lowest matched entry Dn - defaults to empty string */
-    private String matchedDn;
+    private LdapDN matchedDn;
 
     /** Referral associated with this LdapResult if the errorCode is REFERRAL */
     private Referral referral;
@@ -92,7 +94,7 @@
      * 
      * @return the Dn of the lowest matched entry.
      */
-    public String getMatchedDn()
+    public LdapDN getMatchedDn()
     {
         return matchedDn;
     }
@@ -105,7 +107,7 @@
      * @param matchedDn
      *            the Dn of the lowest matched entry.
      */
-    public void setMatchedDn( String matchedDn )
+    public void setMatchedDn( LdapDN matchedDn )
     {
         this.matchedDn = matchedDn;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequest.java Sat Jun  3 03:07:50 2006
@@ -16,6 +16,9 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
+
 
 /**
  * Modify DN request protocol message used to rename or move an existing entry
@@ -74,7 +77,7 @@
      * 
      * @return the distinguished name of the entry.
      */
-    String getName();
+    LdapDN getName();
 
 
     /**
@@ -84,7 +87,7 @@
      * @param name
      *            the distinguished name of the entry.
      */
-    void setName( String name );
+    void setName( LdapDN name );
 
 
     /**
@@ -93,7 +96,7 @@
      * 
      * @return the relative dn with one component
      */
-    String getNewRdn();
+    Rdn getNewRdn();
 
 
     /**
@@ -103,7 +106,7 @@
      * @param newRdn
      *            the relative dn with one component
      */
-    void setNewRdn( String newRdn );
+    void setNewRdn( Rdn newRdn );
 
 
     /**
@@ -139,7 +142,7 @@
      * 
      * @return the dn of the superior entry the candidate entry is moved under.
      */
-    String getNewSuperior();
+    LdapDN getNewSuperior();
 
 
     /**
@@ -153,7 +156,7 @@
      *            the dn of the superior entry the candidate entry for DN
      *            modification is moved under.
      */
-    void setNewSuperior( String newSuperior );
+    void setNewSuperior( LdapDN newSuperior );
 
 
     /**

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java Sat Jun  3 03:07:50 2006
@@ -16,6 +16,9 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
+
 
 /**
  * Lockable ModifyDNRequest implementation.
@@ -28,13 +31,13 @@
     static final long serialVersionUID = 1233507339633051696L;
 
     /** PDU's modify Dn candidate <b>entry</b> distinguished name property */
-    private String name;
+    private LdapDN name;
 
     /** PDU's <b>newrdn</b> relative distinguished name property */
-    private String newRdn;
+    private Rdn newRdn;
 
     /** PDU's <b>newSuperior</b> distinguished name property */
-    private String newSuperior;
+    private LdapDN newSuperior;
 
     /** PDU's <b>deleteOldRdn</b> flag */
     private boolean deleteOldRdn = false;
@@ -114,7 +117,7 @@
      * 
      * @return the distinguished name of the entry.
      */
-    public String getName()
+    public LdapDN getName()
     {
         return name;
     }
@@ -127,7 +130,7 @@
      * @param name
      *            the distinguished name of the entry.
      */
-    public void setName( String name )
+    public void setName( LdapDN name )
     {
         this.name = name;
     }
@@ -139,7 +142,7 @@
      * 
      * @return the relative dn with one component
      */
-    public String getNewRdn()
+    public Rdn getNewRdn()
     {
         return newRdn;
     }
@@ -152,7 +155,7 @@
      * @param newRdn
      *            the relative dn with one component
      */
-    public void setNewRdn( String newRdn )
+    public void setNewRdn( Rdn newRdn )
     {
         this.newRdn = newRdn;
     }
@@ -166,7 +169,7 @@
      * 
      * @return the dn of the superior entry the candidate entry is moved under.
      */
-    public String getNewSuperior()
+    public LdapDN getNewSuperior()
     {
         return newSuperior;
     }
@@ -183,7 +186,7 @@
      *            the dn of the superior entry the candidate entry for DN
      *            modification is moved under.
      */
-    public void setNewSuperior( String newSuperior )
+    public void setNewSuperior( LdapDN newSuperior )
     {
         this.newSuperior = newSuperior;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequest.java Sat Jun  3 03:07:50 2006
@@ -19,8 +19,11 @@
 
 import java.util.Collection;
 
+import javax.naming.InvalidNameException;
 import javax.naming.directory.ModificationItem;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 
 /**
  * Modify request protocol message used to alter the attributes and values of an
@@ -106,7 +109,7 @@
      * 
      * @return the DN of the modified entry.
      */
-    String getName();
+    LdapDN getName();
 
 
     /**
@@ -116,7 +119,7 @@
      * @param name
      *            the DN of the modified entry.
      */
-    void setName( String name );
+    void setName( LdapDN name );
 
 
     /**

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java Sat Jun  3 03:07:50 2006
@@ -30,6 +30,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -49,7 +50,7 @@
     private static final transient Logger log = LoggerFactory.getLogger( ModifyRequestImpl.class );
 
     /** Dn of the entry to modify or PDU's <b>object</b> field */
-    private String name;
+    private LdapDN name;
 
     /** Sequence of modifications or PDU's <b>modification</b> seqence field */
     private ArrayList mods = new ArrayList();
@@ -97,7 +98,7 @@
      * 
      * @return the DN of the modified entry.
      */
-    public String getName()
+    public LdapDN getName()
     {
         return name;
     }
@@ -110,7 +111,7 @@
      * @param name
      *            the DN of the modified entry.
      */
-    public void setName( String name )
+    public void setName( LdapDN name )
     {
         this.name = name;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequest.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequest.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequest.java Sat Jun  3 03:07:50 2006
@@ -20,6 +20,7 @@
 import java.util.Collection;
 
 import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -60,7 +61,7 @@
      * 
      * @return the search base
      */
-    String getBase();
+    LdapDN getBase();
 
 
     /**
@@ -69,7 +70,7 @@
      * @param a_baseDn
      *            the search base
      */
-    void setBase( String a_baseDn );
+    void setBase( LdapDN baseDn );
 
 
     /**

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java Sat Jun  3 03:07:50 2006
@@ -25,6 +25,7 @@
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.filter.BranchNormalizedVisitor;
 import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**
@@ -38,7 +39,7 @@
     static final long serialVersionUID = -5655881944020886218L;
 
     /** Search base distinguished name */
-    private String baseDn;
+    private LdapDN baseDn;
 
     /** Search filter expression tree's root node */
     private ExprNode filter;
@@ -119,7 +120,7 @@
      * 
      * @return the search base
      */
-    public String getBase()
+    public LdapDN getBase()
     {
         return baseDn;
     }
@@ -131,7 +132,7 @@
      * @param base
      *            the search base
      */
-    public void setBase( String base )
+    public void setBase( LdapDN base )
     {
         baseDn = base;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntry.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntry.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntry.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntry.java Sat Jun  3 03:07:50 2006
@@ -29,6 +29,8 @@
 
 import javax.naming.directory.Attributes;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
+
 
 /**
  * Search entry protocol response message used to return non referral entries to
@@ -49,7 +51,7 @@
      * 
      * @return the Dn of the entry returned.
      */
-    String getObjectName();
+    LdapDN getObjectName();
 
 
     /**
@@ -58,7 +60,7 @@
      * @param a_dn
      *            the Dn of the entry returned.
      */
-    void setObjectName( String a_dn );
+    void setObjectName( LdapDN dn );
 
 
     /**

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java Sat Jun  3 03:07:50 2006
@@ -19,6 +19,7 @@
 
 import javax.naming.directory.Attributes;
 
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 
 
@@ -33,7 +34,7 @@
     static final long serialVersionUID = -8357316233060886637L;
 
     /** Distinguished name of the search result entry returned */
-    private String objectName = "";
+    private LdapDN objectName;
 
     /** Partial set of attributes returned in response to search */
     private Attributes attributes;
@@ -88,7 +89,7 @@
      * 
      * @return the Dn of the entry returned.
      */
-    public String getObjectName()
+    public LdapDN getObjectName()
     {
         return objectName;
     }
@@ -100,7 +101,7 @@
      * @param dn
      *            the Dn of the entry returned.
      */
-    public void setObjectName( String objectName )
+    public void setObjectName( LdapDN objectName )
     {
         this.objectName = objectName;
     }

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java Sat Jun  3 03:07:50 2006
@@ -85,7 +85,7 @@
         buf.append( " minutes in " ).append( delay ).append( " seconds." );
 
         super.getLdapResult().setErrorMessage( buf.toString() );
-        super.getLdapResult().setMatchedDn( "" );
+        super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( ResultCodeEnum.UNAVAILABLE );
 
         encodeResponse();

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java Sat Jun  3 03:07:50 2006
@@ -54,7 +54,7 @@
                 throw new IllegalArgumentException( "The result code can only be one of: " + ResultCodeEnum.SUCCESS
                     + ", " + ResultCodeEnum.OPERATIONSERROR + ", " + ResultCodeEnum.INSUFFICIENTACCESSRIGHTS );
         }
-        super.getLdapResult().setMatchedDn( "" );
+        super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( rcode );
     }
 
@@ -62,7 +62,7 @@
     public GracefulShutdownResponse(int messageId)
     {
         super( messageId );
-        super.getLdapResult().setMatchedDn( "" );
+        super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
     }
 

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java Sat Jun  3 03:07:50 2006
@@ -53,7 +53,7 @@
                 throw new IllegalArgumentException( "The result code can only be one of: " + ResultCodeEnum.SUCCESS
                     + ", " + ResultCodeEnum.OPERATIONSERROR + ", " + ResultCodeEnum.INSUFFICIENTACCESSRIGHTS );
         }
-        super.getLdapResult().setMatchedDn( "" );
+        super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( rcode );
     }
 
@@ -61,7 +61,7 @@
     public LaunchDiagnosticUiResponse(int messageId)
     {
         super( messageId );
-        super.getLdapResult().setMatchedDn( "" );
+        super.getLdapResult().setMatchedDn( null);
         super.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
     }
 

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java Sat Jun  3 03:07:50 2006
@@ -130,7 +130,7 @@
                     + ", " + ResultCodeEnum.PROTOCOLERROR + ", " + ResultCodeEnum.STRONGAUTHREQUIRED );
         }
         super.getLdapResult().setErrorMessage( "The server will disconnect!" );
-        super.getLdapResult().setMatchedDn( "" );
+        super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( rcode );
     }
 

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?rev=411416&r1=411415&r2=411416&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java (original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java Sat Jun  3 03:07:50 2006
@@ -1246,7 +1246,7 @@
      * @throws InvalidNameException
      *             If the DN is invalid
      */
-    public static Name normalize( Name dn, Map oids ) throws InvalidNameException, NamingException
+    public static LdapDN normalize( LdapDN dn, Map oids ) throws InvalidNameException, NamingException
     {
         if ( ( dn == null ) || ( dn.size() == 0 ) || ( oids == null ) || ( oids.size() == 0 ) )
         {
@@ -1273,7 +1273,7 @@
     }
 
 
-    public static Name normalize( Name dn ) throws InvalidNameException, NamingException
+    public static LdapDN normalize( LdapDN dn ) throws InvalidNameException, NamingException
     {
         return normalize( dn, DnOidContainer.getOids() );
     }



Mime
View raw message