directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1062306 [19/32] - in /directory: apacheds-manuals/trunk/src/advanced-user-guide/ apacheds-manuals/trunk/src/basic-user-guide/ apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/ apacheds/trunk/core-api/s...
Date Sun, 23 Jan 2011 01:17:26 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java Sun Jan 23 01:17:06 2011
@@ -30,14 +30,14 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.ResultResponse;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
 /**
- * The action used to set the LdapResult matched DN.
+ * The action used to set the LdapResult matched Dn.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -55,7 +55,7 @@ public class MatchedDNAction extends Gra
      */
     public MatchedDNAction()
     {
-        super( "Store matched DN" );
+        super( "Store matched Dn" );
     }
 
 
@@ -68,7 +68,7 @@ public class MatchedDNAction extends Gra
 
         // Get the Value and store it in the BindResponse
         TLV tlv = ldapMessageContainer.getCurrentTLV();
-        DN matchedDN = null;
+        Dn matchedDn = null;
         ResultCodeEnum resultCode = null;
 
         ResultResponse response = ( ResultResponse ) ldapMessageContainer.getMessage();
@@ -76,14 +76,14 @@ public class MatchedDNAction extends Gra
         resultCode = ldapResult.getResultCode();
 
         // We have to handle the special case of a 0 length matched
-        // DN
+        // Dn
         if ( tlv.getLength() == 0 )
         {
-            matchedDN = DN.EMPTY_DN;
+            matchedDn = Dn.EMPTY_DN;
         }
         else
         {
-            // A not null matchedDN is valid for resultCodes
+            // A not null matchedDn is valid for resultCodes
             // NoSuchObject, AliasProblem, InvalidDNSyntax and
             // AliasDreferencingProblem.
 
@@ -98,7 +98,7 @@ public class MatchedDNAction extends Gra
 
                     try
                     {
-                        matchedDN = new DN( dnStr );
+                        matchedDn = new Dn( dnStr );
                     }
                     catch ( LdapInvalidDnException ine )
                     {
@@ -113,19 +113,19 @@ public class MatchedDNAction extends Gra
                     break;
 
                 default:
-                    LOG.warn( "The matched DN should not be set when the result code is one of NoSuchObject,"
+                    LOG.warn( "The matched Dn should not be set when the result code is one of NoSuchObject,"
                         + " AliasProblem, InvalidDNSyntax or AliasDreferencingProblem" );
 
-                    matchedDN = DN.EMPTY_DN;
+                    matchedDn = Dn.EMPTY_DN;
                     break;
             }
         }
 
         if ( IS_DEBUG )
         {
-            LOG.debug( "The matchedDN is " + matchedDN );
+            LOG.debug( "The matchedDn is " + matchedDn);
         }
 
-        ldapResult.setMatchedDn( matchedDN );
+        ldapResult.setMatchedDn(matchedDn);
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControl.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControl.java Sun Jan 23 01:17:06 2011
@@ -49,16 +49,16 @@ public class SyncModifyDnControl extends
     /** This control OID */
     public static final String CONTROL_OID = "1.3.6.1.4.1.4203.1.9.1.5";
 
-    /** the entry's DN to be changed */
+    /** the entry's Dn to be changed */
     private String entryDn;
 
-    /** target entry's new parent DN */
+    /** target entry's new parent Dn */
     private String newSuperiorDn;
 
-    /** the new RDN */
+    /** the new Rdn */
     private String newRdn;
 
-    /** flag to indicate whether to delete the old RDN */
+    /** flag to indicate whether to delete the old Rdn */
     private boolean deleteOldRdn = false;
 
     private SyncModifyDnType modDnType;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java Sun Jan 23 01:17:06 2011
@@ -52,13 +52,13 @@ import org.slf4j.LoggerFactory;
  *      }
  *     
  *      Rename SEQUENCE {
- *          new-rdn RDN,
+ *          new-rdn Rdn,
  *          delete-old-rdn BOOLEAN
  *      }
  * 
  *      MoveAndRename SEQUENCE {
  *          superior-name   LDAPDN
- *          new-rdn RDN,
+ *          new-rdn Rdn,
  *          delete-old-rdn BOOLEAN
  *      }
  * 
@@ -100,7 +100,7 @@ public final class SyncModifyDnControlGr
         /** 
          * Transition from SyncModifyDnControl sequence to entryDn
          * move-name ::= SEQUENCE OF {
-         *     DN        entryDN
+         *     Dn        entryDN
          *     ...
          *     
          * Stores the entryDn value
@@ -188,7 +188,7 @@ public final class SyncModifyDnControlGr
          * Transition from rename's RENAME state to newRdn
          * 
          * Rename SEQUENCE {
-         *     new-rdn RDN,
+         *     new-rdn Rdn,
          * }
          *            
          * Stores the newRdn value

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java Sun Jan 23 01:17:06 2011
@@ -29,7 +29,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -104,7 +104,7 @@ public class CertGenerationGrammar exten
          */
         super.transitions[CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE, CertGenerationStatesEnum.TARGETDN_STATE,
-            UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set Cert Generation target DN value" )
+            UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set Cert Generation target Dn value" )
             {
                 public void action( Asn1Container container ) throws DecoderException
                 {
@@ -115,12 +115,12 @@ public class CertGenerationGrammar exten
 
                     if ( IS_DEBUG )
                     {
-                        LOG.debug( "Target DN = " + targetDN );
+                        LOG.debug( "Target Dn = " + targetDN );
                     }
 
                     if ( ( targetDN != null ) && ( targetDN.trim().length() > 0 ) )
                     {
-                        if( !DN.isValid( targetDN ) )
+                        if( !Dn.isValid(targetDN) )
                         {
                             String msg = I18n.err( I18n.ERR_04032, targetDN );
                             LOG.error( msg );
@@ -150,7 +150,7 @@ public class CertGenerationGrammar exten
          */
         super.transitions[CertGenerationStatesEnum.TARGETDN_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             CertGenerationStatesEnum.TARGETDN_STATE, CertGenerationStatesEnum.ISSUER_STATE, UniversalTag.OCTET_STRING.getValue(),
-            new GrammarAction( "Set Cert Generation issuer DN value" )
+            new GrammarAction( "Set Cert Generation issuer Dn value" )
             {
                 public void action( Asn1Container container ) throws DecoderException
                 {
@@ -161,12 +161,12 @@ public class CertGenerationGrammar exten
 
                     if ( IS_DEBUG )
                     {
-                        LOG.debug( "Issuer DN = " + issuerDN );
+                        LOG.debug( "Issuer Dn = " + issuerDN );
                     }
 
                     if ( ( issuerDN != null ) && ( issuerDN.trim().length() > 0 ) )
                     {
-                        if( !DN.isValid( issuerDN ) )
+                        if( !Dn.isValid(issuerDN) )
                         {
                             String msg = I18n.err( I18n.ERR_04034, issuerDN );
                             LOG.error( msg );
@@ -190,7 +190,7 @@ public class CertGenerationGrammar exten
          */
         super.transitions[CertGenerationStatesEnum.ISSUER_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             CertGenerationStatesEnum.ISSUER_STATE, CertGenerationStatesEnum.SUBJECT_STATE, UniversalTag.OCTET_STRING.getValue(),
-            new GrammarAction( "Set Cert Generation subject DN value" )
+            new GrammarAction( "Set Cert Generation subject Dn value" )
             {
                 public void action( Asn1Container container ) throws DecoderException
                 {
@@ -201,12 +201,12 @@ public class CertGenerationGrammar exten
 
                     if ( IS_DEBUG )
                     {
-                        LOG.debug( "subject DN = " + subjectDN );
+                        LOG.debug( "subject Dn = " + subjectDN );
                     }
 
                     if ( ( subjectDN != null ) && ( subjectDN.trim().length() > 0 ) )
                     {
-                        if( !DN.isValid( subjectDN ) )
+                        if( !Dn.isValid(subjectDN) )
                         {
                             String msg = I18n.err( I18n.ERR_04035, subjectDN );
                             LOG.error( msg );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationObject.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationObject.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationObject.java Sun Jan 23 01:17:06 2011
@@ -47,13 +47,13 @@ import org.apache.directory.shared.util.
 public class CertGenerationObject extends AbstractAsn1Object
 {
 
-    /** the DN of the server entry which will be updated*/
+    /** the Dn of the server entry which will be updated*/
     private String targetDN;
 
-    /** the issuer DN that will be set in the certificate*/
+    /** the issuer Dn that will be set in the certificate*/
     private String issuerDN;// = "CN=ApacheDS, OU=Directory, O=ASF, C=US";
 
-    /** the DN of the subject that is present in the certificate*/
+    /** the Dn of the subject that is present in the certificate*/
     private String subjectDN;// = "CN=ApacheDS, OU=Directory, O=ASF, C=US";
 
     /** name of the algorithm used for generating the keys*/
@@ -150,9 +150,9 @@ public class CertGenerationObject extend
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        sb.append( "Certficate Generation Object { " ).append( " Target DN: " ).append( targetDN ).append( ',' );
-        sb.append( " Issuer DN: " ).append( issuerDN ).append( ',' );
-        sb.append( " Subject DN: " ).append( subjectDN ).append( ',' );
+        sb.append( "Certficate Generation Object { " ).append( " Target Dn: " ).append( targetDN ).append( ',' );
+        sb.append( " Issuer Dn: " ).append( issuerDN ).append( ',' );
+        sb.append( " Subject Dn: " ).append( subjectDN ).append( ',' );
         sb.append( " Key Algorithm: " ).append( keyAlgorithm ).append( " }" );
 
         return sb.toString();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationStatesEnum.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationStatesEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationStatesEnum.java Sun Jan 23 01:17:06 2011
@@ -41,13 +41,13 @@ public enum CertGenerationStatesEnum imp
     /** sequence*/
     CERT_GENERATION_REQUEST_SEQUENCE_STATE,
 
-    /** the target DN*/
+    /** the target Dn*/
     TARGETDN_STATE,
 
-    /** the issuer DN*/
+    /** the issuer Dn*/
     ISSUER_STATE,
 
-    /** the subject DN*/
+    /** the subject Dn*/
     SUBJECT_STATE,
 
     /** the key algorithm*/

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java Sun Jan 23 01:17:06 2011
@@ -29,7 +29,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.Strings;
 
 
@@ -68,7 +68,7 @@ import org.apache.directory.shared.util.
  *    changeType indicates what LDAP operation caused the entry to be
  *    returned.
  *    
- *    previousDN is present only for modifyDN operations and gives the DN of
+ *    previousDN is present only for modifyDN operations and gives the Dn of
  *    the entry before it was renamed and/or moved.  Servers MUST include this
  *    optional field only when returning change notifications as a result of
  *    modifyDN operations.
@@ -91,10 +91,10 @@ public class EntryChangeControl extends 
 
     private long changeNumber = UNDEFINED_CHANGE_NUMBER;
 
-    /** The previous DN */
-    private DN previousDn = null;
+    /** The previous Dn */
+    private Dn previousDn = null;
 
-    /** A temporary storage for the previous DN */
+    /** A temporary storage for the previous Dn */
     private byte[] previousDnBytes = null;
 
     /** The entry change global length */
@@ -252,13 +252,13 @@ public class EntryChangeControl extends 
     }
 
 
-    public DN getPreviousDn()
+    public Dn getPreviousDn()
     {
         return previousDn;
     }
 
 
-    public void setPreviousDn( DN previousDn )
+    public void setPreviousDn( Dn previousDn )
     {
         this.previousDn = previousDn;
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java Sun Jan 23 01:17:06 2011
@@ -31,7 +31,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -139,7 +139,7 @@ public final class EntryChangeControlGra
         } );
 
         // ============================================================================================
-        // Transition from Change Type to Previous DN
+        // Transition from Change Type to Previous Dn
         // ============================================================================================
         // EntryChangeNotification ::= SEQUENCE {
         //     ...
@@ -147,7 +147,7 @@ public final class EntryChangeControlGra
         //     ...
         //
         // Set the previousDN into the structure. We first check that it's a
-        // valid DN
+        // valid Dn
         super.transitions[EntryChangeControlStatesEnum.CHANGE_TYPE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
             new GrammarTransition( EntryChangeControlStatesEnum.CHANGE_TYPE_STATE, 
                                     EntryChangeControlStatesEnum.PREVIOUS_DN_STATE,
@@ -168,11 +168,11 @@ public final class EntryChangeControlGra
                 else
                 {
                     Value value = entryChangeContainer.getCurrentTLV().getValue();
-                    DN previousDn = null;
+                    Dn previousDn = null;
 
                     try
                     {
-                        previousDn = new DN( Strings.utf8ToString(value.getData()) );
+                        previousDn = new Dn( Strings.utf8ToString(value.getData()) );
                     }
                     catch ( LdapInvalidDnException ine )
                     {
@@ -225,7 +225,7 @@ public final class EntryChangeControlGra
         };
 
         // ============================================================================================
-        // Transition from Previous DN to Change Number
+        // Transition from Previous Dn to Change Number
         // ============================================================================================
         // EntryChangeNotification ::= SEQUENCE {
         //     ...
@@ -240,7 +240,7 @@ public final class EntryChangeControlGra
                 setChangeNumberAction );
 
         // ============================================================================================
-        // Transition from Previous DN to Change Number
+        // Transition from Previous Dn to Change Number
         // ============================================================================================
         // EntryChangeNotification ::= SEQUENCE {
         //     ...

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/AuthenticationLevel.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/AuthenticationLevel.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/AuthenticationLevel.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/AuthenticationLevel.java Sun Jan 23 01:17:06 2011
@@ -53,7 +53,7 @@ public enum AuthenticationLevel
     STRONG(2, "strong"),
 
     /**
-     * Unauthentication, if the BIND contains a DN but no credentials
+     * Unauthentication, if the BIND contains a Dn but no credentials
      */
     UNAUTHENT(3, "unauthent");
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/JndiPropertyConstants.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/JndiPropertyConstants.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/JndiPropertyConstants.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/JndiPropertyConstants.java Sun Jan 23 01:17:06 2011
@@ -83,7 +83,7 @@ public final class JndiPropertyConstants
     /** The controls to send when connectiong */
     public final static String JNDI_LDAP_CONTROL_CONNECT = "java.naming.ldap.control.connect";
 
-    /** Tells if the old RDN must be deleted when doing a MODDN */
+    /** Tells if the old Rdn must be deleted when doing a MODDN */
     public final static String JNDI_LDAP_DELETE_RDN = "java.naming.ldap.deleteRDN";
 
     /** Tells if and how we dereference aliases */

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java Sun Jan 23 01:17:06 2011
@@ -70,7 +70,7 @@ public final class SchemaConstants
     // Schema root
     public final static String OU_SCHEMA                            = "ou=schema";
 
-    // The DN for the schema modifications
+    // The Dn for the schema modifications
     public final static String SCHEMA_MODIFICATIONS_DN              = "cn=schemaModifications,ou=schema";
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/AttributeUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/AttributeUtils.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/AttributeUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/AttributeUtils.java Sun Jan 23 01:17:06 2011
@@ -34,15 +34,9 @@ import javax.naming.directory.BasicAttri
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.entry.DefaultEntry;
-import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
-import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeTypeException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -1023,12 +1017,12 @@ public final class AttributeUtils
      * Convert a BasicAttributes or a AttributesImpl to a ServerEntry
      *
      * @param attributes the BasicAttributes or AttributesImpl instance to convert
-     * @param dn The DN which is needed by the ServerEntry 
+     * @param dn The Dn which is needed by the ServerEntry
      * @return An instance of a ServerEntry object
      * 
      * @throws LdapException If we get an invalid attribute
      */
-    public static Entry toClientEntry( Attributes attributes, DN dn ) throws LdapException
+    public static Entry toClientEntry( Attributes attributes, Dn dn ) throws LdapException
     {
         if ( attributes instanceof BasicAttributes )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java Sun Jan 23 01:17:06 2011
@@ -32,11 +32,11 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.name.RdnSerializer;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -62,8 +62,8 @@ public class DefaultEntry implements Ent
     /** The logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultEntry.class );
 
-    /** The DN for this entry */
-    private DN dn;
+    /** The Dn for this entry */
+    private Dn dn;
 
     /** A map containing all the attributes for this entry */
     private Map<String, EntryAttribute> attributes = new HashMap<String, EntryAttribute>();
@@ -92,7 +92,7 @@ public class DefaultEntry implements Ent
     public DefaultEntry()
     {
         schemaManager = null;
-        dn = DN.EMPTY_DN;
+        dn = Dn.EMPTY_DN;
     }
 
 
@@ -109,7 +109,7 @@ public class DefaultEntry implements Ent
     public DefaultEntry( SchemaManager schemaManager )
     {
         this.schemaManager = schemaManager;
-        dn = DN.EMPTY_DN;
+        dn = Dn.EMPTY_DN;
 
         // Initialize the ObjectClass object
         initObjectClassAT();
@@ -118,11 +118,11 @@ public class DefaultEntry implements Ent
 
     /**
      * Creates a new instance of DefaultEntry, with a
-     * DN.
+     * Dn.
      *
-     * @param dn The DN for this serverEntry. Can be null.
+     * @param dn The Dn for this serverEntry. Can be null.
      */
-    public DefaultEntry( DN dn )
+    public DefaultEntry( Dn dn )
     {
         this.dn = dn;
     }
@@ -137,15 +137,15 @@ public class DefaultEntry implements Ent
      * </p>
      *
      * @param schemaManager The reference to the schemaManager
-     * @param dn The DN for this serverEntry. Can be null.
+     * @param dn The Dn for this serverEntry. Can be null.
      */
-    public DefaultEntry( SchemaManager schemaManager, DN dn )
+    public DefaultEntry( SchemaManager schemaManager, Dn dn )
     {
         this.schemaManager = schemaManager;
 
         if ( dn == null )
         {
-            this.dn = DN.EMPTY_DN;
+            this.dn = Dn.EMPTY_DN;
         }
         else
         {
@@ -160,12 +160,12 @@ public class DefaultEntry implements Ent
 
     /**
      * Creates a new instance of DefaultEntry, with a
-     * DN and a list of IDs.
+     * Dn and a list of IDs.
      *
-     * @param dn The DN for this serverEntry. Can be null.
+     * @param dn The Dn for this serverEntry. Can be null.
      * @param upIds The list of attributes to create.
      */
-    public DefaultEntry( DN dn, String... upIds )
+    public DefaultEntry( Dn dn, String... upIds )
     {
         this.dn = dn;
 
@@ -204,7 +204,7 @@ public class DefaultEntry implements Ent
         }
         else
         {
-            dn = DN.EMPTY_DN;
+            dn = Dn.EMPTY_DN;
         }
 
         // Init the attributes map
@@ -240,7 +240,7 @@ public class DefaultEntry implements Ent
 
     /**
      * Creates a new instance of DefaultEntry, with a
-     * DN, a list of ID and schema aware.
+     * Dn, a list of ID and schema aware.
      * <p>
      * No attributes will be created except the ObjectClass attribute,
      * which will contains "top".
@@ -248,16 +248,16 @@ public class DefaultEntry implements Ent
      * If any of the AttributeType does not exist, they are simply discarded.
      *
      * @param schemaManager The reference to the schemaManager
-     * @param dn The DN for this serverEntry. Can be null.
+     * @param dn The Dn for this serverEntry. Can be null.
      * @param upIds The list of attributes to create.
      */
-    public DefaultEntry( SchemaManager schemaManager, DN dn, String... upIds )
+    public DefaultEntry( SchemaManager schemaManager, Dn dn, String... upIds )
     {
         this.schemaManager = schemaManager;
 
         if ( dn == null )
         {
-            this.dn = DN.EMPTY_DN;
+            this.dn = Dn.EMPTY_DN;
         }
         else
         {
@@ -274,13 +274,13 @@ public class DefaultEntry implements Ent
     /**
      * <p>
      * Creates a new instance of DefaultEntry, with a
-     * DN and a list of EntryAttributes.
+     * Dn and a list of EntryAttributes.
      * </p>
      *
-     * @param dn The DN for this serverEntry. Can be null
+     * @param dn The Dn for this serverEntry. Can be null
      * @param attributes The list of attributes to create
      */
-    public DefaultEntry( DN dn, EntryAttribute... attributes )
+    public DefaultEntry( Dn dn, EntryAttribute... attributes )
     {
         this.dn = dn;
 
@@ -299,7 +299,7 @@ public class DefaultEntry implements Ent
 
     /**
      * Creates a new instance of DefaultEntry, with a
-     * DN, a list of ServerAttributes and schema aware.
+     * Dn, a list of ServerAttributes and schema aware.
      * <p>
      * No attributes will be created except the ObjectClass attribute,
      * which will contains "top".
@@ -307,16 +307,16 @@ public class DefaultEntry implements Ent
      * If any of the AttributeType does not exist, they are simply discarded.
      *
      * @param schemaManager The reference to the schemaManager
-     * @param dn The DN for this serverEntry. Can be null
+     * @param dn The Dn for this serverEntry. Can be null
      * @param attributes The list of attributes to create
      */
-    public DefaultEntry( SchemaManager schemaManager, DN dn, EntryAttribute... attributes )
+    public DefaultEntry( SchemaManager schemaManager, Dn dn, EntryAttribute... attributes )
     {
         this.schemaManager = schemaManager;
 
         if ( dn == null )
         {
-            this.dn = DN.EMPTY_DN;
+            this.dn = Dn.EMPTY_DN;
         }
         else
         {
@@ -344,7 +344,7 @@ public class DefaultEntry implements Ent
     /**
      * <p>
      * Creates a new instance of DefaultEntry, with a
-     * DN, a list of attributeTypes and schema aware.
+     * Dn, a list of attributeTypes and schema aware.
      * </p>
      * <p>
      * The newly created entry is fed with the list of attributeTypes. No
@@ -355,16 +355,16 @@ public class DefaultEntry implements Ent
      * </p>
      *
      * @param schemaManager The reference to the schemaManager
-     * @param dn The DN for this serverEntry. Can be null.
+     * @param dn The Dn for this serverEntry. Can be null.
      * @param attributeTypes The list of attributes to create, without value.
      */
-    public DefaultEntry( SchemaManager schemaManager, DN dn, AttributeType... attributeTypes )
+    public DefaultEntry( SchemaManager schemaManager, Dn dn, AttributeType... attributeTypes )
     {
         this.schemaManager = schemaManager;
 
         if ( dn == null )
         {
-            this.dn = DN.EMPTY_DN;
+            this.dn = Dn.EMPTY_DN;
         }
         else
         {
@@ -383,7 +383,7 @@ public class DefaultEntry implements Ent
     /**
      * <p>
      * Creates a new instance of DefaultEntry, with a
-     * DN, an attributeType with the user provided ID, and schema aware.
+     * Dn, an attributeType with the user provided ID, and schema aware.
      * </p>
      * <p>
      * The newly created entry is fed with the given attributeType. No
@@ -397,17 +397,17 @@ public class DefaultEntry implements Ent
      * </p>
      *
      * @param schemaManager The reference to the schemaManager
-     * @param dn The DN for this serverEntry. Can be null.
+     * @param dn The Dn for this serverEntry. Can be null.
      * @param attributeType The attribute to create, without value.
      * @param upId The User Provided ID fro this AttributeType
      */
-    public DefaultEntry( SchemaManager schemaManager, DN dn, AttributeType attributeType, String upId )
+    public DefaultEntry( SchemaManager schemaManager, Dn dn, AttributeType attributeType, String upId )
     {
         this.schemaManager = schemaManager;
 
         if ( dn == null )
         {
-            this.dn = DN.EMPTY_DN;
+            this.dn = Dn.EMPTY_DN;
         }
         else
         {
@@ -975,8 +975,8 @@ public class DefaultEntry implements Ent
                 return null;
             }
 
-            // An Entry has a DN and many attributes.
-            clone.dn = dn; // note that DN is immutable now
+            // An Entry has a Dn and many attributes.
+            clone.dn = dn; // note that Dn is immutable now
 
             // then clone the ClientAttribute Map.
             clone.attributes = ( Map<String, EntryAttribute> ) ( ( ( HashMap<String, EntryAttribute> ) attributes )
@@ -2428,22 +2428,22 @@ public class DefaultEntry implements Ent
 
 
     /**
-     * Get this entry's DN.
+     * Get this entry's Dn.
      *
-     * @return The entry's DN
+     * @return The entry's Dn
      */
-    public DN getDn()
+    public Dn getDn()
     {
         return dn;
     }
 
 
     /**
-     * Set this entry's DN.
+     * Set this entry's Dn.
      *
-     * @param dn The DN associated with this entry
+     * @param dn The Dn associated with this entry
      */
-    public void setDn( DN dn )
+    public void setDn( Dn dn )
     {
         this.dn = dn;
 
@@ -2453,7 +2453,7 @@ public class DefaultEntry implements Ent
 
 
     /**
-     * Remove all the attributes for this entry. The DN is not reset
+     * Remove all the attributes for this entry. The Dn is not reset
      */
     public void clear()
     {
@@ -2522,7 +2522,7 @@ public class DefaultEntry implements Ent
      * The structure used to store the entry is the following :
      * <ul>
      *   <li>
-     *     <b>[DN]</b> : If it's null, stores an empty DN
+     *     <b>[Dn]</b> : If it's null, stores an empty Dn
      *   </li>
      *   <li>
      *     <b>[attributes number]</b> : the number of attributes.
@@ -2536,15 +2536,15 @@ public class DefaultEntry implements Ent
      */
     public void writeExternal( ObjectOutput out ) throws IOException
     {
-        // First, the DN
+        // First, the Dn
         if ( dn == null )
         {
-            // Write an empty DN
-            out.writeObject( DN.EMPTY_DN );
+            // Write an empty Dn
+            out.writeObject( Dn.EMPTY_DN );
         }
         else
         {
-            // Write the DN
+            // Write the Dn
             out.writeObject( dn );
         }
 
@@ -2568,8 +2568,8 @@ public class DefaultEntry implements Ent
      */
     public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
     {
-        // Read the DN
-        dn = ( DN ) in.readObject();
+        // Read the Dn
+        dn = (Dn) in.readObject();
 
         // Read the number of attributes
         int nbAttributes = in.readInt();
@@ -2607,8 +2607,8 @@ public class DefaultEntry implements Ent
      * Serialize an Entry.
      *
      * The structure is the following :
-     * <b>[a byte]</b> : if the DN is empty 0 will be written else 1
-     * <b>[RDN]</b> : The entry's RDN.
+     * <b>[a byte]</b> : if the Dn is empty 0 will be written else 1
+     * <b>[Rdn]</b> : The entry's Rdn.
      * <b>[numberAttr]</b> : the bumber of attributes. Can be 0
      * <b>[attribute's oid]*</b> : The attribute's OID to get back
      * the attributeType on deserialization
@@ -2619,8 +2619,8 @@ public class DefaultEntry implements Ent
      */
     public void serialize( ObjectOutput out ) throws IOException
     {
-        // First, the DN
-        // Write the RDN of the DN
+        // First, the Dn
+        // Write the Rdn of the Dn
         if ( dn.getRdn() == null )
         {
             out.writeByte( 0 );
@@ -2683,15 +2683,15 @@ public class DefaultEntry implements Ent
      */
     public void deserialize( ObjectInput in ) throws IOException, ClassNotFoundException
     {
-        // Read the DN
-        dn = DN.EMPTY_DN;
+        // Read the Dn
+        dn = Dn.EMPTY_DN;
 
         byte b = in.readByte();
 
         if ( b == 1 )
         {
-            RDN rdn = RdnSerializer.deserialize( in );
-            dn = new DN( rdn );
+            Rdn rdn = RdnSerializer.deserialize( in );
+            dn = new Dn( rdn );
         }
 
         // Read the number of attributes
@@ -2860,7 +2860,7 @@ public class DefaultEntry implements Ent
 
         DefaultEntry other = ( DefaultEntry ) o;
 
-        // Both DN must be equal
+        // Both Dn must be equal
         if ( dn == null )
         {
             if ( other.getDn() != null )
@@ -2973,11 +2973,11 @@ public class DefaultEntry implements Ent
 
 
     /**
-     * normalizes the given DN if it was not already normalized
+     * normalizes the given Dn if it was not already normalized
      *
-     * @param dn the DN to be normalized
+     * @param dn the Dn to be normalized
      */
-    private void normalizeDN( DN dn )
+    private void normalizeDN( Dn dn )
     {
         if ( !dn.isNormalized() )
         {
@@ -2988,7 +2988,7 @@ public class DefaultEntry implements Ent
             }
             catch ( LdapException ne )
             {
-                LOG.warn( "The DN '{}' cannot be normalized", dn );
+                LOG.warn( "The Dn '{}' cannot be normalized", dn );
             }
         }
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Entry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Entry.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Entry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Entry.java Sun Jan 23 01:17:06 2011
@@ -26,14 +26,14 @@ import java.util.Set;
 
 import org.apache.directory.shared.ldap.exception.LdapException;
 
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
 
 /**
  * <p>
  * This interface represent a LDAP entry. An LDAP entry contains :
- * <li> A distinguished name (DN)</li>
+ * <li> A distinguished name (Dn)</li>
  * <li> A list of attributes</li>
  * </p>
  * <p>
@@ -47,7 +47,7 @@ import org.apache.directory.shared.ldap.
 public interface Entry extends Cloneable, Iterable<EntryAttribute>, Externalizable
 {
     /**
-     * Remove all the attributes for this entry. The DN is not reset
+     * Remove all the attributes for this entry. The Dn is not reset
      */
     void clear();
 
@@ -59,11 +59,11 @@ public interface Entry extends Cloneable
 
 
     /**
-     * Get this entry's DN.
+     * Get this entry's Dn.
      *
-     * @return The entry's DN
+     * @return The entry's Dn
      */
-    DN getDn();
+    Dn getDn();
 
 
     /**
@@ -161,11 +161,11 @@ public interface Entry extends Cloneable
 
 
     /**
-     * Set this entry's DN.
+     * Set this entry's Dn.
      *
-     * @param dn The DN associated with this entry
+     * @param dn The Dn associated with this entry
      */
-    void setDn( DN dn );
+    void setDn( Dn dn );
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/ImmutableEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/ImmutableEntry.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/ImmutableEntry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/ImmutableEntry.java Sun Jan 23 01:17:06 2011
@@ -26,9 +26,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 
 
@@ -570,22 +570,22 @@ public class ImmutableEntry implements E
 
 
     /**
-     * Get this entry's DN.
+     * Get this entry's Dn.
      *
-     * @return The entry's DN
+     * @return The entry's Dn
      */
-    public DN getDn()
+    public Dn getDn()
     {
         return entry.getDn();
     }
 
 
     /**
-     * Set this entry's DN.
+     * Set this entry's Dn.
      *
-     * @param dn The DN associated with this entry
+     * @param dn The Dn associated with this entry
      */
-    public void setDn( DN dn )
+    public void setDn( Dn dn )
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot rename the entry " + entry.getDn() + " is immutable." );
@@ -593,7 +593,7 @@ public class ImmutableEntry implements E
 
 
     /**
-     * Remove all the attributes for this entry. The DN is not reset
+     * Remove all the attributes for this entry. The Dn is not reset
      */
     public void clear()
     {
@@ -663,7 +663,7 @@ public class ImmutableEntry implements E
      * The structure used to store the entry is the following :
      * <ul>
      *   <li>
-     *     <b>[DN]</b> : If it's null, stores an empty DN
+     *     <b>[Dn]</b> : If it's null, stores an empty Dn
      *   </li>
      *   <li>
      *     <b>[attributes number]</b> : the number of attributes.
@@ -695,8 +695,8 @@ public class ImmutableEntry implements E
      * Serialize an Entry.
      * 
      * The structure is the following :
-     * <b>[a byte]</b> : if the DN is empty 0 will be written else 1
-     * <b>[RDN]</b> : The entry's RDN.
+     * <b>[a byte]</b> : if the Dn is empty 0 will be written else 1
+     * <b>[Rdn]</b> : The entry's Rdn.
      * <b>[numberAttr]</b> : the bumber of attributes. Can be 0 
      * <b>[attribute's oid]*</b> : The attribute's OID to get back 
      * the attributeType on deserialization

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/AbstractLdapReferralException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/AbstractLdapReferralException.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/AbstractLdapReferralException.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/AbstractLdapReferralException.java Sun Jan 23 01:17:06 2011
@@ -25,9 +25,9 @@ import java.util.Hashtable;
 import javax.naming.Context;
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DN;
 
 
 /**
@@ -41,8 +41,8 @@ public class AbstractLdapReferralExcepti
     /** The serial version UUID */
     static final long serialVersionUID = 1L;
 
-    /** The remaining DN */
-    private DN remainingDn;
+    /** The remaining Dn */
+    private Dn remainingDn;
 
     /** TODO */
     private Object resolvedObject;
@@ -92,7 +92,7 @@ public class AbstractLdapReferralExcepti
     /**
      * @return the remainingDn
      */
-    public DN getRemainingDn()
+    public Dn getRemainingDn()
     {
         return remainingDn;
     }
@@ -101,7 +101,7 @@ public class AbstractLdapReferralExcepti
     /**
      * @param remainingDn the remainingName to set
      */
-    public void setRemainingDn( DN remainingDn )
+    public void setRemainingDn( Dn remainingDn )
     {
         this.remainingDn = remainingDn;
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapOperationException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapOperationException.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapOperationException.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapOperationException.java Sun Jan 23 01:17:06 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 
 
 /**
@@ -38,14 +38,14 @@ public class LdapOperationException exte
     /** The operation resultCode */
     protected ResultCodeEnum resultCode;
 
-    /** The resolved DN */
-    protected DN resolvedDn;
+    /** The resolved Dn */
+    protected Dn resolvedDn;
 
 
     /**
      * @return the resolvedDn
      */
-    public DN getResolvedDn()
+    public Dn getResolvedDn()
     {
         return resolvedDn;
     }
@@ -54,7 +54,7 @@ public class LdapOperationException exte
     /**
      * @param resolvedDn the resolvedDn to set
      */
-    public void setResolvedDn( DN resolvedDn )
+    public void setResolvedDn( Dn resolvedDn )
     {
         this.resolvedDn = resolvedDn;
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapReferralException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapReferralException.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapReferralException.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapReferralException.java Sun Jan 23 01:17:06 2011
@@ -28,9 +28,9 @@ import java.util.List;
 import javax.naming.Context;
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.DN;
 
 
 /**
@@ -50,8 +50,8 @@ public class LdapReferralException exten
     /** The current index in the list of referrals */
     private int index = 0;
 
-    /** The remaining DN */
-    private DN remainingDn;
+    /** The remaining Dn */
+    private Dn remainingDn;
 
     /** TODO */
     private Object resolvedObject;
@@ -129,7 +129,7 @@ public class LdapReferralException exten
     /**
      * @return the remainingDn
      */
-    public DN getRemainingDn()
+    public Dn getRemainingDn()
     {
         return remainingDn;
     }
@@ -138,7 +138,7 @@ public class LdapReferralException exten
     /**
      * @param remainingDn the remainingName to set
      */
-    public void setRemainingDn( DN remainingDn )
+    public void setRemainingDn( Dn remainingDn )
     {
         this.remainingDn = remainingDn;
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LdapURL.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LdapURL.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LdapURL.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LdapURL.java Sun Jan 23 01:17:06 2011
@@ -34,7 +34,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.exception.LdapUriException;
 import org.apache.directory.shared.ldap.exception.UrlDecoderException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.util.Chars;
 import org.apache.directory.shared.util.StringConstants;
 import org.apache.directory.shared.util.Strings;
@@ -51,7 +51,7 @@ import org.apache.directory.shared.util.
  * scheme     = "ldap"
  * attributes = attrdesc *("," attrdesc)
  * scope      = "base" / "one" / "sub"
- * dn         = DN
+ * dn         = Dn
  * hostport   = hostport from Section 5 of RFC 1738
  * attrdesc   = AttributeDescription from Section 4.1.5 of RFC 2251
  * filter     = filter from Section 4 of RFC 2254
@@ -91,8 +91,8 @@ public class LdapURL
     /** The port */
     private int port;
 
-    /** The DN */
-    private DN dn;
+    /** The Dn */
+    private Dn dn;
 
     /** The attributes */
     private List<String> attributes;
@@ -199,7 +199,7 @@ public class LdapURL
             return;
         }
 
-        // An optional DN
+        // An optional Dn
         if ( ( pos = parseDN( chars, pos ) ) == -1 )
         {
             throw new LdapURLEncodingException( I18n.err( I18n.ERR_04401 ) );
@@ -742,11 +742,11 @@ public class LdapURL
 
     /**
      * Parse a string and check that it complies with RFC 2253. Here, we will
-     * just call the DN parser to do the job.
+     * just call the Dn parser to do the job.
      * 
      * @param chars The char array to be checked
      * @param pos the starting position
-     * @return -1 if the char array does not contains a DN
+     * @return -1 if the char array does not contains a Dn
      */
     private int parseDN( char[] chars, int pos )
     {
@@ -760,7 +760,7 @@ public class LdapURL
 
         try
         {
-            dn = new DN( decode( new String( chars, pos, end - pos ) ) );
+            dn = new Dn( decode( new String( chars, pos, end - pos ) ) );
         }
         catch ( LdapUriException ue )
         {
@@ -1458,7 +1458,7 @@ public class LdapURL
     /**
      * @return Returns the dn.
      */
-    public DN getDn()
+    public Dn getDn()
     {
         return dn;
     }
@@ -1695,7 +1695,7 @@ public class LdapURL
      * 
      * @param dn the new dn
      */
-    public void setDn( DN dn )
+    public void setDn( Dn dn )
     {
         this.dn = dn;
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java Sun Jan 23 01:17:06 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 
 
 /**
@@ -36,7 +36,7 @@ public class ScopeNode extends AbstractE
     private final SearchScope scope;
 
     /** the search base */
-    private final DN baseDn;
+    private final Dn baseDn;
 
     /** the alias dereferencing mode */
     private final AliasDerefMode aliasDerefAliases;
@@ -49,7 +49,7 @@ public class ScopeNode extends AbstractE
      * @param baseDn the search base
      * @param scope the search scope
      */
-    public ScopeNode( AliasDerefMode aliasDerefAliases, DN baseDn, SearchScope scope )
+    public ScopeNode( AliasDerefMode aliasDerefAliases, Dn baseDn, SearchScope scope )
     {
         super( AssertionType.SCOPE );
         this.scope = scope;
@@ -86,7 +86,7 @@ public class ScopeNode extends AbstractE
      * 
      * @return the base dn
      */
-    public DN getBaseDn()
+    public Dn getBaseDn()
     {
         return baseDn;
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java Sun Jan 23 01:17:06 2011
@@ -178,7 +178,7 @@ public class LdifAttributesReader extend
 
         String attributeType = lowerLine.substring( 0, colonIndex );
 
-        // We should *not* have a DN twice
+        // We should *not* have a Dn twice
         if ( attributeType.equals( "dn" ) )
         {
             LOG.error( I18n.err( I18n.ERR_12002_ENTRY_WITH_TWO_DNS ) );
@@ -218,7 +218,7 @@ public class LdifAttributesReader extend
         String attributeName = lowerLine.substring( 0, colonIndex );
         AttributeType attributeType = null;
 
-        // We should *not* have a DN twice
+        // We should *not* have a Dn twice
         if ( attributeName.equals( "dn" ) )
         {
             LOG.error( I18n.err( I18n.ERR_12002_ENTRY_WITH_TWO_DNS ) );
@@ -337,9 +337,9 @@ public class LdifAttributesReader extend
             String lowerLine = line.toLowerCase();
 
             // We have three cases :
-            // 1) The first line after the DN is a "control:" -> this is an error
-            // 2) The first line after the DN is a "changeType:" -> this is an error
-            // 3) The first line after the DN is anything else
+            // 1) The first line after the Dn is a "control:" -> this is an error
+            // 2) The first line after the Dn is a "changeType:" -> this is an error
+            // 3) The first line after the Dn is anything else
             if ( lowerLine.startsWith( "control:" ) )
             {
                 LOG.error( I18n.err( I18n.ERR_12004_CHANGE_NOT_ALLOWED ) );
@@ -399,9 +399,9 @@ public class LdifAttributesReader extend
             String lowerLine = line.toLowerCase();
 
             // We have three cases :
-            // 1) The first line after the DN is a "control:" -> this is an error
-            // 2) The first line after the DN is a "changeType:" -> this is an error
-            // 3) The first line after the DN is anything else
+            // 1) The first line after the Dn is a "control:" -> this is an error
+            // 2) The first line after the Dn is a "changeType:" -> this is an error
+            // 3) The first line after the Dn is anything else
             if ( lowerLine.startsWith( "control:" ) )
             {
                 LOG.error( I18n.err( I18n.ERR_12004_CHANGE_NOT_ALLOWED ) );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java Sun Jan 23 01:17:06 2011
@@ -44,8 +44,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.name.Dn;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.util.Unicode;
 
 
@@ -57,8 +57,8 @@ import org.apache.directory.shared.util.
  * <li>added entries</li>
  * <li>deleted entries</li>
  * <li>modified entries</li>
- * <li>RDN modified entries</li>
- * <li>DN modified entries</li>
+ * <li>Rdn modified entries</li>
+ * <li>Dn modified entries</li>
  * </ul>
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -104,7 +104,7 @@ public class LdifEntry implements Clonea
         changeType = ChangeType.None; // Default LDIF content
         modificationList = new LinkedList<Modification>();
         modificationItems = new HashMap<String, Modification>();
-        entry = new DefaultEntry( ( DN ) null );
+        entry = new DefaultEntry( (Dn) null );
         controls = null;
     }
 
@@ -114,7 +114,7 @@ public class LdifEntry implements Clonea
      * 
      * @param dn The Distinguished Name
      */
-    public void setDn( DN dn )
+    public void setDn( Dn dn )
     {
         entry.setDn( dn );
     }
@@ -124,11 +124,11 @@ public class LdifEntry implements Clonea
      * Set the Distinguished Name
      * 
      * @param dn The Distinguished Name
-     * @throws LdapInvalidDnException If the DN is invalid
+     * @throws LdapInvalidDnException If the Dn is invalid
      */
     public void setDn( String dn ) throws LdapInvalidDnException
     {
-        entry.setDn( new DN( dn ) );
+        entry.setDn( new Dn( dn ) );
     }
 
 
@@ -373,7 +373,7 @@ public class LdifEntry implements Clonea
     /**
      * @return The entry Distinguished name
      */
-    public DN getDn()
+    public Dn getDn()
     {
         return entry.getDn();
     }
@@ -425,7 +425,7 @@ public class LdifEntry implements Clonea
 
 
     /**
-     * @return True, if the old RDN should be deleted.
+     * @return True, if the old Rdn should be deleted.
      */
     public boolean isDeleteOldRdn()
     {
@@ -436,7 +436,7 @@ public class LdifEntry implements Clonea
     /**
      * Set the flage deleteOldRdn
      * 
-     * @param deleteOldRdn True if the old RDN should be deleted
+     * @param deleteOldRdn True if the old Rdn should be deleted
      */
     public void setDeleteOldRdn( boolean deleteOldRdn )
     {
@@ -445,7 +445,7 @@ public class LdifEntry implements Clonea
 
 
     /**
-     * @return The new RDN
+     * @return The new Rdn
      */
     public String getNewRdn()
     {
@@ -454,9 +454,9 @@ public class LdifEntry implements Clonea
 
 
     /**
-     * Set the new RDN
+     * Set the new Rdn
      * 
-     * @param newRdn The new RDN
+     * @param newRdn The new Rdn
      */
     public void setNewRdn( String newRdn )
     {
@@ -788,9 +788,9 @@ public class LdifEntry implements Clonea
 
         LdifEntry otherEntry = ( LdifEntry ) o;
 
-        // Check the DN
-        DN thisDn = entry.getDn();
-        DN dnEntry = otherEntry.getDn();
+        // Check the Dn
+        Dn thisDn = entry.getDn();
+        Dn dnEntry = otherEntry.getDn();
 
         if ( !thisDn.equals( dnEntry ) )
         {
@@ -876,8 +876,8 @@ public class LdifEntry implements Clonea
                 // Check the newRdn value
                 try
                 {
-                    RDN thisNewRdn = new RDN( newRdn );
-                    RDN entryNewRdn = new RDN( otherEntry.newRdn );
+                    Rdn thisNewRdn = new Rdn( newRdn );
+                    Rdn entryNewRdn = new Rdn( otherEntry.newRdn );
 
                     if ( !thisNewRdn.equals( entryNewRdn ) )
                     {
@@ -892,8 +892,8 @@ public class LdifEntry implements Clonea
                 // Check the newSuperior value
                 try
                 {
-                    DN thisNewSuperior = new DN( newSuperior );
-                    DN entryNewSuperior = new DN( otherEntry.newSuperior );
+                    Dn thisNewSuperior = new Dn( newSuperior );
+                    Dn entryNewSuperior = new Dn( otherEntry.newSuperior );
 
                     if ( !thisNewSuperior.equals( entryNewSuperior ) )
                     {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java Sun Jan 23 01:17:06 2011
@@ -43,6 +43,7 @@ import java.util.NoSuchElementException;
 
 import org.apache.directory.shared.asn1.util.OID;
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -50,9 +51,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.message.control.Control;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
 import org.apache.directory.shared.ldap.name.DnParser;
-import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.util.Base64;
 import org.apache.directory.shared.util.Chars;
 import org.apache.directory.shared.util.Strings;
@@ -483,11 +483,11 @@ public class LdifReader implements Itera
 
 
     /**
-     * Parse the DN of an entry
+     * Parse the Dn of an entry
      * 
      * @param line The line to parse
-     * @return A DN
-     * @throws LdapLdifException If the DN is invalid
+     * @return A Dn
+     * @throws LdapLdifException If the Dn is invalid
      */
     private String parseDn( String line ) throws LdapLdifException
     {
@@ -495,14 +495,14 @@ public class LdifReader implements Itera
 
         String lowerLine = line.toLowerCase();
 
-        if ( lowerLine.startsWith( "dn:" ) || lowerLine.startsWith( "DN:" ) )
+        if ( lowerLine.startsWith( "dn:" ) || lowerLine.startsWith( "Dn:" ) )
         {
-            // Ok, we have a DN. Is it base 64 encoded ?
+            // Ok, we have a Dn. Is it base 64 encoded ?
             int length = line.length();
 
             if ( length == 3 )
             {
-                // The DN is empty : error
+                // The Dn is empty : error
                 LOG.error( I18n.err( I18n.ERR_12012_EMPTY_DN_NOT_ALLOWED ) );
                 throw new LdapLdifException( I18n.err( I18n.ERR_12013_NO_DN ) );
             }
@@ -510,7 +510,7 @@ public class LdifReader implements Itera
             {
                 if ( length > 4 )
                 {
-                    // This is a base 64 encoded DN.
+                    // This is a base 64 encoded Dn.
                     String trimmedLine = line.substring( 4 ).trim();
 
                     try
@@ -519,14 +519,14 @@ public class LdifReader implements Itera
                     }
                     catch ( UnsupportedEncodingException uee )
                     {
-                        // The DN is not base 64 encoded
+                        // The Dn is not base 64 encoded
                         LOG.error( I18n.err( I18n.ERR_12014_BASE64_DN_EXPECTED ) );
                         throw new LdapLdifException( I18n.err( I18n.ERR_12015_INVALID_BASE64_DN ) );
                     }
                 }
                 else
                 {
-                    // The DN is empty : error
+                    // The Dn is empty : error
                     LOG.error( I18n.err( I18n.ERR_12012_EMPTY_DN_NOT_ALLOWED ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12013_NO_DN ) );
                 }
@@ -542,10 +542,10 @@ public class LdifReader implements Itera
             throw new LdapLdifException( I18n.err( I18n.ERR_12013_NO_DN ) );
         }
 
-        // Check that the DN is valid. If not, an exception will be thrown
+        // Check that the Dn is valid. If not, an exception will be thrown
         try
         {
-            DnParser.parseInternal( dn, new ArrayList<RDN>() );
+            DnParser.parseInternal( dn, new ArrayList<Rdn>() );
         }
         catch ( LdapInvalidDnException ine )
         {
@@ -881,7 +881,7 @@ public class LdifReader implements Itera
 
         String attributeType = lowerLine.substring( 0, colonIndex );
 
-        // We should *not* have a DN twice
+        // We should *not* have a Dn twice
         if ( attributeType.equals( "dn" ) )
         {
             LOG.error( I18n.err( I18n.ERR_12002_ENTRY_WITH_TWO_DNS ) );
@@ -1082,7 +1082,7 @@ public class LdifReader implements Itera
                     throw new LdapLdifException( I18n.err( I18n.ERR_12045 ) );
                 }
 
-                // We should *not* have a DN twice
+                // We should *not* have a Dn twice
                 if ( attributeType.equalsIgnoreCase( "dn" ) )
                 {
                     LOG.error( I18n.err( I18n.ERR_12002_ENTRY_WITH_TWO_DNS ) );
@@ -1127,9 +1127,9 @@ public class LdifReader implements Itera
      *     // To be checked 
      *     "changetype:" FILL "moddn" SEP &lt;newrdn&gt; SEP &lt;deleteoldrdn&gt; SEP &lt;newsuperior&gt; SEP | 
      *     "changetype:" FILL "modify" SEP &lt;mod-spec&gt; &lt;mod-specs-e&gt; 
-     * &lt;newrdn&gt; ::= "newrdn:" FILL RDN | "newrdn::" FILL BASE64-RDN 
+     * &lt;newrdn&gt; ::= "newrdn:" FILL Rdn | "newrdn::" FILL BASE64-Rdn
      * &lt;deleteoldrdn&gt; ::= "deleteoldrdn:" FILL "0" | "deleteoldrdn:" FILL "1" 
-     * &lt;newsuperior&gt; ::= "newsuperior:" FILL DN | "newsuperior::" FILL BASE64-DN 
+     * &lt;newsuperior&gt; ::= "newsuperior:" FILL Dn | "newsuperior::" FILL BASE64-Dn
      * &lt;mod-specs-e&gt; ::= &lt;mod-spec&gt; &lt;mod-specs-e&gt; | e 
      * &lt;mod-spec&gt; ::= "add:" &lt;mod-val&gt; | "delete:" &lt;mod-val&gt; | "replace:" &lt;mod-val&gt; 
      * &lt;mod-val&gt; ::= FILL ATTRIBUTE-DESCRIPTION SEP ATTRVAL-SPEC &lt;attrval-specs-e&gt; "-" SEP
@@ -1248,9 +1248,9 @@ public class LdifReader implements Itera
 
         String name = parseDn( line );
 
-        DN dn = new DN( name );
+        Dn dn = new Dn( name );
 
-        // Ok, we have found a DN
+        // Ok, we have found a Dn
         LdifEntry entry = new LdifEntry();
         entry.setDn( dn );
 
@@ -1283,9 +1283,9 @@ public class LdifReader implements Itera
             lowerLine = line.toLowerCase();
 
             // We have three cases :
-            // 1) The first line after the DN is a "control:"
-            // 2) The first line after the DN is a "changeType:"
-            // 3) The first line after the DN is anything else
+            // 1) The first line after the Dn is a "control:"
+            // 2) The first line after the Dn is a "changeType:"
+            // 3) The first line after the Dn is anything else
             if ( lowerLine.startsWith( "control:" ) )
             {
                 if ( containsEntries )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java Sun Jan 23 01:17:06 2011
@@ -29,9 +29,9 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.entry.*;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.AVA;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.name.Ava;
+import org.apache.directory.shared.ldap.name.Dn;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.entry.AttributeUtils;
 
 
@@ -42,10 +42,10 @@ import org.apache.directory.shared.ldap.
  */
 public final class LdifRevertor
 {
-    /** Flag used when we want to delete the old RDN */
+    /** Flag used when we want to delete the old Rdn */
     public static final boolean DELETE_OLD_RDN = true;
 
-    /** Flag used when we want to keep the old RDN */
+    /** Flag used when we want to keep the old Rdn */
     public static final boolean KEEP_OLD_RDN = false;
 
 
@@ -64,7 +64,7 @@ public final class LdifRevertor
      * @param dn the dn of the added entry
      * @return a reverse LDIF
      */
-    public static LdifEntry reverseAdd( DN dn )
+    public static LdifEntry reverseAdd( Dn dn )
     {
         LdifEntry entry = new LdifEntry();
         entry.setChangeType( ChangeType.Delete );
@@ -77,12 +77,12 @@ public final class LdifRevertor
      * Compute a reverse LDIF of a DeleteRequest. We have to get the previous
      * entry in order to restore it.
      *
-     * @param dn The deleted entry DN
+     * @param dn The deleted entry Dn
      * @param deletedEntry The entry which has been deleted
      * @return A reverse LDIF
      * @throws LdapException If something went wrong
      */
-    public static LdifEntry reverseDel( DN dn, Entry deletedEntry ) throws LdapException
+    public static LdifEntry reverseDel( Dn dn, Entry deletedEntry ) throws LdapException
     {
         LdifEntry entry = new LdifEntry();
 
@@ -118,7 +118,7 @@ public final class LdifRevertor
      * @return A reversed LDIF
      * @throws LdapException If something went wrong
      */
-    public static LdifEntry reverseModify( DN dn, List<Modification> forwardModifications, Entry modifiedEntry )
+    public static LdifEntry reverseModify( Dn dn, List<Modification> forwardModifications, Entry modifiedEntry )
         throws LdapException
     {
         // First, protect the original entry by cloning it : we will modify it
@@ -256,12 +256,12 @@ public final class LdifRevertor
      * @return a reverse LDIF
      * @throws LdapException if something went wrong
      */
-    public static LdifEntry reverseMove( DN newSuperiorDn, DN modifiedDn ) throws LdapException
+    public static LdifEntry reverseMove( Dn newSuperiorDn, Dn modifiedDn ) throws LdapException
     {
         LdifEntry entry = new LdifEntry();
-        DN currentParent = null;
-        RDN currentRdn = null;
-        DN newDn = null;
+        Dn currentParent = null;
+        Rdn currentRdn = null;
+        Dn newDn = null;
 
         if ( newSuperiorDn == null )
         {
@@ -297,18 +297,18 @@ public final class LdifRevertor
     /**
      * A small helper class to compute the simple revert.
      */
-    private static LdifEntry revertEntry( Entry entry, DN newDn, DN newSuperior, RDN oldRdn, RDN newRdn )
+    private static LdifEntry revertEntry( Entry entry, Dn newDn, Dn newSuperior, Rdn oldRdn, Rdn newRdn )
         throws LdapInvalidDnException
     {
         LdifEntry reverted = new LdifEntry();
 
-        // We have a composite old RDN, something like A=a+B=b
+        // We have a composite old Rdn, something like A=a+B=b
         // It does not matter if the RDNs overlap
         reverted.setChangeType( ChangeType.ModRdn );
 
         if ( newSuperior != null )
         {
-            DN restoredDn = newSuperior.add( newRdn );
+            Dn restoredDn = newSuperior.add( newRdn );
             reverted.setDn( restoredDn );
         }
         else
@@ -327,7 +327,7 @@ public final class LdifRevertor
 
         if ( newSuperior != null )
         {
-            DN oldSuperior = entry.getDn();
+            Dn oldSuperior = entry.getDn();
 
             oldSuperior = oldSuperior.remove( oldSuperior.size() - 1 );
             reverted.setNewSuperior( oldSuperior.getName() );
@@ -340,16 +340,16 @@ public final class LdifRevertor
     /**
      * A helper method to generate the modified attribute after a rename.
      */
-    private static LdifEntry generateModify( DN parentDn, Entry entry, RDN oldRdn, RDN newRdn )
+    private static LdifEntry generateModify( Dn parentDn, Entry entry, Rdn oldRdn, Rdn newRdn )
     {
         LdifEntry restored = new LdifEntry();
         restored.setChangeType( ChangeType.Modify );
 
-        // We have to use the parent DN, the entry has already
+        // We have to use the parent Dn, the entry has already
         // been renamed
         restored.setDn( parentDn );
 
-        for ( AVA ava : newRdn )
+        for ( Ava ava : newRdn )
         {
             // No need to add something which has already been added
             // in the previous modification
@@ -372,7 +372,7 @@ public final class LdifRevertor
     /**
      * A helper method which generates a reverted entry
      */
-    private static LdifEntry generateReverted( DN newSuperior, RDN newRdn, DN newDn, RDN oldRdn, boolean deleteOldRdn )
+    private static LdifEntry generateReverted( Dn newSuperior, Rdn newRdn, Dn newDn, Rdn oldRdn, boolean deleteOldRdn )
         throws LdapInvalidDnException
     {
         LdifEntry reverted = new LdifEntry();
@@ -380,7 +380,7 @@ public final class LdifRevertor
 
         if ( newSuperior != null )
         {
-            DN restoredDn = newSuperior.add( newRdn );
+            Dn restoredDn = newSuperior.add( newRdn );
             reverted.setDn( restoredDn );
         }
         else
@@ -392,7 +392,7 @@ public final class LdifRevertor
 
         if ( newSuperior != null )
         {
-            DN oldSuperior = newDn;
+            Dn oldSuperior = newDn;
 
             oldSuperior = oldSuperior.remove( oldSuperior.size() - 1 );
             reverted.setNewSuperior( oldSuperior.getName() );
@@ -406,17 +406,17 @@ public final class LdifRevertor
 
 
     /**
-     * Revert a DN to it's previous version by removing the first RDN and adding the given RDN.
+     * Revert a Dn to it's previous version by removing the first Rdn and adding the given Rdn.
      * It's a rename operation. The biggest issue is that we have many corner cases, depending 
      * on the RDNs we are manipulating, and on the content of the initial entry.
      * 
      * @param entry The initial Entry
-     * @param newRdn The new RDN
-     * @param deleteOldRdn A flag which tells to delete the old RDN AVAs
+     * @param newRdn The new Rdn
+     * @param deleteOldRdn A flag which tells to delete the old Rdn AVAs
      * @return A list of LDIF reverted entries 
      * @throws LdapInvalidDnException If the name reverting failed
      */
-    public static List<LdifEntry> reverseRename( Entry entry, RDN newRdn, boolean deleteOldRdn )
+    public static List<LdifEntry> reverseRename( Entry entry, Rdn newRdn, boolean deleteOldRdn )
         throws LdapInvalidDnException
     {
         return reverseMoveAndRename( entry, null, newRdn, deleteOldRdn );
@@ -424,22 +424,22 @@ public final class LdifRevertor
 
 
     /**
-     * Revert a DN to it's previous version by removing the first RDN and adding the given RDN.
+     * Revert a Dn to it's previous version by removing the first Rdn and adding the given Rdn.
      * It's a rename operation. The biggest issue is that we have many corner cases, depending 
      * on the RDNs we are manipulating, and on the content of the initial entry.
      * 
      * @param entry The initial Entry
-     * @param newSuperior The new superior DN (can be null if it's just a rename)
-     * @param newRdn The new RDN
-     * @param deleteOldRdn A flag which tells to delete the old RDN AVAs
+     * @param newSuperior The new superior Dn (can be null if it's just a rename)
+     * @param newRdn The new Rdn
+     * @param deleteOldRdn A flag which tells to delete the old Rdn AVAs
      * @return A list of LDIF reverted entries 
      * @throws LdapInvalidDnException If the name reverting failed
      */
-    public static List<LdifEntry> reverseMoveAndRename( Entry entry, DN newSuperior, RDN newRdn, boolean deleteOldRdn )
+    public static List<LdifEntry> reverseMoveAndRename( Entry entry, Dn newSuperior, Rdn newRdn, boolean deleteOldRdn )
         throws LdapInvalidDnException
     {
-        DN parentDn = entry.getDn();
-        DN newDn = null;
+        Dn parentDn = entry.getDn();
+        Dn newDn = null;
 
         if ( newRdn == null )
         {
@@ -457,7 +457,7 @@ public final class LdifRevertor
         }
 
         parentDn = entry.getDn();
-        RDN oldRdn = parentDn.getRdn();
+        Rdn oldRdn = parentDn.getRdn();
 
         newDn = parentDn;
         newDn = newDn.remove( newDn.size() - 1 );
@@ -469,10 +469,10 @@ public final class LdifRevertor
         // Start with the cases here
         if ( newRdn.size() == 1 )
         {
-            // We have a simple new RDN, something like A=a
+            // We have a simple new Rdn, something like A=a
             if ( ( oldRdn.size() == 1 ) && ( oldRdn.equals( newRdn ) ) )
             {
-                // We have a simple old RDN, something like A=a
+                // We have a simple old Rdn, something like A=a
                 // If the values overlap, we can't rename the entry, just get out
                 // with an error
                 throw new LdapInvalidDnException( I18n.err( I18n.ERR_12080 ) );
@@ -484,16 +484,16 @@ public final class LdifRevertor
         }
         else
         {
-            // We have a composite new RDN, something like A=a+B=b
+            // We have a composite new Rdn, something like A=a+B=b
             if ( oldRdn.size() == 1 )
             {
-                // The old RDN is simple
+                // The old Rdn is simple
                 boolean overlapping = false;
                 boolean existInEntry = false;
 
                 // Does it overlap ?
-                // Is the new RDN AVAs contained into the entry?
-                for ( AVA atav : newRdn )
+                // Is the new Rdn AVAs contained into the entry?
+                for ( Ava atav : newRdn )
                 {
                     if ( atav.equals( oldRdn.getAVA() ) )
                     {
@@ -511,10 +511,10 @@ public final class LdifRevertor
 
                 if ( overlapping )
                 {
-                    // The new RDN includes the old one
+                    // The new Rdn includes the old one
                     if ( existInEntry )
                     {
-                        // Some of the new RDN AVAs existed in the entry
+                        // Some of the new Rdn AVAs existed in the entry
                         // We have to restore them, but we also have to remove
                         // the new values
                         reverted = generateReverted( newSuperior, newRdn, newDn, oldRdn, KEEP_OLD_RDN );
@@ -539,7 +539,7 @@ public final class LdifRevertor
                 {
                     if ( existInEntry )
                     {
-                        // Some of the new RDN AVAs existed in the entry
+                        // Some of the new Rdn AVAs existed in the entry
                         // We have to restore them, but we also have to remove
                         // the new values
                         reverted = generateReverted( newSuperior, newRdn, newDn, oldRdn, KEEP_OLD_RDN );
@@ -561,22 +561,22 @@ public final class LdifRevertor
             }
             else
             {
-                // We have a composite new RDN, something like A=a+B=b
-                // Does the RDN overlap ?
+                // We have a composite new Rdn, something like A=a+B=b
+                // Does the Rdn overlap ?
                 boolean overlapping = false;
                 boolean existInEntry = false;
 
-                Set<AVA> oldAtavs = new HashSet<AVA>();
+                Set<Ava> oldAtavs = new HashSet<Ava>();
 
                 // We first build a set with all the oldRDN ATAVs 
-                for ( AVA atav : oldRdn )
+                for ( Ava atav : oldRdn )
                 {
                     oldAtavs.add( atav );
                 }
 
                 // Now we loop on the newRDN ATAVs to evaluate if the Rdns are overlaping
                 // and if the newRdn ATAVs are present in the entry
-                for ( AVA atav : newRdn )
+                for ( Ava atav : newRdn )
                 {
                     if ( oldAtavs.contains( atav ) )
                     {
@@ -601,7 +601,7 @@ public final class LdifRevertor
                     }
                     else
                     {
-                        // We can simply remove all the new RDN atavs, as the
+                        // We can simply remove all the new Rdn atavs, as the
                         // overlapping values will be re-created.
                         // (Cases 12.1 and 13.1)
                         reverted = generateReverted( newSuperior, newRdn, newDn, oldRdn, DELETE_OLD_RDN );



Mime
View raw message