directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1005896 [2/4] - in /directory/studio/trunk/plugins/ldapbrowser.core: ./ src/main/java/org/apache/directory/studio/ldapbrowser/core/ src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ src/main/java/org/apache/directory/studi...
Date Fri, 08 Oct 2010 16:50:57 GMT
Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java Fri Oct  8 16:50:55 2010
@@ -27,6 +27,7 @@ import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.OutputStreamWriter;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 
 import javax.naming.NamingException;
@@ -46,26 +47,24 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.reponse.ModDNResponseDsml;
 import org.apache.directory.shared.dsmlv2.reponse.ModifyResponseDsml;
 import org.apache.directory.shared.dsmlv2.request.BatchRequest;
-import org.apache.directory.shared.ldap.codec.ControlCodec;
-import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
-import org.apache.directory.shared.ldap.codec.LdapResultCodec;
-import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
-import org.apache.directory.shared.ldap.codec.bind.BindRequestCodec;
-import org.apache.directory.shared.ldap.codec.compare.CompareRequestCodec;
-import org.apache.directory.shared.ldap.codec.del.DelRequestCodec;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedRequestCodec;
-import org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequestCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 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.ModificationOperation;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.message.AddRequest;
+import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.CompareRequest;
+import org.apache.directory.shared.ldap.message.DeleteRequest;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.Message;
+import org.apache.directory.shared.ldap.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.message.SearchRequest;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
@@ -270,41 +269,42 @@ public class ImportDsmlRunnable implemen
      *      the DSML batch response (can be <code>null</code>)
      * @throws NamingException 
      * @throws LdapURLEncodingException 
+     * @throws LdapException
      */
     private void processRequest( Object request, BatchResponseDsml batchResponseDsml, StudioProgressMonitor monitor )
-        throws NamingException, LdapURLEncodingException
+        throws NamingException, LdapURLEncodingException, LdapException
     {
-        if ( request instanceof BindRequestCodec )
+        if ( request instanceof BindRequest )
         {
-            processBindRequest( ( BindRequestCodec ) request, batchResponseDsml, monitor );
+            processBindRequest( ( BindRequest ) request, batchResponseDsml, monitor );
         }
-        else if ( request instanceof AddRequestCodec )
+        else if ( request instanceof AddRequest )
         {
-            processAddRequest( ( AddRequestCodec ) request, batchResponseDsml, monitor );
+            processAddRequest( ( AddRequest ) request, batchResponseDsml, monitor );
         }
-        else if ( request instanceof CompareRequestCodec )
+        else if ( request instanceof CompareRequest )
         {
-            processCompareRequest( ( CompareRequestCodec ) request, batchResponseDsml, monitor );
+            processCompareRequest( ( CompareRequest ) request, batchResponseDsml, monitor );
         }
-        else if ( request instanceof DelRequestCodec )
+        else if ( request instanceof DeleteRequest )
         {
-            processDelRequest( ( DelRequestCodec ) request, batchResponseDsml, monitor );
+            processDelRequest( ( DeleteRequest ) request, batchResponseDsml, monitor );
         }
-        else if ( request instanceof ExtendedRequestCodec )
+        else if ( request instanceof ExtendedRequest )
         {
-            processExtendedRequest( ( ExtendedRequestCodec ) request, batchResponseDsml, monitor );
+            processExtendedRequest( ( ExtendedRequest ) request, batchResponseDsml, monitor );
         }
-        else if ( request instanceof ModifyRequestCodec )
+        else if ( request instanceof ModifyRequest )
         {
-            processModifyRequest( ( ModifyRequestCodec ) request, batchResponseDsml, monitor );
+            processModifyRequest( ( ModifyRequest ) request, batchResponseDsml, monitor );
         }
-        else if ( request instanceof ModifyDNRequestCodec )
+        else if ( request instanceof ModifyDnRequest )
         {
-            processModifyDNRequest( ( ModifyDNRequestCodec ) request, batchResponseDsml, monitor );
+            processModifyDNRequest( ( ModifyDnRequest ) request, batchResponseDsml, monitor );
         }
-        else if ( request instanceof SearchRequestCodec )
+        else if ( request instanceof SearchRequest )
         {
-            processSearchRequest( ( SearchRequestCodec ) request, batchResponseDsml, monitor );
+            processSearchRequest( ( SearchRequest ) request, batchResponseDsml, monitor );
         }
     }
 
@@ -317,7 +317,7 @@ public class ImportDsmlRunnable implemen
      * @param batchResponseDsml
      *      the DSML batch response (can be <code>null</code>)
      */
-    private void processBindRequest( BindRequestCodec request, BatchResponseDsml batchResponseDsml,
+    private void processBindRequest( BindRequest request, BatchResponseDsml batchResponseDsml,
         StudioProgressMonitor monitor )
     {
         // We can not support extended requests at the moment,
@@ -327,10 +327,9 @@ public class ImportDsmlRunnable implemen
         if ( batchResponseDsml != null )
         {
             AuthResponseDsml authResponseDsml = new AuthResponseDsml();
-            LdapResultCodec ldapResult = new LdapResultCodec();
+            LdapResult ldapResult = authResponseDsml.getLdapResult();
             ldapResult.setResultCode( ResultCodeEnum.UNWILLING_TO_PERFORM );
             ldapResult.setErrorMessage( "This kind of request is not yet supported." );
-            authResponseDsml.setLdapResult( ldapResult );
             batchResponseDsml.addResponse( authResponseDsml );
         }
     }
@@ -344,7 +343,7 @@ public class ImportDsmlRunnable implemen
      * @param batchResponseDsml
      *      the DSML batch response (can be <code>null</code>)
      */
-    private void processAddRequest( AddRequestCodec request, BatchResponseDsml batchResponseDsml,
+    private void processAddRequest( AddRequest request, BatchResponseDsml batchResponseDsml,
         StudioProgressMonitor monitor )
     {
         // Executing the add request
@@ -352,22 +351,23 @@ public class ImportDsmlRunnable implemen
         browserConnection
             .getConnection()
             .getJNDIConnectionWrapper()
-            .createEntry( entry.getDn().getUpName(), AttributeUtils.toAttributes( entry ), getControls( request ),
+            .createEntry( entry.getDn().getName(), AttributeUtils.toAttributes( entry ), getControls( request ),
                 monitor, null );
 
         // Creating the response
         if ( batchResponseDsml != null )
         {
             AddResponseDsml addResponseDsml = new AddResponseDsml();
-            addResponseDsml.setLdapResult( getLdapResult( monitor, MessageTypeEnum.ADD_REQUEST ) );
-            addResponseDsml.getLdapResult().setMatchedDN( entry.getDn() );
+            LdapResult ldapResult = addResponseDsml.getLdapResult();
+            setLdapResultValuesFromMonitor( ldapResult, monitor, MessageTypeEnum.ADD_REQUEST );
+            ldapResult.setMatchedDn( entry.getDn() );
             batchResponseDsml.addResponse( addResponseDsml );
         }
 
         // Update cached entries
-        LdapDN dn = entry.getDn();
+        DN dn = entry.getDn();
         IEntry e = browserConnection.getEntryFromCache( dn );
-        LdapDN parentDn = DnUtils.getParent( dn );
+        DN parentDn = DnUtils.getParent( dn );
         IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache( parentDn ) : null;
         if ( e != null )
         {
@@ -388,7 +388,7 @@ public class ImportDsmlRunnable implemen
      * @param batchResponseDsml
      *      the DSML batch response (can be <code>null</code>)
      */
-    private void processCompareRequest( CompareRequestCodec request, BatchResponseDsml batchResponseDsml,
+    private void processCompareRequest( CompareRequest request, BatchResponseDsml batchResponseDsml,
         StudioProgressMonitor monitor )
     {
         // We can not support extended requests at the moment,
@@ -398,10 +398,9 @@ public class ImportDsmlRunnable implemen
         if ( batchResponseDsml != null )
         {
             CompareResponseDsml compareResponseDsml = new CompareResponseDsml();
-            LdapResultCodec ldapResult = new LdapResultCodec();
+            LdapResult ldapResult = compareResponseDsml.getLdapResult();
             ldapResult.setResultCode( ResultCodeEnum.UNWILLING_TO_PERFORM );
             ldapResult.setErrorMessage( "This kind of request is not yet supported." );
-            compareResponseDsml.setLdapResult( ldapResult );
             batchResponseDsml.addResponse( compareResponseDsml );
         }
     }
@@ -415,26 +414,27 @@ public class ImportDsmlRunnable implemen
      * @param batchResponseDsml
      *      the DSML batch response (can be <code>null</code>)
      */
-    private void processDelRequest( DelRequestCodec request, BatchResponseDsml batchResponseDsml,
+    private void processDelRequest( DeleteRequest request, BatchResponseDsml batchResponseDsml,
         StudioProgressMonitor monitor )
     {
         // Executing the del request
         browserConnection.getConnection().getJNDIConnectionWrapper()
-            .deleteEntry( request.getEntry().getUpName(), getControls( request ), monitor, null );
+            .deleteEntry( request.getName().getName(), getControls( request ), monitor, null );
 
         // Creating the response
         if ( batchResponseDsml != null )
         {
             DelResponseDsml delResponseDsml = new DelResponseDsml();
-            delResponseDsml.setLdapResult( getLdapResult( monitor, MessageTypeEnum.DEL_REQUEST ) );
-            delResponseDsml.getLdapResult().setMatchedDN( request.getEntry() );
+            LdapResult ldapResult = delResponseDsml.getLdapResult();
+            setLdapResultValuesFromMonitor( ldapResult, monitor, MessageTypeEnum.ADD_REQUEST );
+            delResponseDsml.getLdapResult().setMatchedDn( request.getName() );
             batchResponseDsml.addResponse( delResponseDsml );
         }
 
         // Update cached entries
-        LdapDN dn = request.getEntry();
+        DN dn = request.getName();
         IEntry e = browserConnection.getEntryFromCache( dn );
-        LdapDN parentDn = DnUtils.getParent( dn );
+        DN parentDn = DnUtils.getParent( dn );
         IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache( parentDn ) : null;
         if ( e != null )
         {
@@ -456,7 +456,7 @@ public class ImportDsmlRunnable implemen
      * @param batchResponseDsml
      *      the DSML batch response (can be <code>null</code>)
      */
-    private void processExtendedRequest( ExtendedRequestCodec request, BatchResponseDsml batchResponseDsml,
+    private void processExtendedRequest( ExtendedRequest request, BatchResponseDsml batchResponseDsml,
         StudioProgressMonitor monitor )
     {
         // We can not support extended requests at the moment,
@@ -466,10 +466,9 @@ public class ImportDsmlRunnable implemen
         if ( batchResponseDsml != null )
         {
             ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml();
-            LdapResultCodec ldapResult = new LdapResultCodec();
+            LdapResult ldapResult = extendedResponseDsml.getLdapResult();
             ldapResult.setResultCode( ResultCodeEnum.UNWILLING_TO_PERFORM );
             ldapResult.setErrorMessage( "This kind of request is not yet supported." );
-            extendedResponseDsml.setLdapResult( ldapResult );
             batchResponseDsml.addResponse( extendedResponseDsml );
         }
     }
@@ -483,7 +482,7 @@ public class ImportDsmlRunnable implemen
      * @param batchResponseDsml
      *      the DSML batch response (can be <code>null</code>)
      */
-    private void processModifyRequest( ModifyRequestCodec request, BatchResponseDsml batchResponseDsml,
+    private void processModifyRequest( ModifyRequest request, BatchResponseDsml batchResponseDsml,
         StudioProgressMonitor monitor )
     {
         // Creating the modification items
@@ -498,19 +497,20 @@ public class ImportDsmlRunnable implemen
         browserConnection
             .getConnection()
             .getJNDIConnectionWrapper()
-            .modifyEntry( request.getObject().getUpName(), modificationItems.toArray( new ModificationItem[0] ),
+            .modifyEntry( request.getName().getName(), modificationItems.toArray( new ModificationItem[0] ),
                 getControls( request ), monitor, null );
 
         // Creating the response
         if ( batchResponseDsml != null )
         {
             ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml();
-            modifyResponseDsml.setLdapResult( getLdapResult( monitor, MessageTypeEnum.MODIFY_REQUEST ) );
-            modifyResponseDsml.getLdapResult().setMatchedDN( request.getObject() );
+            LdapResult ldapResult = modifyResponseDsml.getLdapResult();
+            setLdapResultValuesFromMonitor( ldapResult, monitor, MessageTypeEnum.ADD_REQUEST );
+            modifyResponseDsml.getLdapResult().setMatchedDn( request.getName() );
             batchResponseDsml.addResponse( modifyResponseDsml );
         }
 
-        LdapDN dn = request.getObject();
+        DN dn = request.getName();
         IEntry e = browserConnection.getEntryFromCache( dn );
         if ( e != null )
         {
@@ -551,29 +551,30 @@ public class ImportDsmlRunnable implemen
      * @param batchResponseDsml
      *      the DSML batch response (can be <code>null</code>)
      */
-    private void processModifyDNRequest( ModifyDNRequestCodec request, BatchResponseDsml batchResponseDsml,
+    private void processModifyDNRequest( ModifyDnRequest request, BatchResponseDsml batchResponseDsml,
         StudioProgressMonitor monitor )
     {
         // Executing the modify DN request
         browserConnection
             .getConnection()
             .getJNDIConnectionWrapper()
-            .renameEntry( request.getEntry().getUpName(), request.getNewRDN().getUpName(), request.isDeleteOldRDN(),
+            .renameEntry( request.getName().getName(), request.getNewRdn().getName(), request.getDeleteOldRdn(),
                 getControls( request ), monitor, null );
 
         // Creating the response
         if ( batchResponseDsml != null )
         {
             ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml();
-            modDNResponseDsml.setLdapResult( getLdapResult( monitor, MessageTypeEnum.MOD_DN_REQUEST ) );
-            modDNResponseDsml.getLdapResult().setMatchedDN( request.getEntry() );
+            LdapResult ldapResult = modDNResponseDsml.getLdapResult();
+            setLdapResultValuesFromMonitor( ldapResult, monitor, MessageTypeEnum.ADD_REQUEST );
+            modDNResponseDsml.getLdapResult().setMatchedDn( request.getName() );
             batchResponseDsml.addResponse( modDNResponseDsml );
         }
 
         // Update cached entries
-        LdapDN dn = request.getEntry();
+        DN dn = request.getName();
         IEntry e = browserConnection.getEntryFromCache( dn );
-        LdapDN parentDn = DnUtils.getParent( dn );
+        DN parentDn = DnUtils.getParent( dn );
         IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache( parentDn ) : null;
         if ( e != null )
         {
@@ -586,7 +587,7 @@ public class ImportDsmlRunnable implemen
         }
         if ( request.getNewSuperior() != null )
         {
-            LdapDN newSuperiorDn = request.getNewSuperior();
+            DN newSuperiorDn = request.getNewSuperior();
             IEntry newSuperiorEntry = browserConnection.getEntryFromCache( newSuperiorDn );
             if ( newSuperiorEntry != null )
             {
@@ -605,9 +606,10 @@ public class ImportDsmlRunnable implemen
      *      the DSML batch response (can be <code>null</code>)
      * @throws NamingException 
      * @throws LdapURLEncodingException 
+     * @throws LdapException
      */
-    private void processSearchRequest( SearchRequestCodec request, BatchResponseDsml batchResponseDsml,
-        StudioProgressMonitor monitor ) throws NamingException, LdapURLEncodingException
+    private void processSearchRequest( SearchRequest request, BatchResponseDsml batchResponseDsml,
+        StudioProgressMonitor monitor ) throws NamingException, LdapURLEncodingException, LdapException
     {
         // Creating the response
         if ( batchResponseDsml != null )
@@ -616,7 +618,7 @@ public class ImportDsmlRunnable implemen
             StudioNamingEnumeration ne = browserConnection
                 .getConnection()
                 .getJNDIConnectionWrapper()
-                .search( request.getBaseObject().getUpName(), request.getFilter().toString(),
+                .search( request.getBase().getName(), request.getFilter().toString(),
                     getSearchControls( request ), getAliasDereferencingMethod( request ),
                     ReferralHandlingMethod.IGNORE, getControls( request ), monitor, null );
 
@@ -635,7 +637,7 @@ public class ImportDsmlRunnable implemen
      * @return
      *      the associated {@link SearchControls} object
      */
-    private SearchControls getSearchControls( SearchRequestCodec request )
+    private SearchControls getSearchControls( SearchRequest request )
     {
         SearchControls controls = new SearchControls();
 
@@ -657,9 +659,9 @@ public class ImportDsmlRunnable implemen
 
         // Returning attributes
         List<String> returningAttributes = new ArrayList<String>();
-        for ( EntryAttribute entryAttribute : request.getAttributes() )
+        for ( String attribute : request.getAttributes() )
         {
-            returningAttributes.add( entryAttribute.getId() );
+            returningAttributes.add( attribute );
         }
         // If the returning attributes are empty, we need to return the user attributes
         // [Cf. RFC 2251 - "There are two special values which may be used: an empty 
@@ -690,17 +692,17 @@ public class ImportDsmlRunnable implemen
      * @return
      *      the associated {@link AliasDereferencingMethod} object
      */
-    private AliasDereferencingMethod getAliasDereferencingMethod( SearchRequestCodec request )
+    private AliasDereferencingMethod getAliasDereferencingMethod( SearchRequest request )
     {
         switch ( request.getDerefAliases() )
         {
-            case LdapConstants.NEVER_DEREF_ALIASES:
+            case NEVER_DEREF_ALIASES:
                 return AliasDereferencingMethod.NEVER;
-            case LdapConstants.DEREF_ALWAYS:
+            case DEREF_ALWAYS:
                 return AliasDereferencingMethod.ALWAYS;
-            case LdapConstants.DEREF_FINDING_BASE_OBJ:
+            case DEREF_FINDING_BASE_OBJ:
                 return AliasDereferencingMethod.FINDING;
-            case LdapConstants.DEREF_IN_SEARCHING:
+            case DEREF_IN_SEARCHING:
                 return AliasDereferencingMethod.SEARCH;
             default:
                 return AliasDereferencingMethod.NEVER;
@@ -708,16 +710,16 @@ public class ImportDsmlRunnable implemen
     }
 
 
-    private Control[] getControls( LdapMessageCodec request )
+    private Control[] getControls( Message request )
     {
-        List<ControlCodec> controls = request.getControls();
+        Collection<org.apache.directory.shared.ldap.message.control.Control> controls = request.getControls().values();
         if ( controls != null )
         {
             List<Control> jndiControls = new ArrayList<Control>();
-            for ( ControlCodec control : controls )
+            for ( org.apache.directory.shared.ldap.message.control.Control control : controls )
             {
-                Control jndiControl = new BasicControl( control.getControlType(), control.getCriticality(),
-                    control.getEncodedValue() );
+                Control jndiControl = new BasicControl( control.getOid(), control.isCritical(),
+                    control.getValue() );
                 jndiControls.add( jndiControl );
             }
             return jndiControls.toArray( new Control[jndiControls.size()] );
@@ -734,10 +736,9 @@ public class ImportDsmlRunnable implemen
      * @return
      *      the corresponding LDAP Result
      */
-    private LdapResultCodec getLdapResult( StudioProgressMonitor monitor, MessageTypeEnum messageType )
+    private void setLdapResultValuesFromMonitor( LdapResult ldapResult, StudioProgressMonitor monitor,
+        MessageTypeEnum messageType )
     {
-        LdapResultCodec ldapResult = new LdapResultCodec();
-
         if ( !monitor.errorsReported() )
         {
             ldapResult.setResultCode( ResultCodeEnum.SUCCESS );
@@ -756,7 +757,5 @@ public class ImportDsmlRunnable implemen
                 ldapResult.setErrorMessage( t.getMessage() );
             }
         }
-
-        return ldapResult;
     }
 }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java Fri Oct  8 16:50:55 2010
@@ -35,7 +35,6 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
-import javax.naming.InvalidNameException;
 import javax.naming.NameAlreadyBoundException;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
@@ -48,7 +47,8 @@ import javax.naming.ldap.BasicControl;
 import javax.naming.ldap.Control;
 
 import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCoreConstants;
@@ -289,9 +289,9 @@ public class ImportLdifRunnable implemen
                             logModification( browserConnection, logWriter, record, monitor );
 
                             // update cache and adjust attribute/children initialization flags
-                            LdapDN dn = new LdapDN( record.getDnLine().getValueAsString() );
+                            DN dn = new DN( record.getDnLine().getValueAsString() );
                             IEntry entry = browserConnection.getEntryFromCache( dn );
-                            LdapDN parentDn = DnUtils.getParent( dn );
+                            DN parentDn = DnUtils.getParent( dn );
                             IEntry parentEntry = null;
                             while ( parentEntry == null && parentDn != null )
                             {
@@ -325,7 +325,7 @@ public class ImportLdifRunnable implemen
                                 LdifChangeModDnRecord modDnRecord = ( LdifChangeModDnRecord ) record;
                                 if ( modDnRecord.getNewsuperiorLine() != null )
                                 {
-                                    LdapDN newSuperiorDn = new LdapDN( modDnRecord.getNewsuperiorLine()
+                                    DN newSuperiorDn = new DN( modDnRecord.getNewsuperiorLine()
                                         .getValueAsString() );
                                     IEntry newSuperiorEntry = browserConnection.getEntryFromCache( newSuperiorDn );
                                     if ( newSuperiorEntry != null )
@@ -400,9 +400,10 @@ public class ImportLdifRunnable implemen
      * @param monitor the progress monitor
      * 
      * @throws NamingException the naming exception
+     * @throws LdapInvalidDnException
      */
     static void importLdifRecord( IBrowserConnection browserConnection, LdifRecord record, boolean updateIfEntryExists,
-        StudioProgressMonitor monitor ) throws NamingException
+        StudioProgressMonitor monitor ) throws NamingException, LdapInvalidDnException
     {
         if ( !record.isValid() )
         {
@@ -423,7 +424,7 @@ public class ImportLdifRunnable implemen
                 {
                     dummyEntry = ModelConverter.ldifContentRecordToEntry( attrValRecord, browserConnection );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     monitor.reportError( e );
                     return;
@@ -437,7 +438,7 @@ public class ImportLdifRunnable implemen
                 {
                     dummyEntry = ModelConverter.ldifChangeAddRecordToEntry( changeAddRecord, browserConnection );
                 }
-                catch ( InvalidNameException e )
+                catch ( LdapInvalidDnException e )
                 {
                     monitor.reportError( e );
                     return;
@@ -521,16 +522,16 @@ public class ImportLdifRunnable implemen
                 String newRdn = modDnRecord.getNewrdnLine().getValueAsString();
                 boolean deleteOldRdn = modDnRecord.getDeloldrdnLine().isDeleteOldRdn();
 
-                LdapDN newDn;
+                DN newDn;
                 if ( modDnRecord.getNewsuperiorLine() != null )
                 {
                     newDn = DnUtils.composeDn( newRdn, modDnRecord.getNewsuperiorLine().getValueAsString() );
                 }
                 else
                 {
-                    LdapDN dnObject = new LdapDN( dn );
-                    LdapDN parent = DnUtils.getParent( dnObject );
-                    newDn = DnUtils.composeDn( newRdn, parent.getUpName() );
+                    DN dnObject = new DN( dn );
+                    DN parent = DnUtils.getParent( dnObject );
+                    newDn = DnUtils.composeDn( newRdn, parent.getName() );
                 }
 
                 browserConnection.getConnection().getJNDIConnectionWrapper()

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java Fri Oct  8 16:50:55 2010
@@ -28,7 +28,7 @@ import java.util.LinkedHashSet;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -125,7 +125,7 @@ public class InitializeAttributesRunnabl
         for ( int pi = 0; pi < entries.length && !monitor.isCanceled(); pi++ )
         {
             monitor.setTaskName( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_task, new String[]
-                { this.entries[pi].getDn().getUpName() } ) );
+                { this.entries[pi].getDn().getName() } ) );
             monitor.worked( 1 );
             if ( entries[pi].getBrowserConnection() != null )
             {
@@ -178,7 +178,7 @@ public class InitializeAttributesRunnabl
             }
             else
             {
-                Collection<AttributeTypeDescription> opAtds = SchemaUtils.getOperationalAttributeDescriptions( entry
+                Collection<AttributeType> opAtds = SchemaUtils.getOperationalAttributeDescriptions( entry
                     .getBrowserConnection().getSchema() );
                 Collection<String> atdNames = SchemaUtils.getNames( opAtds );
                 raSet.addAll( atdNames );
@@ -207,7 +207,7 @@ public class InitializeAttributesRunnabl
     {
         monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_progress_att,
             new String[]
-                { entry.getDn().getUpName() } ) );
+                { entry.getDn().getName() } ) );
 
         if ( entry instanceof IRootDSE )
         {

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java Fri Oct  8 16:50:55 2010
@@ -147,7 +147,7 @@ public class InitializeChildrenRunnable 
         for ( IEntry entry : entries )
         {
             monitor.setTaskName( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_task, new String[]
-                { entry.getDn().getUpName() } ) );
+                { entry.getDn().getName() } ) );
             monitor.worked( 1 );
 
             IBrowserConnection browserConnection = entry.getBrowserConnection();
@@ -198,7 +198,7 @@ public class InitializeChildrenRunnable 
     {
         monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_progress_sub,
             new String[]
-                { parent.getDn().getUpName() } ) );
+                { parent.getDn().getName() } ) );
 
         // clear old children
         clearCaches( parent, purgeAllCaches );
@@ -360,7 +360,7 @@ public class InitializeChildrenRunnable 
         ISearchResult[] srs = search.getSearchResults();
         monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_progress_subcount,
             new String[]
-                { srs == null ? Integer.toString( 0 ) : Integer.toString( srs.length ), parent.getDn().getUpName() } ) );
+                { srs == null ? Integer.toString( 0 ) : Integer.toString( srs.length ), parent.getDn().getName() } ) );
     }
 
 

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java Fri Oct  8 16:50:55 2010
@@ -28,10 +28,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -128,12 +127,12 @@ public class InitializeRootDSERunnable i
         monitor.reportProgress( " " ); //$NON-NLS-1$
 
         monitor.setTaskName( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_task, new String[]
-            { rootDSE.getDn().getUpName() } ) );
+            { rootDSE.getDn().getName() } ) );
         monitor.worked( 1 );
 
         monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_progress_att,
             new String[]
-                { rootDSE.getDn().getUpName() } ) );
+                { rootDSE.getDn().getName() } ) );
 
         loadRootDSE( rootDSE.getBrowserConnection(), monitor );
     }
@@ -172,30 +171,30 @@ public class InitializeRootDSERunnable i
         }
 
         // load well-known Root DSE attributes and operational attributes
-        ISearch search = new Search( null, browserConnection, LdapDN.EMPTY_LDAPDN, ISearch.FILTER_TRUE,
+        ISearch search = new Search( null, browserConnection, DN.EMPTY_DN, ISearch.FILTER_TRUE,
             ROOT_DSE_ATTRIBUTES, SearchScope.OBJECT, 0, 0, Connection.AliasDereferencingMethod.NEVER,
             Connection.ReferralHandlingMethod.IGNORE, false, null );
         SearchRunnable.searchAndUpdateModel( browserConnection, search, monitor );
 
         // load all user attributes
-        search = new Search( null, browserConnection, LdapDN.EMPTY_LDAPDN, ISearch.FILTER_TRUE, new String[]
+        search = new Search( null, browserConnection, DN.EMPTY_DN, ISearch.FILTER_TRUE, new String[]
             { SchemaConstants.ALL_USER_ATTRIBUTES }, SearchScope.OBJECT, 0, 0,
             Connection.AliasDereferencingMethod.NEVER, Connection.ReferralHandlingMethod.IGNORE, false, null );
         SearchRunnable.searchAndUpdateModel( browserConnection, search, monitor );
 
         // the list of entries under the Root DSE
-        Map<LdapDN, IEntry> rootDseEntries = new HashMap<LdapDN, IEntry>();
+        Map<DN, IEntry> rootDseEntries = new HashMap<DN, IEntry>();
 
         // 1st: add base DNs, either the specified or from the namingContexts attribute
         if ( !browserConnection.isFetchBaseDNs() && browserConnection.getBaseDN() != null
             && !"".equals( browserConnection.getBaseDN().toString() ) )
         {
             // only add the specified base DN
-            LdapDN dn = browserConnection.getBaseDN();
+            DN dn = browserConnection.getBaseDN();
             IEntry entry = browserConnection.getEntryFromCache( dn );
             if ( entry == null )
             {
-                entry = new BaseDNEntry( ( LdapDN ) dn.clone(), browserConnection );
+                entry = new BaseDNEntry( dn, browserConnection );
                 browserConnection.cacheEntry( entry );
             }
             rootDseEntries.put( dn, entry );
@@ -227,7 +226,7 @@ public class InitializeRootDSERunnable i
                     {
                         try
                         {
-                            LdapDN dn = new LdapDN( namingContext );
+                            DN dn = new DN( namingContext );
                             IEntry entry = browserConnection.getEntryFromCache( dn );
                             if ( entry == null )
                             {
@@ -236,7 +235,7 @@ public class InitializeRootDSERunnable i
                             }
                             rootDseEntries.put( dn, entry );
                         }
-                        catch ( InvalidNameException e )
+                        catch ( LdapInvalidDnException e )
                         {
                             monitor.reportError( BrowserCoreMessages.model__error_setting_base_dn, e );
                         }
@@ -302,7 +301,7 @@ public class InitializeRootDSERunnable i
     private static void initBaseEntry( IEntry entry, StudioProgressMonitor monitor )
     {
         IBrowserConnection browserConnection = entry.getBrowserConnection();
-        LdapDN dn = entry.getDn();
+        DN dn = entry.getDn();
 
         // search the entry
         AliasDereferencingMethod derefAliasMethod = browserConnection.getAliasesDereferencingMethod();
@@ -330,7 +329,7 @@ public class InitializeRootDSERunnable i
     private static IEntry[] getDirectoryMetadataEntries( IBrowserConnection browserConnection,
         String metadataAttributeName )
     {
-        List<LdapDN> metadataEntryDnList = new ArrayList<LdapDN>();
+        List<DN> metadataEntryDnList = new ArrayList<DN>();
         IAttribute attribute = browserConnection.getRootDSE().getAttribute( metadataAttributeName );
         if ( attribute != null )
         {
@@ -341,9 +340,9 @@ public class InitializeRootDSERunnable i
                 {
                     try
                     {
-                        metadataEntryDnList.add( new LdapDN( dn ) );
+                        metadataEntryDnList.add( new DN( dn ) );
                     }
-                    catch ( InvalidNameException e )
+                    catch ( LdapInvalidDnException e )
                     {
                     }
                 }
@@ -353,7 +352,7 @@ public class InitializeRootDSERunnable i
         IEntry[] metadataEntries = new IEntry[metadataEntryDnList.size()];
         for ( int i = 0; i < metadataEntryDnList.size(); i++ )
         {
-            LdapDN dn = metadataEntryDnList.get( i );
+            DN dn = metadataEntryDnList.get( i );
             metadataEntries[i] = browserConnection.getEntryFromCache( dn );
             if ( metadataEntries[i] == null )
             {
@@ -366,10 +365,10 @@ public class InitializeRootDSERunnable i
     }
 
 
-    private static void searchRootDseEntries( IBrowserConnection browserConnection, Map<LdapDN, IEntry> rootDseEntries,
+    private static void searchRootDseEntries( IBrowserConnection browserConnection, Map<DN, IEntry> rootDseEntries,
         StudioProgressMonitor monitor )
     {
-        ISearch search = new Search( null, browserConnection, LdapDN.EMPTY_LDAPDN, ISearch.FILTER_TRUE,
+        ISearch search = new Search( null, browserConnection, DN.EMPTY_DN, ISearch.FILTER_TRUE,
             ISearch.NO_ATTRIBUTES, SearchScope.ONELEVEL, 0, 0, Connection.AliasDereferencingMethod.NEVER,
             Connection.ReferralHandlingMethod.IGNORE, false, null );
         SearchRunnable.searchAndUpdateModel( browserConnection, search, monitor );

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesRunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesRunnable.java Fri Oct  8 16:50:55 2010
@@ -30,7 +30,7 @@ import java.util.Set;
 import javax.naming.ContextNotEmptyException;
 import javax.naming.directory.SearchControls;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.DnUtils;
@@ -154,15 +154,15 @@ public class MoveEntriesRunnable impleme
         int numAdd = 0;
         int numDel = 0;
         boolean isSimulatedRename = false;
-        LdapDN parentDn = newParent.getDn();
+        DN parentDn = newParent.getDn();
 
         for ( int i = 0; i < oldEntries.length; i++ )
         {
             dummyMonitor.reset();
 
             IEntry oldEntry = oldEntries[i];
-            LdapDN oldDn = oldEntry.getDn();
-            LdapDN newDn = DnUtils.composeDn( oldDn.getRdn(), parentDn );
+            DN oldDn = oldEntry.getDn();
+            DN newDn = DnUtils.composeDn( oldDn.getRdn(), parentDn );
 
             // try to move entry
             RenameEntryRunnable.renameEntry( browserConnection, oldEntry, newDn, dummyMonitor );

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryRunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryRunnable.java Fri Oct  8 16:50:55 2010
@@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap
 
 import java.util.List;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -50,7 +50,7 @@ public class ReadEntryRunnable implement
     private IBrowserConnection browserConnection;
 
     /** The DN of the entry. */
-    private LdapDN dn;
+    private DN dn;
 
     /** The entry read from directory. */
     private IEntry readEntry;
@@ -62,7 +62,7 @@ public class ReadEntryRunnable implement
      * @param browserConnection the browser connection
      * @param dn the DN of the entry
      */
-    public ReadEntryRunnable( IBrowserConnection browserConnection, LdapDN dn )
+    public ReadEntryRunnable( IBrowserConnection browserConnection, DN dn )
     {
         this.browserConnection = browserConnection;
         this.dn = dn;
@@ -144,7 +144,7 @@ public class ReadEntryRunnable implement
      * 
      * @return the read entry
      */
-    static IEntry getEntry( IBrowserConnection browserConnection, LdapDN dn, List<StudioControl> controls,
+    static IEntry getEntry( IBrowserConnection browserConnection, DN dn, List<StudioControl> controls,
         StudioProgressMonitor monitor )
     {
         try

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java Fri Oct  8 16:50:55 2010
@@ -26,7 +26,7 @@ import javax.naming.directory.Attribute;
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
@@ -142,7 +142,7 @@ public class ReloadSchemaRunnable implem
     public static void reloadSchema( boolean forceReload, IBrowserConnection browserConnection,
         StudioProgressMonitor monitor )
     {
-        LdapDN schemaLocation = getSchemaLocation( browserConnection, monitor );
+        DN schemaLocation = getSchemaLocation( browserConnection, monitor );
         if ( schemaLocation == null )
         {
             monitor.reportError( BrowserCoreMessages.model__missing_schema_location );
@@ -198,7 +198,7 @@ public class ReloadSchemaRunnable implem
      * @param browserConnection the browser connection
      * @param monitor the progress monitor
      */
-    private static boolean mustReload( LdapDN schemaLocation, IBrowserConnection browserConnection,
+    private static boolean mustReload( DN schemaLocation, IBrowserConnection browserConnection,
         StudioProgressMonitor monitor )
     {
         Schema schema = browserConnection.getSchema();
@@ -252,12 +252,12 @@ public class ReloadSchemaRunnable implem
     }
 
 
-    private static LdapDN getSchemaLocation( IBrowserConnection browserConnection, StudioProgressMonitor monitor )
+    private static DN getSchemaLocation( IBrowserConnection browserConnection, StudioProgressMonitor monitor )
     {
         try
         {
             SearchParameter sp = new SearchParameter();
-            sp.setSearchBase( new LdapDN() );
+            sp.setSearchBase( new DN() );
             sp.setScope( SearchScope.OBJECT );
             sp.setReturningAttributes( new String[]
                 { SchemaConstants.SUBSCHEMA_SUBENTRY_AT } );
@@ -272,9 +272,9 @@ public class ReloadSchemaRunnable implem
                     if ( attribute.getID().equalsIgnoreCase( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) )
                     {
                         String value = ( String ) attribute.get();
-                        if ( LdapDN.isValid( value ) )
+                        if ( DN.isValid( value ) )
                         {
-                            LdapDN dn = new LdapDN( value );
+                            DN dn = new DN( value );
                             return dn;
                         }
                     }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java Fri Oct  8 16:50:55 2010
@@ -30,9 +30,10 @@ import javax.naming.ContextNotEmptyExcep
 import javax.naming.directory.SearchControls;
 import javax.naming.ldap.Control;
 import javax.naming.ldap.ManageReferralControl;
+import javax.naming.ldap.Rdn;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
-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.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.DnUtils;
@@ -67,7 +68,7 @@ public class RenameEntryRunnable impleme
     private IEntry oldEntry;
 
     /** The new RDN. */
-    private Rdn newRdn;
+    private RDN newRdn;
 
     /** The new entry. */
     private IEntry newEntry;
@@ -86,7 +87,7 @@ public class RenameEntryRunnable impleme
      * @param newRdn the new RDN
      * @param dialog the dialog
      */
-    public RenameEntryRunnable( IEntry entry, Rdn newRdn, SimulateRenameDialog dialog )
+    public RenameEntryRunnable( IEntry entry, RDN newRdn, SimulateRenameDialog dialog )
     {
         this.browserConnection = entry.getBrowserConnection();
         this.oldEntry = entry;
@@ -141,13 +142,13 @@ public class RenameEntryRunnable impleme
     public void run( StudioProgressMonitor monitor )
     {
         monitor.beginTask( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__rename_entry_task, new String[]
-            { oldEntry.getDn().getUpName() } ), 3 );
+            { oldEntry.getDn().getName() } ), 3 );
         monitor.reportProgress( " " ); //$NON-NLS-1$
         monitor.worked( 1 );
 
-        LdapDN oldDn = oldEntry.getDn();
-        LdapDN parentDn = DnUtils.getParent( oldDn );
-        LdapDN newDn = DnUtils.composeDn( newRdn, parentDn );
+        DN oldDn = oldEntry.getDn();
+        DN parentDn = DnUtils.getParent( oldDn );
+        DN newDn = DnUtils.composeDn( newRdn, parentDn );
 
         // use a dummy monitor to be able to handle exceptions
         StudioProgressMonitor dummyMonitor = new StudioProgressMonitor( monitor );
@@ -274,12 +275,12 @@ public class RenameEntryRunnable impleme
      * @param newDn the new DN
      * @param monitor the progress monitor
      */
-    static void renameEntry( IBrowserConnection browserConnection, IEntry entry, LdapDN newDn,
+    static void renameEntry( IBrowserConnection browserConnection, IEntry entry, DN newDn,
         StudioProgressMonitor monitor )
     {
         // DNs
-        String oldDnString = entry.getDn().getUpName();
-        String newDnString = newDn.getUpName();
+        String oldDnString = entry.getDn().getName();
+        String newDnString = newDn.getName();
 
         // ManageDsaIT control
         Control[] controls = null;

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java Fri Oct  8 16:50:55 2010
@@ -39,7 +39,7 @@ import javax.naming.ldap.Control;
 import javax.naming.ldap.PagedResultsResponseControl;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
@@ -326,7 +326,7 @@ public class SearchRunnable implements S
 
                         if ( searchContinuationUrl == null )
                         {
-                            LdapDN dn = JNDIUtils.getDn( sr );
+                            DN dn = JNDIUtils.getDn( sr );
                             IEntry entry = null;
 
                             Connection resultConnection = sr.getConnection();
@@ -455,7 +455,7 @@ public class SearchRunnable implements S
             return null;
         }
 
-        String searchBase = parameter.getSearchBase().getUpName();
+        String searchBase = parameter.getSearchBase().getName();
         SearchControls controls = new SearchControls();
         switch ( parameter.getScope() )
         {
@@ -602,22 +602,22 @@ public class SearchRunnable implements S
      * 
      * @return the created entry
      */
-    private static IEntry createAndCacheEntry( IBrowserConnection browserConnection, LdapDN dn,
+    private static IEntry createAndCacheEntry( IBrowserConnection browserConnection, DN dn,
         StudioProgressMonitor monitor )
     {
         StudioProgressMonitor dummyMonitor = new StudioProgressMonitor( monitor );
         IEntry entry = null;
 
         // build tree to parent
-        LinkedList<LdapDN> parentDnList = new LinkedList<LdapDN>();
-        LdapDN parentDN = dn;
+        LinkedList<DN> parentDnList = new LinkedList<DN>();
+        DN parentDN = dn;
         while ( parentDN != null && browserConnection.getEntryFromCache( parentDN ) == null )
         {
             parentDnList.addFirst( parentDN );
             parentDN = DnUtils.getParent( parentDN );
         }
 
-        for ( LdapDN aDN : parentDnList )
+        for ( DN aDN : parentDnList )
         {
             parentDN = DnUtils.getParent( aDN );
             if ( parentDN == null )

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SimulateRenameDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SimulateRenameDialog.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SimulateRenameDialog.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SimulateRenameDialog.java Fri Oct  8 16:50:55 2010
@@ -20,7 +20,7 @@
 package org.apache.directory.studio.ldapbrowser.core.jobs;
 
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 
 
@@ -40,7 +40,7 @@ public interface SimulateRenameDialog
      * @param oldDn the old DN
      * @param newDn the new DN
      */
-    void setEntryInfo( IBrowserConnection browserConnection, LdapDN oldDn, LdapDN newDn );
+    void setEntryInfo( IBrowserConnection browserConnection, DN oldDn, DN newDn );
 
 
     /**

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java Fri Oct  8 16:50:55 2010
@@ -29,8 +29,8 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 
@@ -166,8 +166,8 @@ public class AttributeDescription implem
             return description;
         }
 
-        AttributeTypeDescription atd = schema.getAttributeTypeDescription( parsedAttributeType );
-        String oidString = atd.getNumericOid();
+        AttributeType atd = schema.getAttributeTypeDescription( parsedAttributeType );
+        String oidString = atd.getOid();
 
         if ( !parsedLangList.isEmpty() )
         {
@@ -226,8 +226,8 @@ public class AttributeDescription implem
             return false;
         }
 
-        AttributeTypeDescription myAtd = schema.getAttributeTypeDescription( this.getParsedAttributeType() );
-        AttributeTypeDescription otherAtd = schema.getAttributeTypeDescription( other.getParsedAttributeType() );
+        AttributeType myAtd = schema.getAttributeTypeDescription( this.getParsedAttributeType() );
+        AttributeType otherAtd = schema.getAttributeTypeDescription( other.getParsedAttributeType() );
 
         // special case *: all user attributes (RFC4511)
         if ( SchemaConstants.ALL_USER_ATTRIBUTES.equals( other.description ) && !SchemaUtils.isOperational( myAtd ) )
@@ -246,7 +246,7 @@ public class AttributeDescription implem
         if ( other.description.length() > 1 && other.description.startsWith( "@" ) )
         {
             String objectClass = other.description.substring( 1 );
-            ObjectClassDescription ocd = schema.getObjectClassDescription( objectClass );
+            ObjectClass ocd = schema.getObjectClassDescription( objectClass );
             ocd.getMayAttributeTypes();
             ocd.getMustAttributeTypes();
 
@@ -255,7 +255,7 @@ public class AttributeDescription implem
             names.addAll( SchemaUtils.getMustAttributeTypeDescriptionNamesTransitive( ocd, schema ) );
             for ( String name : names )
             {
-                AttributeTypeDescription atd = schema.getAttributeTypeDescription( name );
+                AttributeType atd = schema.getAttributeTypeDescription( name );
                 if ( myAtd == atd )
                 {
                     return true;
@@ -266,8 +266,8 @@ public class AttributeDescription implem
         // check type
         if ( myAtd != otherAtd )
         {
-            AttributeTypeDescription superiorAtd = null;
-            String superiorName = myAtd.getSuperType();
+            AttributeType superiorAtd = null;
+            String superiorName = myAtd.getSuperiorOid();
             while ( superiorName != null )
             {
                 superiorAtd = schema.getAttributeTypeDescription( superiorName );
@@ -275,7 +275,7 @@ public class AttributeDescription implem
                 {
                     break;
                 }
-                superiorName = superiorAtd.getSuperType();
+                superiorName = superiorAtd.getSuperiorOid();
             }
             if ( superiorAtd != otherAtd )
             {

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/BookmarkParameter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/BookmarkParameter.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/BookmarkParameter.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/BookmarkParameter.java Fri Oct  8 16:50:55 2010
@@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap
 
 import java.io.Serializable;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 
 
 /**
@@ -39,7 +39,7 @@ public class BookmarkParameter implement
     private static final long serialVersionUID = 105108281861642267L;
 
     /** The target DN. */
-    private LdapDN dn;
+    private DN dn;
 
     /** The symbolic name. */
     private String name;
@@ -59,7 +59,7 @@ public class BookmarkParameter implement
      * @param dn the target DN
      * @param name the symbolic name
      */
-    public BookmarkParameter( LdapDN dn, String name )
+    public BookmarkParameter( DN dn, String name )
     {
         this.dn = dn;
         this.name = name;
@@ -71,7 +71,7 @@ public class BookmarkParameter implement
      * 
      * @return the target DN
      */
-    public LdapDN getDn()
+    public DN getDn()
     {
         return dn;
     }
@@ -82,7 +82,7 @@ public class BookmarkParameter implement
      * 
      * @param dn the target DN
      */
-    public void setDn( LdapDN dn )
+    public void setDn( DN dn )
     {
         this.dn = dn;
     }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java Fri Oct  8 16:50:55 2010
@@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap
 
 import java.io.Serializable;
 
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.AttributePropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
@@ -249,7 +249,7 @@ public interface IAttribute extends Seri
      * @return the AttributeTypeDescription of this attribute, may be the
      *         default or a dummy
      */
-    public abstract AttributeTypeDescription getAttributeTypeDescription();
+    public abstract AttributeType getAttributeTypeDescription();
 
 
     /**

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java Fri Oct  8 16:50:55 2010
@@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap
 
 import java.io.Serializable;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.BookmarkPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
@@ -45,7 +45,7 @@ public interface IBookmark extends Seria
      * 
      * @return the DN
      */
-    public LdapDN getDn();
+    public DN getDn();
 
 
     /**
@@ -53,7 +53,7 @@ public interface IBookmark extends Seria
      * 
      * @param dn the DN
      */
-    public void setDn( LdapDN dn );
+    public void setDn( DN dn );
 
 
     /**

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java Fri Oct  8 16:50:55 2010
@@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap
 
 import java.io.Serializable;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
@@ -238,7 +238,7 @@ public interface IBrowserConnection exte
      * 
      * @return the manually defined base ND
      */
-    public abstract LdapDN getBaseDN();
+    public abstract DN getBaseDN();
 
 
     /**
@@ -246,7 +246,7 @@ public interface IBrowserConnection exte
      * 
      * @param baseDN the new base DN
      */
-    public abstract void setBaseDN( LdapDN baseDN );
+    public abstract void setBaseDN( DN baseDN );
 
 
     /**
@@ -504,7 +504,7 @@ public interface IBrowserConnection exte
      * 
      * @return the entry from cache or null if the entry isn't cached
      */
-    public abstract IEntry getEntryFromCache( LdapDN dn );
+    public abstract IEntry getEntryFromCache( DN dn );
 
 
     /**

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java Fri Oct  8 16:50:55 2010
@@ -24,9 +24,9 @@ package org.apache.directory.studio.ldap
 import java.io.Serializable;
 import java.util.Collection;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
@@ -170,7 +170,7 @@ public interface IEntry extends Serializ
      * 
      * @return the DN of this entry, never null.
      */
-    public abstract LdapDN getDn();
+    public abstract DN getDn();
 
 
     /**
@@ -178,7 +178,7 @@ public interface IEntry extends Serializ
      * 
      * @return the RDN of this entry, never null.
      */
-    public abstract Rdn getRdn();
+    public abstract RDN getRdn();
 
 
     /**
@@ -462,6 +462,6 @@ public interface IEntry extends Serializ
      * 
      * @return the object class descriptions of this entry
      */
-    public Collection<ObjectClassDescription> getObjectClassDescriptions();
+    public Collection<ObjectClass> getObjectClassDescriptions();
 
 }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java Fri Oct  8 16:50:55 2010
@@ -24,7 +24,7 @@ package org.apache.directory.studio.ldap
 import java.io.Serializable;
 import java.util.List;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
@@ -45,7 +45,7 @@ public interface ISearch extends Seriali
 {
 
     /** Constant for empty search base */
-    public static final LdapDN EMPTY_SEARCH_BASE = new LdapDN(); //$NON-NLS-1$
+    public static final DN EMPTY_SEARCH_BASE = new DN(); //$NON-NLS-1$
 
     /** Constant for no returning attributes, an empty array */
     public static final String[] NO_ATTRIBUTES = new String[0];
@@ -275,7 +275,7 @@ public interface ISearch extends Seriali
      * 
      * @return the search base
      */
-    public abstract LdapDN getSearchBase();
+    public abstract DN getSearchBase();
 
 
     /**
@@ -286,7 +286,7 @@ public interface ISearch extends Seriali
      * 
      * @param searchBase the search base
      */
-    public abstract void setSearchBase( LdapDN searchBase );
+    public abstract void setSearchBase( DN searchBase );
 
 
     /**

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java Fri Oct  8 16:50:55 2010
@@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap
 
 import java.io.Serializable;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
 import org.eclipse.core.runtime.IAdaptable;
@@ -43,7 +43,7 @@ public interface ISearchResult extends S
      * 
      * @return the DN of the search result entry.
      */
-    public LdapDN getDn();
+    public DN getDn();
 
 
     /**

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/SearchParameter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/SearchParameter.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/SearchParameter.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/SearchParameter.java Fri Oct  8 16:50:55 2010
@@ -26,10 +26,10 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.studio.connection.core.StudioControl;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
+import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch.SearchScope;
 
 
@@ -49,7 +49,7 @@ public class SearchParameter implements 
     private String name;
 
     /** The search base. */
-    private LdapDN searchBase;
+    private DN searchBase;
 
     /** The filter. */
     private String filter;
@@ -287,7 +287,7 @@ public class SearchParameter implements 
      * 
      * @return the search base
      */
-    public LdapDN getSearchBase()
+    public DN getSearchBase()
     {
         return searchBase;
     }
@@ -298,7 +298,7 @@ public class SearchParameter implements 
      * 
      * @param searchBase the search base
      */
-    public void setSearchBase( LdapDN searchBase )
+    public void setSearchBase( DN searchBase )
     {
         assert searchBase != null;
         this.searchBase = searchBase;

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java Fri Oct  8 16:50:55 2010
@@ -28,8 +28,8 @@ import java.util.LinkedHashSet;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
@@ -114,7 +114,7 @@ public abstract class AbstractEntry impl
      * 
      * @param newRdn the new RDN
      */
-    protected abstract void setRdn( Rdn newRdn );
+    protected abstract void setRdn( RDN newRdn );
 
 
     /**
@@ -383,10 +383,10 @@ public abstract class AbstractEntry impl
     /**
      * {@inheritDoc}
      */
-    public Rdn getRdn()
+    public RDN getRdn()
     {
-        Rdn rdn = getDn().getRdn();
-        return rdn == null ? new Rdn() : rdn;
+        RDN rdn = getDn().getRdn();
+        return rdn == null ? new RDN() : rdn;
     }
 
 
@@ -857,7 +857,7 @@ public abstract class AbstractEntry impl
      */
     public String toString()
     {
-        return getDn().getUpName();
+        return getDn().getName();
     }
 
 
@@ -927,9 +927,9 @@ public abstract class AbstractEntry impl
     /**
      * {@inheritDoc}
      */
-    public Collection<ObjectClassDescription> getObjectClassDescriptions()
+    public Collection<ObjectClass> getObjectClassDescriptions()
     {
-        Collection<ObjectClassDescription> ocds = new ArrayList<ObjectClassDescription>();
+        Collection<ObjectClass> ocds = new ArrayList<ObjectClass>();
         IAttribute ocAttribute = getAttribute( SchemaConstants.OBJECT_CLASS_AT );
         if ( ocAttribute != null )
         {
@@ -937,7 +937,7 @@ public abstract class AbstractEntry impl
             Schema schema = getBrowserConnection().getSchema();
             for ( String ocName : ocNames )
             {
-                ObjectClassDescription ocd = schema.getObjectClassDescription( ocName );
+                ObjectClass ocd = schema.getObjectClassDescription( ocName );
                 ocds.add( ocd );
             }
         }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java Fri Oct  8 16:50:55 2010
@@ -27,7 +27,7 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EmptyValueAddedEvent;
@@ -131,7 +131,7 @@ public class Attribute implements IAttri
         }
         else
         {
-            Collection<AttributeTypeDescription> mustAtds = SchemaUtils.getMustAttributeTypeDescriptions( entry );
+            Collection<AttributeType> mustAtds = SchemaUtils.getMustAttributeTypeDescriptions( entry );
             return mustAtds.contains( getAttributeTypeDescription() );
         }
     }
@@ -434,7 +434,7 @@ public class Attribute implements IAttri
     /**
      * {@inheritDoc}
      */
-    public AttributeTypeDescription getAttributeTypeDescription()
+    public AttributeType getAttributeTypeDescription()
     {
         return getEntry().getBrowserConnection().getSchema().getAttributeTypeDescription( getType() );
     }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BaseDNEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BaseDNEntry.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BaseDNEntry.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BaseDNEntry.java Fri Oct  8 16:50:55 2010
@@ -21,8 +21,8 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.shared.ldap.name.LdapDN;
-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.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 
@@ -38,7 +38,7 @@ public class BaseDNEntry extends Abstrac
     private static final long serialVersionUID = -5444229580355372176L;
 
     /** The base DN. */
-    protected LdapDN baseDn;
+    protected DN baseDn;
 
     /** The browser connection. */
     protected IBrowserConnection browserConnection;
@@ -55,7 +55,7 @@ public class BaseDNEntry extends Abstrac
      * @param baseDn the base DN
      * @param browserConnection the browser connection
      */
-    public BaseDNEntry( LdapDN baseDn, IBrowserConnection browserConnection )
+    public BaseDNEntry( DN baseDn, IBrowserConnection browserConnection )
     {
         assert baseDn != null;
         assert browserConnection != null;
@@ -69,7 +69,7 @@ public class BaseDNEntry extends Abstrac
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.IEntry#getDn()
      */
-    public LdapDN getDn()
+    public DN getDn()
     {
         return baseDn;
     }
@@ -96,7 +96,7 @@ public class BaseDNEntry extends Abstrac
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.impl.AbstractEntry#setRdn(org.apache.directory.studio.ldapbrowser.core.model.RDN)
      */
-    protected void setRdn( Rdn newRdn )
+    protected void setRdn( RDN newRdn )
     {
     }
 

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Bookmark.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Bookmark.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Bookmark.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Bookmark.java Fri Oct  8 16:50:55 2010
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.events.BookmarkUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
@@ -83,7 +83,7 @@ public class Bookmark implements IBookma
      * @param dn the target DN
      * @param name the symbolic name
      */
-    public Bookmark( IBrowserConnection connection, LdapDN dn, String name )
+    public Bookmark( IBrowserConnection connection, DN dn, String name )
     {
         this.connection = connection;
         this.bookmarkParameter = new BookmarkParameter( dn, name );
@@ -94,7 +94,7 @@ public class Bookmark implements IBookma
     /**
      * {@inheritDoc}
      */
-    public LdapDN getDn()
+    public DN getDn()
     {
         return this.bookmarkParameter.getDn();
     }
@@ -103,7 +103,7 @@ public class Bookmark implements IBookma
     /**
      * {@inheritDoc}
      */
-    public void setDn( LdapDN dn )
+    public void setDn( DN dn )
     {
         this.bookmarkParameter.setDn( dn );
         this.fireBookmarkUpdated( BookmarkUpdateEvent.Detail.BOOKMARK_UPDATED );

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BookmarkEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BookmarkEntry.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BookmarkEntry.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BookmarkEntry.java Fri Oct  8 16:50:55 2010
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ICompareableEntry;
 
@@ -48,7 +48,7 @@ public class BookmarkEntry extends Deleg
      * @param connection the connection of the bookmark target
      * @param dn the DN of the bookmark target
      */
-    public BookmarkEntry( IBrowserConnection connection, LdapDN dn )
+    public BookmarkEntry( IBrowserConnection connection, DN dn )
     {
         super( connection, dn );
     }

Modified: directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java?rev=1005896&r1=1005895&r2=1005896&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java (original)
+++ directory/studio/trunk/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java Fri Oct  8 16:50:55 2010
@@ -25,9 +25,8 @@ import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -165,7 +164,7 @@ public class BrowserConnection implement
     /**
      * {@inheritDoc}
      */
-    public IEntry getEntryFromCache( LdapDN dn )
+    public IEntry getEntryFromCache( DN dn )
     {
         if ( dn == null )
         {
@@ -207,13 +206,13 @@ public class BrowserConnection implement
     /**
      * {@inheritDoc}
      */
-    public LdapDN getBaseDN()
+    public DN getBaseDN()
     {
         try
         {
-            return new LdapDN( connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_BASE_DN ) );
+            return new DN( connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_BASE_DN ) );
         }
-        catch ( InvalidNameException e )
+        catch ( LdapInvalidDnException e )
         {
             return null;
         }
@@ -223,7 +222,7 @@ public class BrowserConnection implement
     /**
      * {@inheritDoc}
      */
-    public void setBaseDN( LdapDN baseDN )
+    public void setBaseDN( DN baseDN )
     {
         connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_BASE_DN, baseDN.toString() );
         ConnectionEventRegistry.fireConnectionUpdated( connection, this );
@@ -612,7 +611,7 @@ public class BrowserConnection implement
      * 
      * @param dn the DN of the entry to remove from cache
      */
-    protected synchronized void uncacheEntry( LdapDN dn )
+    protected synchronized void uncacheEntry( DN dn )
     {
         dnToEntryCache.remove( Utils.getNormalizedOidString( dn, getSchema() ) );
     }



Mime
View raw message