directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1063982 - in /directory: apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/ shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/
Date Thu, 27 Jan 2011 04:20:58 GMT
Author: akarasulu
Date: Thu Jan 27 04:20:58 2011
New Revision: 1063982

URL: http://svn.apache.org/viewvc?rev=1063982&view=rev
Log:
extracted interfacce for subentries control

Added:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SimpleSubentries.java
      - copied, changed from r1063947, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/Subentries.java
Removed:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/Subentries.java
Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesDecorator.java

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java?rev=1063982&r1=1063981&r2=1063982&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
Thu Jan 27 04:20:58 2011
@@ -54,6 +54,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.shared.ldap.codec.search.controls.subentries.SimpleSubentries;
 import org.apache.directory.shared.ldap.codec.search.controls.subentries.Subentries;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
@@ -735,7 +736,7 @@ public class SearchIT extends AbstractLd
             + "        } " + "      } " + "    } " + "  } " + "}" );
 
         // prepare the subentry decorator to make the subentry visible
-        Subentries ctl = new Subentries();
+        Subentries ctl = new SimpleSubentries();
         ctl.setVisibility( true );
         Control[] reqControls = new Control[]
             { ctl };

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SimpleSubentries.java
(from r1063947, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/Subentries.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SimpleSubentries.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SimpleSubentries.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/Subentries.java&r1=1063947&r2=1063982&rev=1063982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/Subentries.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SimpleSubentries.java
Thu Jan 27 04:20:58 2011
@@ -24,44 +24,30 @@ import org.apache.directory.shared.ldap.
 
 
 /**
- * A searchRequest control : Subentries
+ * A simple Subentries Control implementation.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class Subentries extends BasicControlImpl
+public class SimpleSubentries extends BasicControlImpl implements Subentries
 {
-    /** Ths control OID */
-    public static final String OID = "1.3.6.1.4.1.4203.1.10.1";
-
     private boolean visibility = false;
 
 
     /**
      * Default constructor
-     *
      */
-    public Subentries()
+    public SimpleSubentries()
     {
         super( OID );
     }
 
 
-    /**
-     * Check if the subEntry is visible
-     *
-     * @return true or false.
-     */
     public boolean isVisible()
     {
         return visibility;
     }
 
 
-    /**
-     * Set the visibility flag
-     *
-     * @param visibility The visibility flag : true or false
-     */
     public void setVisibility( boolean visibility )
     {
         this.visibility = visibility;
@@ -80,7 +66,7 @@ public class Subentries extends BasicCon
 
         Subentries otherDecorator = ( Subentries ) o;
 
-        return ( visibility == otherDecorator.visibility );
+        return ( visibility == otherDecorator.isVisible() );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesDecorator.java?rev=1063982&r1=1063981&r2=1063982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesDecorator.java
Thu Jan 27 04:20:58 2011
@@ -27,7 +27,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 
 
@@ -44,7 +43,7 @@ public class SubentriesDecorator extends
      */
     public SubentriesDecorator()
     {
-        super( new Subentries(), new SubentriesDecoder() );
+        super( new SimpleSubentries(), new SubentriesDecoder() );
     }
 
 



Mime
View raw message