directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1071344 - /directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/
Date Wed, 16 Feb 2011 18:08:38 GMT
Author: elecharny
Date: Wed Feb 16 18:08:38 2011
New Revision: 1071344

URL: http://svn.apache.org/viewvc?rev=1071344&view=rev
Log:
Used the Dn.getParent() method

Modified:
    directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesRunnable.java
    directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
    directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java
    directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java
    directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java

Modified: directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesRunnable.java?rev=1071344&r1=1071343&r2=1071344&view=diff
==============================================================================
--- directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesRunnable.java
(original)
+++ directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesRunnable.java
Wed Feb 16 18:08:38 2011
@@ -40,8 +40,8 @@ import javax.naming.ldap.ManageReferralC
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.name.Ava;
-import org.apache.directory.shared.ldap.model.name.Rdn;
 import org.apache.directory.shared.ldap.model.name.Dn;
+import org.apache.directory.shared.ldap.model.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.Connection.AliasDereferencingMethod;
@@ -245,7 +245,7 @@ public class CopyEntriesRunnable impleme
         Dn parentDn = parent.getDn();
         if ( parentDn.isEmpty() )
         {
-            parentDn = DnUtils.getParent( entryToCopy.getDn() );
+            parentDn = entryToCopy.getDn().getParent();
         }
         numberOfCopiedEntries = copyEntryRecursive( entryToCopy.getBrowserConnection(), result,
             parent.getBrowserConnection(), parentDn, newRdn, scope, numberOfCopiedEntries,
dialog, dummyMonitor,

Modified: directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java?rev=1071344&r1=1071343&r2=1071344&view=diff
==============================================================================
--- directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
(original)
+++ directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
Wed Feb 16 18:08:38 2011
@@ -37,7 +37,6 @@ import javax.naming.directory.SearchCont
 import javax.naming.ldap.Control;
 
 import org.apache.commons.codec.digest.DigestUtils;
-
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
@@ -53,27 +52,30 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.request.Dsmlv2Grammar;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
-import org.apache.directory.shared.ldap.model.entry.*;
-import org.apache.directory.shared.ldap.model.message.*;
 import org.apache.directory.shared.ldap.model.entry.AttributeUtils;
-import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.message.AddRequest;
 import org.apache.directory.shared.ldap.model.message.BindRequest;
 import org.apache.directory.shared.ldap.model.message.CompareRequest;
 import org.apache.directory.shared.ldap.model.message.DeleteRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.model.message.LdapResult;
+import org.apache.directory.shared.ldap.model.message.Message;
+import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.model.message.ModifyRequest;
+import org.apache.directory.shared.ldap.model.message.Request;
+import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
 import org.apache.directory.shared.ldap.model.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;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
-import org.apache.directory.studio.connection.core.DnUtils;
 import org.apache.directory.studio.connection.core.io.StudioNamingEnumeration;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
@@ -374,7 +376,7 @@ public class ImportDsmlRunnable implemen
         // Update cached entries
         Dn dn = entry.getDn();
         IEntry e = browserConnection.getEntryFromCache( dn );
-        Dn parentDn = DnUtils.getParent( dn );
+        Dn parentDn = dn.getParent();
         IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache( parentDn
) : null;
         if ( e != null )
         {
@@ -441,7 +443,7 @@ public class ImportDsmlRunnable implemen
         // Update cached entries
         Dn dn = request.getName();
         IEntry e = browserConnection.getEntryFromCache( dn );
-        Dn parentDn = DnUtils.getParent( dn );
+        Dn parentDn = dn.getParent();
         IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache( parentDn
) : null;
         if ( e != null )
         {
@@ -581,7 +583,7 @@ public class ImportDsmlRunnable implemen
         // Update cached entries
         Dn dn = request.getName();
         IEntry e = browserConnection.getEntryFromCache( dn );
-        Dn parentDn = DnUtils.getParent( dn );
+        Dn parentDn = dn.getParent();
         IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache( parentDn
) : null;
         if ( e != null )
         {

Modified: directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java?rev=1071344&r1=1071343&r2=1071344&view=diff
==============================================================================
--- directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java
(original)
+++ directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifRunnable.java
Wed Feb 16 18:08:38 2011
@@ -291,12 +291,12 @@ public class ImportLdifRunnable implemen
                             // update cache and adjust attribute/children initialization
flags
                             Dn dn = new Dn( record.getDnLine().getValueAsString() );
                             IEntry entry = browserConnection.getEntryFromCache( dn );
-                            Dn parentDn = DnUtils.getParent( dn );
+                            Dn parentDn = dn.getParent();
                             IEntry parentEntry = null;
                             while ( parentEntry == null && parentDn != null )
                             {
                                 parentEntry = browserConnection.getEntryFromCache( parentDn
);
-                                parentDn = DnUtils.getParent( parentDn );
+                                parentDn = parentDn.getParent();
                             }
 
                             if ( record instanceof LdifChangeDeleteRecord )
@@ -530,7 +530,7 @@ public class ImportLdifRunnable implemen
                 else
                 {
                     Dn dnObject = new Dn( dn );
-                    Dn parent = DnUtils.getParent( dnObject );
+                    Dn parent = dnObject.getParent();
                     newDn = DnUtils.composeDn( newRdn, parent.getName() );
                 }
 

Modified: directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java?rev=1071344&r1=1071343&r2=1071344&view=diff
==============================================================================
--- directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java
(original)
+++ directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryRunnable.java
Wed Feb 16 18:08:38 2011
@@ -146,7 +146,7 @@ public class RenameEntryRunnable impleme
         monitor.worked( 1 );
 
         Dn oldDn = oldEntry.getDn();
-        Dn parentDn = DnUtils.getParent( oldDn );
+        Dn parentDn = oldDn.getParent();
         Dn newDn = DnUtils.composeDn( newRdn, parentDn );
 
         // use a dummy monitor to be able to handle exceptions

Modified: directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java?rev=1071344&r1=1071343&r2=1071344&view=diff
==============================================================================
--- directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
(original)
+++ directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
Wed Feb 16 18:08:38 2011
@@ -45,7 +45,6 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.connection.core.Connection;
 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.DnUtils;
 import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.connection.core.StudioPagedResultsControl;
 import org.apache.directory.studio.connection.core.io.StudioNamingEnumeration;
@@ -614,12 +613,12 @@ public class SearchRunnable implements S
         while ( parentDn != null && browserConnection.getEntryFromCache(parentDn)
== null )
         {
             parentDnList.addFirst(parentDn);
-            parentDn = DnUtils.getParent(parentDn);
+            parentDn = parentDn.getParent();
         }
 
         for ( Dn aDn : parentDnList )
         {
-            parentDn = DnUtils.getParent(aDn);
+            parentDn = aDn.getParent();
             if ( parentDn == null )
             {
                 // only the root DSE has a null parent



Mime
View raw message