directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r366695 [2/2] - in /directory/trunk: apacheds/src/main/java/org/apache/ldap/server/partition/ apacheds/src/main/java/org/apache/ldap/server/prefs/ apacheds/src/main/java/org/apache/ldap/server/schema/ ldap-common/src/main/java/org/apache/ld...
Date Sat, 07 Jan 2006 08:25:58 GMT
Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/AddRequestImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/AddRequestImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/AddRequestImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/AddRequestImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,11 +19,8 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import java.util.Map;
 
 import javax.naming.directory.Attributes;
 
@@ -197,9 +194,9 @@
                 return MessageTypeEnum.ADDREQUEST;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control control ) throws MessageException
@@ -223,30 +220,6 @@
             public Object put( Object key, Object value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
 
             public void abandon()

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/BindRequestImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/BindRequestImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/BindRequestImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/BindRequestImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,11 +19,8 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import java.util.Map;
 
 
 /**
@@ -238,9 +235,9 @@
                 return MessageTypeEnum.BINDREQUEST;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control a_control ) throws MessageException
@@ -265,31 +262,6 @@
             {
                 return null;
             }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean a_isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
-            }
-
 
             public String getSaslMechanism()
             {

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/BindResponseImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/BindResponseImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/BindResponseImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/BindResponseImplTest.java
Sat Jan  7 00:25:20 2006
@@ -90,8 +90,8 @@
      */
     public void testEqualsWithTheWorks()
     {
-        LdapResultImpl r0 = new LdapResultImpl( null );
-        LdapResultImpl r1 = new LdapResultImpl( null );
+        LdapResultImpl r0 = new LdapResultImpl();
+        LdapResultImpl r1 = new LdapResultImpl();
 
         r0.setErrorMessage( "blah blah blah" );
         r1.setErrorMessage( "blah blah blah" );
@@ -102,11 +102,11 @@
         r0.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
 
-        Referral refs0 = new ReferralImpl( r0 );
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl( r1 );
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/CompareRequestImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/CompareRequestImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/CompareRequestImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/CompareRequestImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,11 +19,8 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import java.util.Map;
 
 
 /**
@@ -176,9 +173,9 @@
                 return MessageTypeEnum.COMPAREREQUEST;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control a_control ) throws MessageException
@@ -202,30 +199,6 @@
             public Object put( Object a_key, Object a_value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean a_isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
 
             public void abandon()

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/DeleteRequestImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/DeleteRequestImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/DeleteRequestImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/DeleteRequestImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,11 +19,8 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import java.util.Map;
 
 
 /**
@@ -120,9 +117,9 @@
                 return MessageTypeEnum.DELREQUEST;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control a_control ) throws MessageException
@@ -146,30 +143,6 @@
             public Object put( Object a_key, Object a_value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean a_isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
 
             public void abandon()

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ExtendedRequestImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ExtendedRequestImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ExtendedRequestImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ExtendedRequestImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,11 +19,8 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import java.util.Map;
 
 
 /**
@@ -151,9 +148,9 @@
                 return MessageTypeEnum.EXTENDEDREQ;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control control ) throws MessageException
@@ -177,30 +174,6 @@
             public Object put( Object key, Object value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
 
             public ResultResponse getResultResponse()

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ExtendedResponseImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ExtendedResponseImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ExtendedResponseImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ExtendedResponseImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,11 +19,8 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import java.util.Map;
 
 
 /**
@@ -48,7 +45,7 @@
         LdapResult result = response.getLdapResult();
         result.setMatchedDn( "dc=example,dc=com" );
         result.setResultCode( ResultCodeEnum.SUCCESS );
-        ReferralImpl refs = new ReferralImpl( result );
+        ReferralImpl refs = new ReferralImpl();
         refs.addLdapUrl( "ldap://someserver.com" );
         refs.addLdapUrl( "ldap://apache.org" );
         refs.addLdapUrl( "ldap://another.net" );
@@ -107,10 +104,10 @@
 
             public LdapResult getLdapResult()
             {
-                LdapResultImpl result = new LdapResultImpl( this );
+                LdapResultImpl result = new LdapResultImpl();
                 result.setMatchedDn( "dc=example,dc=com" );
                 result.setResultCode( ResultCodeEnum.SUCCESS );
-                ReferralImpl refs = new ReferralImpl( result );
+                ReferralImpl refs = new ReferralImpl();
                 refs.addLdapUrl( "ldap://someserver.com" );
                 refs.addLdapUrl( "ldap://apache.org" );
                 refs.addLdapUrl( "ldap://another.net" );
@@ -124,9 +121,9 @@
                 return MessageTypeEnum.EXTENDEDRESP;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control a_control ) throws MessageException
@@ -150,30 +147,6 @@
             public Object put( Object a_key, Object a_value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean a_isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
         };
 

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/LdapResultImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/LdapResultImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/LdapResultImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/LdapResultImplTest.java
Sat Jan  7 00:25:20 2006
@@ -18,16 +18,12 @@
 
 
 import junit.framework.TestCase;
-import org.apache.ldap.common.AbstractLockable;
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
 
 
 /**
  * Tests the methods of the LdapResultImpl class.
  *
- * @author <a href="mailto:dev@directory.apache.org"> Apache Directory
- *         Project</a> $Rev$
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
$Rev$
  */
 public class LdapResultImplTest extends TestCase
 {
@@ -36,7 +32,7 @@
      */
     public void testEqualsSameObj()
     {
-        LdapResultImpl r0 = new LdapResultImpl( null );
+        LdapResultImpl r0 = new LdapResultImpl();
         assertTrue( "same object should be equal", r0.equals( r0 ) );
     }
 
@@ -47,8 +43,8 @@
      */
     public void testEqualsDefaultCopy()
     {
-        LdapResultImpl r0 = new LdapResultImpl( null );
-        LdapResultImpl r1 = new LdapResultImpl( null );
+        LdapResultImpl r0 = new LdapResultImpl();
+        LdapResultImpl r1 = new LdapResultImpl();
 
         assertTrue( "default copy should be equal", r0.equals( r1 ) );
         assertTrue( "default copy should be equal", r1.equals( r0 ) );
@@ -60,9 +56,8 @@
      */
     public void testEqualsDiffLockableParent()
     {
-        LdapResultImpl r0 = new LdapResultImpl( new AbstractLockable(){
-            private static final long serialVersionUID = 1L;} );
-        LdapResultImpl r1 = new LdapResultImpl( null );
+        LdapResultImpl r0 = new LdapResultImpl();
+        LdapResultImpl r1 = new LdapResultImpl();
 
         assertTrue( "default copy with different lockable parents " +
                 "should be equal", r0.equals( r1 ) );
@@ -76,8 +71,7 @@
      */
     public void testEqualsDiffImpl()
     {
-        LdapResultImpl r0 = new LdapResultImpl( new AbstractLockable(){
-            private static final long serialVersionUID = 1L;} );
+        LdapResultImpl r0 = new LdapResultImpl();
         LdapResult r1 = new LdapResult()
         {
             public ResultCodeEnum getResultCode()
@@ -120,30 +114,6 @@
             public void setReferral( Referral a_referral )
             {
             }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean a_isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
-            }
         };
 
         assertTrue( "r0 equals should see other impl r1 as equal",
@@ -158,8 +128,8 @@
      */
     public void testEqualsCarbonCopy()
     {
-        LdapResultImpl r0 = new LdapResultImpl( null );
-        LdapResultImpl r1 = new LdapResultImpl( null );
+        LdapResultImpl r0 = new LdapResultImpl();
+        LdapResultImpl r1 = new LdapResultImpl();
 
         r0.setErrorMessage( "blah blah blah" );
         r1.setErrorMessage( "blah blah blah" );
@@ -170,11 +140,11 @@
         r0.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
 
-        Referral refs0 = new ReferralImpl( r0 );
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl( r1 );
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -188,8 +158,8 @@
      */
     public void testNotEqualsDiffErrorMessage()
     {
-        LdapResultImpl r0 = new LdapResultImpl( null );
-        LdapResultImpl r1 = new LdapResultImpl( null );
+        LdapResultImpl r0 = new LdapResultImpl();
+        LdapResultImpl r1 = new LdapResultImpl();
 
         r0.setErrorMessage( "blah blah blah" );
         r1.setErrorMessage( "blah" );
@@ -200,11 +170,11 @@
         r0.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
 
-        Referral refs0 = new ReferralImpl( r0 );
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl( r1 );
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -220,8 +190,8 @@
      */
     public void testNotEqualsDiffMatchedDn()
     {
-        LdapResultImpl r0 = new LdapResultImpl( null );
-        LdapResultImpl r1 = new LdapResultImpl( null );
+        LdapResultImpl r0 = new LdapResultImpl();
+        LdapResultImpl r1 = new LdapResultImpl();
 
         r0.setErrorMessage( "blah blah blah" );
         r1.setErrorMessage( "blah blah blah" );
@@ -232,11 +202,11 @@
         r0.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
 
-        Referral refs0 = new ReferralImpl( r0 );
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl( r1 );
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -252,8 +222,8 @@
      */
     public void testNotEqualsDiffResultCode()
     {
-        LdapResultImpl r0 = new LdapResultImpl( null );
-        LdapResultImpl r1 = new LdapResultImpl( null );
+        LdapResultImpl r0 = new LdapResultImpl();
+        LdapResultImpl r1 = new LdapResultImpl();
 
         r0.setErrorMessage( "blah blah blah" );
         r1.setErrorMessage( "blah blah blah" );
@@ -264,11 +234,11 @@
         r0.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
         r1.setResultCode( ResultCodeEnum.SIZELIMITEXCEEDED );
 
-        Referral refs0 = new ReferralImpl( r0 );
+        Referral refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl( r1 );
+        Referral refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://someserver.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );
 
@@ -284,8 +254,8 @@
      */
     public void testNotEqualsDiffReferrals()
     {
-        LdapResultImpl r0 = new LdapResultImpl( null );
-        LdapResultImpl r1 = new LdapResultImpl( null );
+        LdapResultImpl r0 = new LdapResultImpl();
+        LdapResultImpl r1 = new LdapResultImpl();
 
         r0.setErrorMessage( "blah blah blah" );
         r1.setErrorMessage( "blah blah blah" );
@@ -296,12 +266,12 @@
         r0.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
         r1.setResultCode( ResultCodeEnum.TIMELIMITEXCEEDED );
 
-        Referral refs0 = new ReferralImpl( r0 );
+        Referral refs0 = new ReferralImpl();
         r0.setReferral( refs0 );
         refs0.addLdapUrl( "ldap://someserver.com" );
         refs0.addLdapUrl( "ldap://anotherserver.org" );
 
-        Referral refs1 = new ReferralImpl( r1 );
+        Referral refs1 = new ReferralImpl();
         r1.setReferral( refs1 );
         refs1.addLdapUrl( "ldap://abc.com" );
         refs1.addLdapUrl( "ldap://anotherserver.org" );

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ModifyDnRequestImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ModifyDnRequestImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ModifyDnRequestImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ModifyDnRequestImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,18 +19,14 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import java.util.Map;
 
 
 /**
  * TestCase for the ModifyDnRequestImpl class.
  *
- * @author <a href="mailto:dev@directory.apache.org"> Apache Directory
- *         Project</a>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
 public class ModifyDnRequestImplTest extends TestCase
@@ -224,9 +220,9 @@
                 return MessageTypeEnum.MODDNREQUEST;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control a_control ) throws MessageException
@@ -250,30 +246,6 @@
             public Object put( Object a_key, Object a_value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean a_isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
 
             public void abandon()

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ModifyRequestImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ModifyRequestImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ModifyRequestImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ModifyRequestImplTest.java
Sat Jan  7 00:25:20 2006
@@ -21,12 +21,11 @@
 
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
+
 import java.util.Collection;
 import java.util.Collections;
 import java.util.ArrayList;
-
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import java.util.Map;
 
 
 /**
@@ -285,9 +284,9 @@
                 return MessageTypeEnum.MODIFYREQUEST;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control a_control ) throws MessageException
@@ -311,30 +310,6 @@
             public Object put( Object a_key, Object a_value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean a_isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
 
             public void abandon()

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ReferralImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ReferralImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ReferralImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/ReferralImplTest.java
Sat Jan  7 00:25:20 2006
@@ -18,9 +18,6 @@
 
 
 import junit.framework.TestCase;
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.AbstractLockable;
-import org.apache.ldap.common.LockException;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -39,7 +36,7 @@
      */
     public void testEqualsSameObject()
     {
-        ReferralImpl refs = new ReferralImpl( null );
+        ReferralImpl refs = new ReferralImpl();
         assertTrue( "equals method should work for the same object",
                 refs.equals( refs ) );
     }
@@ -51,11 +48,11 @@
      */
     public void testEqualsExactCopy()
     {
-        ReferralImpl refs0 = new ReferralImpl( null );
+        ReferralImpl refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://blah0" );
         refs0.addLdapUrl( "ldap://blah1" );
         refs0.addLdapUrl( "ldap://blah2" );
-        ReferralImpl refs1 = new ReferralImpl( null );
+        ReferralImpl refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://blah0" );
         refs1.addLdapUrl( "ldap://blah1" );
         refs1.addLdapUrl( "ldap://blah2" );
@@ -72,12 +69,12 @@
      */
     public void testEqualsExactCopyWithRedundancy()
     {
-        ReferralImpl refs0 = new ReferralImpl( null );
+        ReferralImpl refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://blah0" );
         refs0.addLdapUrl( "ldap://blah1" );
         refs0.addLdapUrl( "ldap://blah2" );
         refs0.addLdapUrl( "ldap://blah2" );
-        ReferralImpl refs1 = new ReferralImpl( null );
+        ReferralImpl refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://blah0" );
         refs1.addLdapUrl( "ldap://blah1" );
         refs1.addLdapUrl( "ldap://blah2" );
@@ -95,12 +92,12 @@
      */
     public void testEqualsSameButWithRedundancyInOne()
     {
-        ReferralImpl refs0 = new ReferralImpl( null );
+        ReferralImpl refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://blah0" );
         refs0.addLdapUrl( "ldap://blah1" );
         refs0.addLdapUrl( "ldap://blah2" );
         refs0.addLdapUrl( "ldap://blah2" );
-        ReferralImpl refs1 = new ReferralImpl( null );
+        ReferralImpl refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://blah0" );
         refs1.addLdapUrl( "ldap://blah1" );
         refs1.addLdapUrl( "ldap://blah2" );
@@ -117,12 +114,12 @@
      */
     public void testEqualsSameNumberButDifferentUrls()
     {
-        ReferralImpl refs0 = new ReferralImpl( null );
+        ReferralImpl refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://blah0" );
         refs0.addLdapUrl( "ldap://blah1" );
         refs0.addLdapUrl( "ldap://blah2" );
         refs0.addLdapUrl( "ldap://blah3" );
-        ReferralImpl refs1 = new ReferralImpl( null );
+        ReferralImpl refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://blah0" );
         refs1.addLdapUrl( "ldap://blah1" );
         refs1.addLdapUrl( "ldap://blah2" );
@@ -141,12 +138,12 @@
      */
     public void testEqualsSubset()
     {
-        ReferralImpl refs0 = new ReferralImpl( null );
+        ReferralImpl refs0 = new ReferralImpl();
         refs0.addLdapUrl( "ldap://blah0" );
         refs0.addLdapUrl( "ldap://blah1" );
         refs0.addLdapUrl( "ldap://blah2" );
         refs0.addLdapUrl( "ldap://blah3" );
-        ReferralImpl refs1 = new ReferralImpl( null );
+        ReferralImpl refs1 = new ReferralImpl();
         refs1.addLdapUrl( "ldap://blah0" );
         refs1.addLdapUrl( "ldap://blah1" );
         assertFalse( "Referrals should not be equal",
@@ -156,32 +153,6 @@
     }
 
 
-    /**
-     * Make sure the lockable parent being different does not effect equality.
-     */
-    public void testEqualsDifferentLockableParents()
-    {
-        ReferralImpl refs0 = new ReferralImpl( new AbstractLockable(){
-            private static final long serialVersionUID = 1L;} );
-        ReferralImpl refs1 = new ReferralImpl( null );
-
-        assertTrue( "Empty Referrals should be equal",
-                refs0.equals( refs1 ) ) ;
-        assertTrue( "Empty Referrals should be equal",
-                refs1.equals( refs0 ) ) ;
-
-        refs0.addLdapUrl( "ldap://blah0" );
-        refs0.addLdapUrl( "ldap://blah1" );
-        refs1.addLdapUrl( "ldap://blah0" );
-        refs1.addLdapUrl( "ldap://blah1" );
-
-        assertTrue( "exact copies of Referrals should be equal",
-                refs0.equals( refs1 ) ) ;
-        assertTrue( "exact copies of Referrals should be equal",
-                refs1.equals( refs0 ) ) ;
-    }
-
-
     public void testEqualsDifferentImpls()
     {
         Referral refs0 = new Referral()
@@ -198,33 +169,9 @@
             public void removeLdapUrl( String a_url )
             {
             }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean a_isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
-            }
         };
 
-        ReferralImpl refs1 = new ReferralImpl( null );
+        ReferralImpl refs1 = new ReferralImpl();
 
         assertFalse( "Object.equals() in effect because we did not redefine "
                 + " equals for the new impl above", refs0.equals( refs1 ) ) ;

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseDoneImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseDoneImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseDoneImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseDoneImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,11 +19,8 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import java.util.Map;
 
 
 /**
@@ -46,7 +43,7 @@
         LdapResult result = response.getLdapResult();
         result.setMatchedDn( "dc=example,dc=com" );
         result.setResultCode( ResultCodeEnum.SUCCESS );
-        ReferralImpl refs = new ReferralImpl( result );
+        ReferralImpl refs = new ReferralImpl();
         refs.addLdapUrl( "ldap://someserver.com" );
         refs.addLdapUrl( "ldap://apache.org" );
         refs.addLdapUrl( "ldap://another.net" );
@@ -87,10 +84,10 @@
         {
             public LdapResult getLdapResult()
             {
-                LdapResultImpl result = new LdapResultImpl( this );
+                LdapResultImpl result = new LdapResultImpl();
                 result.setMatchedDn( "dc=example,dc=com" );
                 result.setResultCode( ResultCodeEnum.SUCCESS );
-                ReferralImpl refs = new ReferralImpl( result );
+                ReferralImpl refs = new ReferralImpl();
                 refs.addLdapUrl( "ldap://someserver.com" );
                 refs.addLdapUrl( "ldap://apache.org" );
                 refs.addLdapUrl( "ldap://another.net" );
@@ -104,9 +101,9 @@
                 return MessageTypeEnum.SEARCHRESDONE;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control a_control ) throws MessageException
@@ -130,30 +127,6 @@
             public Object put( Object a_key, Object a_value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean a_isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
         };
 

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseEntryImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseEntryImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseEntryImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseEntryImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,12 +19,10 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-import javax.naming.directory.Attributes;
+import java.util.Map;
 
-import org.apache.ldap.common.Lockable;
-import org.apache.ldap.common.LockException;
+import javax.naming.directory.Attributes;
 
 
 /**
@@ -124,9 +122,9 @@
                 return MessageTypeEnum.SEARCHRESENTRY;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control control ) throws MessageException
@@ -150,30 +148,6 @@
             public Object put( Object key, Object value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
         };
 

Modified: directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseReferenceImplTest.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseReferenceImplTest.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseReferenceImplTest.java
(original)
+++ directory/trunk/ldap-common/src/test/java/org/apache/ldap/common/message/SearchResponseReferenceImplTest.java
Sat Jan  7 00:25:20 2006
@@ -19,11 +19,8 @@
 
 import junit.framework.TestCase;
 
-import java.util.Collection;
 import java.util.Collections;
-
-import org.apache.ldap.common.LockException;
-import org.apache.ldap.common.Lockable;
+import java.util.Map;
 
 
 /**
@@ -44,7 +41,7 @@
      */
     public Referral getReferral( SearchResponseReference resp )
     {
-        ReferralImpl ref = new ReferralImpl( resp );
+        ReferralImpl ref = new ReferralImpl();
         resp.setReferral( ref );
         ref.addLdapUrl( "http://apache.org???" );
         ref.addLdapUrl( "http://mit.edu???" );
@@ -99,9 +96,9 @@
                 return MessageTypeEnum.SEARCHRESREF;
             }
 
-            public Collection getControls()
+            public Map getControls()
             {
-                return Collections.EMPTY_LIST;
+                return Collections.EMPTY_MAP;
             }
 
             public void add( Control control ) throws MessageException
@@ -125,30 +122,6 @@
             public Object put( Object key, Object value )
             {
                 return null;
-            }
-
-            public Lockable getParent()
-            {
-                return null;
-            }
-
-            public boolean isLocked()
-            {
-                return false;
-            }
-
-            public boolean getLocked()
-            {
-                return false;
-            }
-
-            public void setLocked( boolean isLocked ) throws LockException
-            {
-            }
-
-            public boolean isUnlockable()
-            {
-                return false;
             }
         };
 

Modified: directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
(original)
+++ directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/LdapProtocolProvider.java
Sat Jan  7 00:25:20 2006
@@ -382,7 +382,6 @@
                 ExtendedRequest req = new ExtendedRequestImpl( 0 );
                 req.setOid( "1.3.6.1.4.1.1466.20037" );
                 req.setPayload( "SECURED".getBytes( "ISO-8859-1" ) );
-                req.setLocked( true );
                 message = req;
             }
             else if( message == SSLFilter.SESSION_UNSECURED )
@@ -390,7 +389,6 @@
                 ExtendedRequest req = new ExtendedRequestImpl( 0 );
                 req.setOid( "1.3.6.1.4.1.1466.20037" );
                 req.setPayload( "UNSECURED".getBytes( "ISO-8859-1" ) );
-                req.setLocked( true );
                 message = req;
             }
             

Modified: directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/BindHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/BindHandler.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/BindHandler.java
(original)
+++ directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/BindHandler.java
Sat Jan  7 00:25:20 2006
@@ -81,7 +81,7 @@
         cloned.put( Context.SECURITY_CREDENTIALS, creds );
         cloned.put( Context.SECURITY_AUTHENTICATION, "simple" );
 
-        Control[] connCtls = ( Control[] ) req.getControls().toArray( EMPTY );
+        Control[] connCtls = ( Control[] ) req.getControls().values().toArray( EMPTY );
 
         try
         {

Modified: directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/PersistentSearchListener.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/PersistentSearchListener.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/PersistentSearchListener.java
(original)
+++ directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/PersistentSearchListener.java
Sat Jan  7 00:25:20 2006
@@ -257,7 +257,7 @@
      */
     static PersistentSearchControl getPersistentSearchControl( SearchRequest req )
     {
-        Iterator list = req.getControls().iterator();
+        Iterator list = req.getControls().values().iterator();
         while ( list.hasNext() )
         {
             Control control = ( Control ) list.next();

Modified: directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/SearchResponseIterator.java
URL: http://svn.apache.org/viewcvs/directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/SearchResponseIterator.java?rev=366695&r1=366694&r2=366695&view=diff
==============================================================================
--- directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/SearchResponseIterator.java
(original)
+++ directory/trunk/ldap-protocol/src/main/java/org/apache/ldap/server/protocol/support/SearchResponseIterator.java
Sat Jan  7 00:25:20 2006
@@ -92,7 +92,7 @@
                 {
                     SearchResponseReference respRef;
                     respRef = new SearchResponseReferenceImpl( req.getMessageId() );
-                    respRef.setReferral( new ReferralImpl( respRef ) );
+                    respRef.setReferral( new ReferralImpl() );
 
                     for( int ii = 0; ii < ref.size(); ii ++ )
                     {
@@ -220,7 +220,7 @@
         else
         {
             SearchResponseReference respRef = new SearchResponseReferenceImpl( req.getMessageId()
);
-            respRef.setReferral( new ReferralImpl( respRef ) );
+            respRef.setReferral( new ReferralImpl() );
 
             for( int ii = 0; ii < ref.size(); ii ++ )
             {



Mime
View raw message