directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1063617 - in /directory: apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/ shared/trunk/ldap/src/main/java/org/...
Date Wed, 26 Jan 2011 07:20:39 GMT
Author: akarasulu
Date: Wed Jan 26 07:20:38 2011
New Revision: 1063617

URL: http://svn.apache.org/viewvc?rev=1063617&view=rev
Log:
fixing bunch of compilation problems with various controls

Modified:
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecoder.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchDecoder.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchGrammar.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
(original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
Wed Jan 26 07:20:38 2011
@@ -398,7 +398,7 @@ public abstract class ServerContext impl
                 control = new EntryChangeDecorator();
                 Asn1Decoder entryChangeControlDecoder = new EntryChangeDecoder();
                 EntryChangeContainer entryChangeContainer = new EntryChangeContainer();
-                entryChangeContainer.setEntryChangeControl( ( EntryChangeDecorator ) control
);
+                entryChangeContainer.setEntryChangeDecorator( ( EntryChangeDecorator ) control
);
                 ByteBuffer bb = ByteBuffer.allocate( jndiControl.getEncodedValue().length
);
                 bb.put( jndiControl.getEncodedValue() ).flip();
 
@@ -446,7 +446,7 @@ public abstract class ServerContext impl
                 control = new PersistentSearchDecorator();
                 PersistentSearchDecoder persistentSearchDecoder = new PersistentSearchDecoder();
                 PersistentSearchContainer persistentSearchContainer = new PersistentSearchContainer();
-                persistentSearchContainer.setPSearchControl( ( PersistentSearchDecorator
) control );
+                persistentSearchContainer.setPSearchDecorator( ( PersistentSearchDecorator
) control );
                 bb = ByteBuffer.allocate( jndiControl.getEncodedValue().length );
                 bb.put( jndiControl.getEncodedValue() ).flip();
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeContainer.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeContainer.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeContainer.java
Wed Jan 26 07:20:38 2011
@@ -48,7 +48,7 @@ public class EntryChangeContainer extend
     /**
      * @return Returns the EntryChangeControl.
      */
-    public EntryChangeDecorator getEntryChangeControl()
+    public EntryChangeDecorator getEntryChangeDecorator()
     {
         return control;
     }
@@ -60,7 +60,7 @@ public class EntryChangeContainer extend
      * 
      * @param control the EntryChangeControl to set.
      */
-    public void setEntryChangeControl( EntryChangeDecorator control )
+    public void setEntryChangeDecorator( EntryChangeDecorator control )
     {
         this.control = control;
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecoder.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecoder.java
Wed Jan 26 07:20:38 2011
@@ -53,8 +53,8 @@ public class EntryChangeDecoder extends 
     {
         ByteBuffer bb = ByteBuffer.wrap( controlBytes );
         EntryChangeContainer container = new EntryChangeContainer();
-        container.setEntryChangeControl( (EntryChangeDecorator )control );
+        container.setEntryChangeDecorator( ( EntryChangeDecorator ) control );
         decoder.decode( bb, container );
-        return container.getEntryChangeControl();
+        return container.getEntryChangeDecorator();
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecorator.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeDecorator.java
Wed Jan 26 07:20:38 2011
@@ -91,9 +91,7 @@ public class EntryChangeDecorator extend
 
 
     /**
-     * 
      * Creates a new instance of EntryChangeControl.
-     *
      */
     public EntryChangeDecorator()
     {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeGrammar.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeGrammar.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeGrammar.java
Wed Jan 26 07:20:38 2011
@@ -113,7 +113,8 @@ public final class EntryChangeGrammar ex
                                 LOG.debug( "changeType = " + changeType );
                             }
 
-                            entryChangeContainer.getEntryChangeControl().setChangeType( changeType
);
+                            ( ( EntryChange ) entryChangeContainer.getEntryChangeDecorator().getDecorated()
)
+                                    .setChangeType( changeType );
                             break;
 
                         default:
@@ -158,7 +159,10 @@ public final class EntryChangeGrammar ex
             {
                 EntryChangeContainer entryChangeContainer = ( EntryChangeContainer ) container;
 
-                ChangeType changeType = entryChangeContainer.getEntryChangeControl().getChangeType();
+                EntryChange entryChange = ( EntryChange ) entryChangeContainer
+                        .getEntryChangeDecorator().getDecorated();
+                ChangeType changeType = entryChange.getChangeType();
+
 
                 if ( changeType != ChangeType.MODDN )
                 {
@@ -168,7 +172,7 @@ public final class EntryChangeGrammar ex
                 else
                 {
                     Value value = entryChangeContainer.getCurrentTLV().getValue();
-                    Dn previousDn = null;
+                    Dn previousDn;
 
                     try
                     {
@@ -185,7 +189,7 @@ public final class EntryChangeGrammar ex
                         LOG.debug( "previousDN = " + previousDn );
                     }
 
-                    entryChangeContainer.getEntryChangeControl().setPreviousDn( previousDn
);
+                    entryChange.setPreviousDn( previousDn );
 
                     // We can have an END transition
                     entryChangeContainer.setGrammarEndAllowed( true );
@@ -210,7 +214,9 @@ public final class EntryChangeGrammar ex
                         LOG.debug( "changeNumber = " + changeNumber );
                     }
 
-                    entryChangeContainer.getEntryChangeControl().setChangeNumber( changeNumber
);
+                    EntryChange entryChange = ( EntryChange ) entryChangeContainer
+                            .getEntryChangeDecorator().getDecorated();
+                    entryChange.setChangeNumber( changeNumber );
 
                     // We can have an END transition
                     entryChangeContainer.setGrammarEndAllowed( true );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchContainer.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchContainer.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchContainer.java
Wed Jan 26 07:20:38 2011
@@ -48,7 +48,7 @@ public class PersistentSearchContainer e
     /**
      * @return Returns the persistent search decorator.
      */
-    public PersistentSearchDecorator getPSearchControl()
+    public PersistentSearchDecorator getPSearchDecorator()
     {
 
         return decorator;
@@ -61,7 +61,7 @@ public class PersistentSearchContainer e
      * 
      * @param decorator the PSearchControl to set.
      */
-    public void setPSearchControl( PersistentSearchDecorator decorator )
+    public void setPSearchDecorator( PersistentSearchDecorator decorator )
     {
         this.decorator = decorator;
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchDecoder.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchDecoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchDecoder.java
Wed Jan 26 07:20:38 2011
@@ -53,9 +53,9 @@ public class PersistentSearchDecoder ext
     {
         ByteBuffer bb = ByteBuffer.wrap( controlBytes );
         PersistentSearchContainer container = new PersistentSearchContainer();
-        container.setPSearchControl( (PersistentSearchDecorator )control );
+        container.setPSearchDecorator( ( PersistentSearchDecorator ) control );
 
         decoder.decode( bb, container );
-        return container.getPSearchControl();
+        return container.getPSearchDecorator();
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchGrammar.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchGrammar.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchGrammar.java
Wed Jan 26 07:20:38 2011
@@ -119,7 +119,9 @@ public final class PersistentSearchGramm
                             LOG.debug( "changeTypes = " + changeTypes );
                         }
 
-                        psearchContainer.getPSearchControl().setChangeTypes( changeTypes
);
+                        PersistentSearch persistentSearch = ( PersistentSearch )
+                                psearchContainer.getPSearchDecorator().getDecorated();
+                        persistentSearch.setChangeTypes( changeTypes );
                     }
                     catch ( IntegerDecoderException e )
                     {
@@ -158,7 +160,9 @@ public final class PersistentSearchGramm
                             LOG.debug( "changesOnly = " + changesOnly );
                         }
 
-                        psearchContainer.getPSearchControl().setChangesOnly( changesOnly
);
+                        PersistentSearch persistentSearch = ( PersistentSearch )
+                                psearchContainer.getPSearchDecorator().getDecorated();
+                        persistentSearch.setChangesOnly( changesOnly );
                     }
                     catch ( BooleanDecoderException e )
                     {
@@ -197,7 +201,9 @@ public final class PersistentSearchGramm
                             LOG.debug( "returnECs = " + returnECs );
                         }
 
-                        psearchContainer.getPSearchControl().setReturnECs( returnECs );
+                        PersistentSearch persistentSearch = ( PersistentSearch )
+                                psearchContainer.getPSearchDecorator().getDecorated();
+                        persistentSearch.setReturnECs( returnECs );
 
                         // We can have an END transition
                         psearchContainer.setGrammarEndAllowed( true );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
Wed Jan 26 07:20:38 2011
@@ -31,6 +31,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
+import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChange;
 import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeContainer;
 import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeDecoder;
 import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeDecorator;
@@ -69,7 +70,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeContainer container = new EntryChangeContainer();
-        container.setEntryChangeControl( new EntryChangeDecorator() );
+        container.setEntryChangeDecorator( new EntryChangeDecorator() );
         
         try
         {
@@ -81,7 +82,7 @@ public class EntryChangeControlTest
             fail( de.getMessage() );
         }
 
-        EntryChangeDecorator entryChange = container.getEntryChangeControl();
+        EntryChange entryChange = ( EntryChange ) container.getEntryChangeDecorator().getDecorated();
         assertEquals( ChangeType.MODDN, entryChange.getChangeType() );
         assertEquals( "a=b", entryChange.getPreviousDn().toString() );
         assertEquals( 16, entryChange.getChangeNumber() );
@@ -109,7 +110,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeContainer container = new EntryChangeContainer();
-        container.setEntryChangeControl( new EntryChangeDecorator() );
+        container.setEntryChangeDecorator( new EntryChangeDecorator() );
         
         try
         {
@@ -121,7 +122,7 @@ public class EntryChangeControlTest
             fail( de.getMessage() );
         }
 
-        EntryChangeDecorator entryChange = container.getEntryChangeControl();
+        EntryChange entryChange = ( EntryChange ) container.getEntryChangeDecorator().getDecorated();
         assertEquals( ChangeType.MODDN, entryChange.getChangeType() );
         assertEquals( "a=b", entryChange.getPreviousDn().toString() );
         assertEquals( 5124095576030430L, entryChange.getChangeNumber() );
@@ -148,7 +149,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeContainer container = new EntryChangeContainer();
-        container.setEntryChangeControl( new EntryChangeDecorator() );
+        container.setEntryChangeDecorator( new EntryChangeDecorator() );
         
         try
         {
@@ -160,7 +161,7 @@ public class EntryChangeControlTest
             fail( de.getMessage() );
         }
 
-        EntryChangeDecorator entryChange = container.getEntryChangeControl();
+        EntryChange entryChange = ( EntryChange ) container.getEntryChangeDecorator().getDecorated();
         assertEquals( ChangeType.ADD, entryChange.getChangeType() );
         assertNull( entryChange.getPreviousDn() );
         assertEquals( 16, entryChange.getChangeNumber() );
@@ -190,7 +191,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeContainer container = new EntryChangeContainer();
-        container.setEntryChangeControl( new EntryChangeDecorator() );
+        container.setEntryChangeDecorator( new EntryChangeDecorator() );
         
         try
         {
@@ -226,7 +227,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeContainer container = new EntryChangeContainer();
-        container.setEntryChangeControl( new EntryChangeDecorator() );
+        container.setEntryChangeDecorator( new EntryChangeDecorator() );
         
         try
         {
@@ -238,7 +239,7 @@ public class EntryChangeControlTest
             fail( de.getMessage() );
         }
 
-        EntryChangeDecorator entryChange = container.getEntryChangeControl();
+        EntryChange entryChange = ( EntryChange ) container.getEntryChangeDecorator().getDecorated();
         assertEquals( ChangeType.ADD, entryChange.getChangeType() );
         assertNull( entryChange.getPreviousDn() );
         assertEquals( EntryChangeDecorator.UNDEFINED_CHANGE_NUMBER, entryChange.getChangeNumber()
);
@@ -265,7 +266,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeContainer container = new EntryChangeContainer();
-        container.setEntryChangeControl( new EntryChangeDecorator() );
+        container.setEntryChangeDecorator( new EntryChangeDecorator() );
         
         try
         {
@@ -304,7 +305,7 @@ public class EntryChangeControlTest
         bb.flip();
 
         EntryChangeContainer container = new EntryChangeContainer();
-        container.setEntryChangeControl( new EntryChangeDecorator() );
+        container.setEntryChangeDecorator( new EntryChangeDecorator() );
         
         try
         {
@@ -347,11 +348,12 @@ public class EntryChangeControlTest
         String expected = Strings.dumpBytes(bb.array());
         bb.flip();
 
-        EntryChangeDecorator entry = new EntryChangeDecorator();
+        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChange entry = ( EntryChange ) decorator.getDecorated();
         entry.setChangeType( ChangeType.MODDN );
         entry.setChangeNumber( 16 );
         entry.setPreviousDn( new Dn( "a=b" ) );
-        bb = entry.encode( ByteBuffer.allocate( entry.computeLength() ) );
+        bb = decorator.encode( ByteBuffer.allocate( decorator.computeLength() ) );
         String decoded = Strings.dumpBytes(bb.array());
         assertEquals( expected, decoded );
     }
@@ -384,11 +386,13 @@ public class EntryChangeControlTest
         String expected = Strings.dumpBytes(bb.array());
         bb.flip();
 
-        EntryChangeDecorator entry = new EntryChangeDecorator();
+        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChange entry = ( EntryChange ) decorator.getDecorated();
+
         entry.setChangeType( ChangeType.MODDN );
         entry.setChangeNumber( 5124095576030430L );
         entry.setPreviousDn( new Dn( "a=b" ) );
-        bb = entry.encode( ByteBuffer.allocate( entry.computeLength() ) );
+        bb = decorator.encode( ByteBuffer.allocate( decorator.computeLength() ) );
         String decoded = Strings.dumpBytes(bb.array());
         assertEquals( expected, decoded );
     }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java?rev=1063617&r1=1063616&r2=1063617&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
Wed Jan 26 07:20:38 2011
@@ -72,11 +72,12 @@ public class PSearchControlTest
         String expected = Strings.dumpBytes(bb.array());
         bb.flip();
 
-        PersistentSearchDecorator ctrl = new PersistentSearchDecorator();
+        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearch ctrl = ( PersistentSearch ) decorator.getDecorated();
         ctrl.setChangesOnly( false );
         ctrl.setReturnECs( false );
         ctrl.setChangeTypes( 1 );
-        bb = ctrl.encode(ByteBuffer.allocate( ctrl.computeLength() ) );
+        bb = decorator.encode(ByteBuffer.allocate( decorator.computeLength() ) );
         String decoded = Strings.dumpBytes(bb.array());
         assertEquals( expected, decoded );
     }
@@ -99,7 +100,7 @@ public class PSearchControlTest
         bb.flip();
 
         PersistentSearchContainer container = new PersistentSearchContainer();
-        container.setPSearchControl( new PersistentSearchDecorator() );
+        container.setPSearchDecorator( new PersistentSearchDecorator() );
 
         try
         {
@@ -110,12 +111,13 @@ public class PSearchControlTest
             fail( de.getMessage() );
         }
 
-        PersistentSearchDecorator decorator = container.getPSearchControl();
-        int changeTypes = decorator.getChangeTypes();
+        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearch ctrl = ( PersistentSearch ) decorator.getDecorated();
+        int changeTypes = ctrl.getChangeTypes();
         assertEquals( PersistentSearch.CHANGE_TYPE_ADD, changeTypes & PersistentSearch.CHANGE_TYPE_ADD
);
         assertEquals( PersistentSearch.CHANGE_TYPE_MODDN, changeTypes & PersistentSearch.CHANGE_TYPE_MODDN
);
-        assertEquals( false, decorator.isChangesOnly() );
-        assertEquals( false, decorator.isReturnECs() );
+        assertEquals( false, ctrl.isChangesOnly() );
+        assertEquals( false, ctrl.isReturnECs() );
     }
 
     /**
@@ -137,7 +139,7 @@ public class PSearchControlTest
         bb.flip();
 
         PersistentSearchContainer container = new PersistentSearchContainer();
-        container.setPSearchControl( new PersistentSearchDecorator() );
+        container.setPSearchDecorator( new PersistentSearchDecorator() );
         
         try
         {
@@ -169,7 +171,7 @@ public class PSearchControlTest
         bb.flip();
 
         PersistentSearchContainer container = new PersistentSearchContainer();
-        container.setPSearchControl( new PersistentSearchDecorator() );
+        container.setPSearchDecorator( new PersistentSearchDecorator() );
 
         try
         {
@@ -197,7 +199,7 @@ public class PSearchControlTest
         bb.flip();
 
         PersistentSearchContainer container = new PersistentSearchContainer();
-        container.setPSearchControl( new PersistentSearchDecorator() );
+        container.setPSearchDecorator( new PersistentSearchDecorator() );
 
         try
         {
@@ -227,7 +229,7 @@ public class PSearchControlTest
         bb.flip();
 
         PersistentSearchContainer container = new PersistentSearchContainer();
-        container.setPSearchControl( new PersistentSearchDecorator() );
+        container.setPSearchDecorator( new PersistentSearchDecorator() );
 
         try
         {
@@ -257,7 +259,7 @@ public class PSearchControlTest
         bb.flip();
 
         PersistentSearchContainer container = new PersistentSearchContainer();
-        container.setPSearchControl( new PersistentSearchDecorator() );
+        container.setPSearchDecorator( new PersistentSearchDecorator() );
 
         try
         {
@@ -287,7 +289,7 @@ public class PSearchControlTest
         bb.flip();
 
         PersistentSearchContainer container = new PersistentSearchContainer();
-        container.setPSearchControl( new PersistentSearchDecorator() );
+        container.setPSearchDecorator( new PersistentSearchDecorator() );
 
         try
         {



Mime
View raw message