directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1418307 - in /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api: entry/ClonedServerEntry.java filtering/BaseEntryFilteringCursor.java filtering/EntryFilter.java
Date Fri, 07 Dec 2012 13:34:57 GMT
Author: elecharny
Date: Fri Dec  7 13:34:55 2012
New Revision: 1418307

URL: http://svn.apache.org/viewvc?rev=1418307&view=rev
Log:
o Added a toStrng method in BaseEntryFilteringCursor
o Added the toString( String tabs ) method in the EntryFilter interface
o Added the issing toString method in ClonedServerEntry

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java?rev=1418307&r1=1418306&r2=1418307&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java
Fri Dec  7 13:34:55 2012
@@ -490,8 +490,20 @@ public class ClonedServerEntry implement
     }
 
 
+    /**
+     * @see Object#toString()
+     */
     public String toString()
     {
         return clonedEntry.toString();
     }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        return clonedEntry.toString( tabs );
+    }
 }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java?rev=1418307&r1=1418306&r2=1418307&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
Fri Dec  7 13:34:55 2012
@@ -626,4 +626,59 @@ public class BaseEntryFilteringCursor ex
 
         return false;
     }
+    
+    
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        if ( wrapped != null )
+        {
+            sb.append( tabs ).append( "BaseEntryFilteringCursor, wrapped : \n" );
+            sb.append( wrapped.toString( tabs + "    " ) ).append( "\n" );
+        }
+        else
+        {
+            sb.append( tabs ).append( "BaseEntryFilteringCursor, no wrapped\n" );
+        }
+        
+        if ( ( filters != null ) && ( filters.size() > 0 ) )
+        {
+            sb.append( tabs ).append( "Filters : \n" );
+            
+            for ( EntryFilter filter : filters )
+            {
+                sb.append( filter.toString( tabs + "    " ) ).append( "\n" );
+            }
+        }
+        else
+        {
+            sb.append( tabs ).append( "No filter\n" );
+        }
+        
+        
+        if ( prefetched != null )
+        {
+            sb.append( tabs ).append( "Prefetched : \n" );
+            sb.append( prefetched.toString( tabs + "    " ) );
+        }
+        else
+        {
+            sb.append( tabs ).append( "No prefetched" );
+        }
+        
+        return sb.toString();
+    }
+    
+    
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java?rev=1418307&r1=1418306&r2=1418307&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java
Fri Dec  7 13:34:55 2012
@@ -48,4 +48,12 @@ public interface EntryFilter
      * @throws Exception if there are failures during evaluation
      */
     boolean accept( SearchingOperationContext operation, Entry result ) throws Exception;
+    
+    
+    /**
+     * The pretty-printer for this class
+     * @param tabs The tabs to add before each line
+     * @return The pretty-printed instance
+     */
+    String toString( String tabs );
 }



Mime
View raw message