directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1066878 - in /directory: apacheds/branches/m1/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/partition/ apacheds/branches/m1/protocol-ldap/src/main/ja...
Date Thu, 03 Feb 2011 17:20:11 GMT
Author: elecharny
Date: Thu Feb  3 17:20:10 2011
New Revision: 1066878

URL: http://svn.apache.org/viewvc?rev=1066878&view=rev
Log:
o Moved the SyncDoneValue control to Model
o Some renaming
o Some minor fixes

Added:
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValue.java
      - copied, changed from r1066814, directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/ISyncDoneValue.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValueImpl.java
      - copied, changed from r1066814, directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValue.java
Removed:
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/ISyncDoneValue.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValue.java
Modified:
    directory/apacheds/branches/m1/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
    directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
    directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValue.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValueImpl.java
    directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java
    directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java
    directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncRequestValueControlTest.java
    directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java

Modified: directory/apacheds/branches/m1/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/branches/m1/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Thu Feb  3 17:20:10 2011
@@ -81,7 +81,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicy;
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicyDecorator;
 import org.apache.directory.shared.ldap.codec.controls.ppolicy.PasswordPolicyResponse;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.ISyncDoneValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueDecorator;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueDecorator;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.ISyncRequestValue;
@@ -119,6 +118,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.controls.PagedResults;
 import org.apache.directory.shared.ldap.model.message.controls.PersistentSearch;
 import org.apache.directory.shared.ldap.model.message.controls.Subentries;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValue;
 import org.apache.directory.shared.ldap.model.message.controls.SyncInfoValue;
 import org.apache.directory.shared.ldap.model.name.Ava;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -184,7 +184,7 @@ public abstract class ServerContext impl
         ADS_CONTROLS.put( IPasswordPolicy.OID, ControlEnum.PASSWORD_POLICY_REQUEST_CONTROL );
         ADS_CONTROLS.put( PersistentSearch.OID, ControlEnum.PERSISTENT_SEARCH_CONTROL );
         ADS_CONTROLS.put( Subentries.OID, ControlEnum.SUBENTRIES_CONTROL );
-        ADS_CONTROLS.put( ISyncDoneValue.OID, ControlEnum.SYNC_DONE_VALUE_CONTROL );
+        ADS_CONTROLS.put( SyncDoneValue.OID, ControlEnum.SYNC_DONE_VALUE_CONTROL );
         ADS_CONTROLS.put( SyncInfoValue.OID, ControlEnum.SYNC_INFO_VALUE_CONTROL );
         ADS_CONTROLS.put( ISyncModifyDn.OID, ControlEnum.SYNC_MODIFY_DN_CONTROL );
         ADS_CONTROLS.put( ISyncRequestValue.OID, ControlEnum.SYNC_REQUEST_VALUE_CONTROL );

Modified: directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Thu Feb  3 17:20:10 2011
@@ -59,13 +59,13 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.message.controls.Cascade;
 import org.apache.directory.shared.ldap.model.message.controls.ManageDsaIT;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.ISyncDoneValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.ISyncRequestValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.ISyncStateValue;
 import org.apache.directory.shared.ldap.model.message.controls.EntryChange;
 import org.apache.directory.shared.ldap.model.message.controls.PagedResults;
 import org.apache.directory.shared.ldap.model.message.controls.PersistentSearch;
 import org.apache.directory.shared.ldap.model.message.controls.Subentries;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValue;
 import org.apache.directory.shared.ldap.model.message.controls.SyncInfoValue;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
@@ -178,7 +178,7 @@ public class DefaultPartitionNexus exten
             EntryChange.OID, Subentries.OID, ManageDsaIT.OID,
             Cascade.OID, PagedResults.OID,
             // Replication controls
-            ISyncDoneValue.OID, SyncInfoValue.OID, ISyncRequestValue.OID,
+            SyncDoneValue.OID, SyncInfoValue.OID, ISyncRequestValue.OID,
             ISyncStateValue.OID );
 
         // Add the objectClasses

Modified: directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Thu Feb  3 17:20:10 2011
@@ -60,7 +60,6 @@ import org.apache.directory.server.proto
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
 import org.apache.directory.server.protocol.shared.transport.Transport;
 import org.apache.directory.server.protocol.shared.transport.UdpTransport;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.ISyncDoneValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.ISyncRequestValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.ISyncStateValue;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
@@ -82,6 +81,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.controls.PagedResults;
 import org.apache.directory.shared.ldap.model.message.controls.PersistentSearch;
 import org.apache.directory.shared.ldap.model.message.controls.Subentries;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValue;
 import org.apache.directory.shared.ldap.model.message.controls.SyncInfoValue;
 import org.apache.directory.shared.util.Strings;
 import org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder;
@@ -244,7 +244,7 @@ public class LdapServer extends Director
         this.supportedControls.add( Cascade.OID );
         this.supportedControls.add( PagedResults.OID );
         // Replication controls
-        this.supportedControls.add( ISyncDoneValue.OID );
+        this.supportedControls.add( SyncDoneValue.OID );
         this.supportedControls.add( SyncInfoValue.OID );
         this.supportedControls.add( ISyncRequestValue.OID );
         this.supportedControls.add( ISyncStateValue.OID );

Modified: directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java (original)
+++ directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java Thu Feb  3 17:20:10 2011
@@ -40,7 +40,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.shared.ldap.codec.controls.manageDsaIT.ManageDsaITDecorator;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.ISyncDoneValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueDecorator;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.SyncRequestValueDecorator;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.SyncStateValueDecorator;
@@ -75,6 +74,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchResultReference;
 import org.apache.directory.shared.ldap.model.message.controls.ManageDsaITImpl;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValue;
 import org.apache.directory.shared.ldap.model.message.controls.SyncInfoValue;
 import org.apache.directory.shared.ldap.model.message.controls.SyncModifyDnType;
 import org.apache.directory.shared.ldap.model.message.controls.SyncStateTypeEnum;
@@ -275,7 +275,7 @@ public class SyncReplConsumer implements
     {
         LOG.debug( "///////////////// handleSearchDone //////////////////" );
 
-        ISyncDoneValue ctrl = (ISyncDoneValue)searchDone.getControls().get( ISyncDoneValue.OID );
+        SyncDoneValue ctrl = (SyncDoneValue)searchDone.getControls().get( SyncDoneValue.OID );
 
         if ( ctrl.getCookie() != null )
         {

Modified: directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java (original)
+++ directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java Thu Feb  3 17:20:10 2011
@@ -47,7 +47,6 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.SearchAbandonListener;
 import org.apache.directory.server.ldap.handlers.SearchTimeLimitingMonitor;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.ISyncDoneValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueDecorator;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueDecorator;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.ISyncRequestValue;
@@ -83,6 +82,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchResultReference;
 import org.apache.directory.shared.ldap.model.message.SearchResultReferenceImpl;
 import org.apache.directory.shared.ldap.model.message.controls.ManageDsaIT;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValue;
 import org.apache.directory.shared.ldap.model.message.controls.SyncInfoValue;
 import org.apache.directory.shared.ldap.model.message.controls.SyncStateTypeEnum;
 import org.apache.directory.shared.ldap.model.message.controls.SynchronizationInfoEnum;
@@ -343,7 +343,7 @@ public class SyncReplProvider implements
         {
             SearchResultDone searchDoneResp = ( SearchResultDone ) req.getResultResponse();
             searchDoneResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
-            ISyncDoneValue syncDone = new SyncDoneValueDecorator( 
+            SyncDoneValue syncDone = new SyncDoneValueDecorator( 
                 ldapServer.getDirectoryService().getLdapCodecService() );
             syncDone.setCookie( cookie );
             searchDoneResp.addControl( syncDone );
@@ -438,7 +438,7 @@ public class SyncReplProvider implements
             else
             {
                 // no need to send from the log, that will be done in the next refreshOnly session
-                ISyncDoneValue syncDone = new SyncDoneValueDecorator(
+                SyncDoneValue syncDone = new SyncDoneValueDecorator(
                     ldapServer.getDirectoryService().getLdapCodecService() );
                 syncDone.setCookie( cookie );
                 searchDoneResp.addControl( syncDone );

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java (original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java Thu Feb  3 17:20:10 2011
@@ -6,22 +6,21 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue;
 
 
 import java.nio.ByteBuffer;
-import java.util.Arrays;
 
 import org.apache.directory.shared.asn1.Asn1Object;
 import org.apache.directory.shared.asn1.DecoderException;
@@ -33,6 +32,8 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValue;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValueImpl;
 import org.apache.directory.shared.util.Strings;
 
 
@@ -41,23 +42,23 @@ import org.apache.directory.shared.util.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SyncDoneValueDecorator extends ControlDecorator<ISyncDoneValue> implements ISyncDoneValue
+public class SyncDoneValueDecorator extends ControlDecorator<SyncDoneValue> implements SyncDoneValue
 {
     /** The global length for this control */
     private int syncDoneValueLength;
-    
+
     /** An instance of this decoder */
     private static final Asn1Decoder decoder = new Asn1Decoder();
 
-    
+
     /**
      * Creates a new instance of SyncDoneValueControlCodec.
      */
     public SyncDoneValueDecorator( ILdapCodecService codec )
     {
-        super( codec, new SyncDoneValue() );
+        super( codec, new SyncDoneValueImpl() );
     }
-    
+
 
     /**
      * Creates a new instance of SyncDoneValueDecorator.
@@ -65,7 +66,7 @@ public class SyncDoneValueDecorator exte
      * @param codec The LDAP codec
      * @param control The control to be decorated
      */
-    public SyncDoneValueDecorator( ILdapCodecService codec, ISyncDoneValue control )
+    public SyncDoneValueDecorator( ILdapCodecService codec, SyncDoneValue control )
     {
         super( codec, control );
     }
@@ -102,7 +103,7 @@ public class SyncDoneValueDecorator exte
 
     /**
      * Encode the SyncDoneValue control
-     * 
+     *
      * @param buffer The encoded sink
      * @return A ByteBuffer that contains the encoded PDU
      * @throws EncoderException If anything goes wrong while encoding.
@@ -115,7 +116,7 @@ public class SyncDoneValueDecorator exte
             throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
-        // Encode the SEQ 
+        // Encode the SEQ
         buffer.put( UniversalTag.SEQUENCE.getValue() );
         buffer.put( TLV.getBytes( syncDoneValueLength ) );
 
@@ -125,27 +126,28 @@ public class SyncDoneValueDecorator exte
         }
 
         if ( isRefreshDeletes() )
-        {  
+        {
             Value.encode( buffer, isRefreshDeletes() );
         }
 
         return buffer;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
+    @Override
     public byte[] getValue()
     {
         if ( value == null )
         {
             try
-            { 
+            {
                 computeLength();
                 ByteBuffer buffer = ByteBuffer.allocate( valueLength );
-                
-                // Encode the SEQ 
+
+                // Encode the SEQ
                 buffer.put( UniversalTag.SEQUENCE.getValue() );
                 buffer.put( TLV.getBytes( syncDoneValueLength ) );
 
@@ -155,10 +157,10 @@ public class SyncDoneValueDecorator exte
                 }
 
                 if ( isRefreshDeletes() )
-                {  
+                {
                     Value.encode( buffer, isRefreshDeletes() );
                 }
-                
+
                 value = buffer.array();
             }
             catch ( Exception e )
@@ -166,7 +168,7 @@ public class SyncDoneValueDecorator exte
                 return null;
             }
         }
-        
+
         return value;
     }
 
@@ -218,41 +220,6 @@ public class SyncDoneValueDecorator exte
 
 
     /**
-     * @see Object#equals(Object)
-     */
-    public boolean equals( Object o )
-    {
-        if ( ! super.equals( o ) )
-        {
-            return false;
-        }
-
-        SyncDoneValueDecorator otherControl = ( SyncDoneValueDecorator ) o;
-
-        return  ( isRefreshDeletes() == otherControl.isRefreshDeletes() ) 
-                && 
-                ( Arrays.equals( getCookie(), otherControl.getCookie() ) );
-    }
-
-
-   /**
-     * @see Object#toString()
-     */
-    public String toString()
-    {
-        StringBuilder sb = new StringBuilder();
-
-        sb.append( "    SyncDoneValue control :\n" );
-        sb.append( "        oid : " ).append( getOid() ).append( '\n' );
-        sb.append( "        critical : " ).append( isCritical() ).append( '\n' );
-        sb.append( "        cookie            : '" ).append( Strings.dumpBytes( getCookie() ) ).append( "'\n" );
-        sb.append( "        refreshDeletes : '" ).append( isRefreshDeletes() ).append( "'\n" );
-
-        return sb.toString();
-    }
-
-
-    /**
      * {@inheritDoc}
      */
    public Asn1Object decode( byte[] controlBytes ) throws DecoderException

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueFactory.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueFactory.java (original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueFactory.java Thu Feb  3 17:20:10 2011
@@ -29,15 +29,17 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.IControlFactory;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValue;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValueImpl;
 
 
 /**
- * A {@link IControlFactory} which creates {@link ISyncDoneValue} controls.
+ * A {@link IControlFactory} which creates {@link SyncDoneValue} controls.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class SyncDoneValueFactory implements IControlFactory<ISyncDoneValue, SyncDoneValueDecorator>
+public class SyncDoneValueFactory implements IControlFactory<SyncDoneValue, SyncDoneValueDecorator>
 {
     
     private ILdapCodecService codec;
@@ -59,7 +61,7 @@ public class SyncDoneValueFactory implem
      */
     public String getOid()
     {
-        return ISyncDoneValue.OID;
+        return SyncDoneValue.OID;
     }
 
     
@@ -73,7 +75,7 @@ public class SyncDoneValueFactory implem
     }
     
 
-    public SyncDoneValueDecorator decorate( ISyncDoneValue control )
+    public SyncDoneValueDecorator decorate( SyncDoneValue control )
     {
         SyncDoneValueDecorator decorator = null;
         
@@ -91,13 +93,13 @@ public class SyncDoneValueFactory implem
     }
 
     
-    public ISyncDoneValue newControl()
+    public SyncDoneValue newControl()
     {
-        return new SyncDoneValue();
+        return new SyncDoneValueImpl();
     }
     
 
-    public Control toJndiControl( ISyncDoneValue control ) throws EncoderException
+    public Control toJndiControl( SyncDoneValue control ) throws EncoderException
     {
         SyncDoneValueDecorator decorator = decorate( control );
         ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
@@ -107,7 +109,7 @@ public class SyncDoneValueFactory implem
     }
 
     
-    public ISyncDoneValue fromJndiControl( Control jndi ) throws DecoderException
+    public SyncDoneValue fromJndiControl( Control jndi ) throws DecoderException
     {
         SyncDoneValueDecorator decorator = newCodecControl();
         decorator.setCritical( jndi.isCritical() );

Copied: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValue.java (from r1066814, directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/ISyncDoneValue.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValue.java?p2=directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValue.java&p1=directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/ISyncDoneValue.java&r1=1066814&r2=1066878&rev=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/ISyncDoneValue.java (original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValue.java Thu Feb  3 17:20:10 2011
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue;
+package org.apache.directory.shared.ldap.model.message.controls;
 
 import org.apache.directory.shared.ldap.model.message.Control;
 
@@ -27,7 +27,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface ISyncDoneValue extends Control
+public interface SyncDoneValue extends Control
 {
 
     /** This control OID */

Copied: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValueImpl.java (from r1066814, directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValue.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValueImpl.java?p2=directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValueImpl.java&p1=directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValue.java&r1=1066814&r2=1066878&rev=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValue.java (original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncDoneValueImpl.java Thu Feb  3 17:20:10 2011
@@ -17,7 +17,12 @@
  *   under the License.
  *
  */
-package org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue;
+package org.apache.directory.shared.ldap.model.message.controls;
+
+import java.util.Arrays;
+
+import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueDecorator;
+import org.apache.directory.shared.util.Strings;
 
 
 /**
@@ -26,7 +31,7 @@ package org.apache.directory.shared.ldap
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class SyncDoneValue implements ISyncDoneValue
+public class SyncDoneValueImpl extends AbstractControl implements SyncDoneValue
 {
     /** The Sync cookie */
     private byte[] cookie;
@@ -34,7 +39,26 @@ public class SyncDoneValue implements IS
     /** the refreshDeletes flag */
     private boolean refreshDeletes;
 
-    private boolean critical;
+
+    /**
+     * Creates a new instance of SyncDoneValueImpl.
+     */
+    public SyncDoneValueImpl()
+    {
+        super( OID );
+    }
+
+
+    /**
+     *
+     * Creates a new instance of SyncDoneValueImpl.
+     *
+     * @param isCritical The critical flag
+     */
+    public SyncDoneValueImpl( boolean isCritical )
+    {
+        super( OID, isCritical );
+    }
 
 
     /**
@@ -73,20 +97,67 @@ public class SyncDoneValue implements IS
     }
 
 
-    public String getOid()
+    /**
+     * @see Object#hashCode()
+     */
+    @Override
+    public int hashCode()
     {
-        return OID;
+        int h = 37;
+
+        h = h*17 + super.hashCode();
+        h = h*17 + ( refreshDeletes ? 1 : 0 );
+
+        if ( cookie != null )
+        {
+            for ( byte b : cookie )
+            {
+                h = h*17 + b;
+            }
+        }
+
+        return h;
     }
 
 
-    public boolean isCritical()
+    /**
+     * @see Object#equals(Object)
+     */
+    @Override
+    public boolean equals( Object o )
     {
-        return critical;
+        if ( this == o )
+        {
+            return true;
+        }
+
+        if ( !( o instanceof SyncDoneValue ) )
+        {
+            return false;
+        }
+
+        SyncDoneValueDecorator otherControl = ( SyncDoneValueDecorator ) o;
+
+        return  ( isRefreshDeletes() == otherControl.isRefreshDeletes() ) &&
+                ( Arrays.equals( getCookie(), otherControl.getCookie() ) &&
+                ( isCritical() == otherControl.isCritical() ) );
     }
 
 
-    public void setCritical( boolean critical )
+    /**
+     * @see Object#toString()
+     */
+    @Override
+    public String toString()
     {
-        this.critical = critical;
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( "    SyncDoneValue control :\n" );
+        sb.append( "        oid : " ).append( getOid() ).append( '\n' );
+        sb.append( "        critical : " ).append( isCritical() ).append( '\n' );
+        sb.append( "        cookie            : '" ).append( Strings.dumpBytes( getCookie() ) ).append( "'\n" );
+        sb.append( "        refreshDeletes : '" ).append( isRefreshDeletes() ).append( "'\n" );
+
+        return sb.toString();
     }
 }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValue.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValue.java (original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValue.java Thu Feb  3 17:20:10 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.model.message.controls;
 
@@ -26,8 +26,33 @@ import org.apache.directory.shared.ldap.
 
 
 /**
- * A syncInfoValue object, as defined in RFC 4533
- * 
+ * A syncInfoValue object, as defined in RFC 4533 ;
+ * <pre>
+ * 2.5.  Sync Info Message
+ *
+ *    The Sync Info Message is an LDAP Intermediate Response Message
+ *    [RFC4511] where responseName is the object identifier
+ *    1.3.6.1.4.1.4203.1.9.1.4 and responseValue contains a BER-encoded
+ *    syncInfoValue.  The criticality is FALSE (and hence absent).
+ *
+ *       syncInfoValue ::= CHOICE {
+ *           newcookie      [0] syncCookie,
+ *           refreshDelete  [1] SEQUENCE {
+ *               cookie         syncCookie OPTIONAL,
+ *               refreshDone    BOOLEAN DEFAULT TRUE
+ *           },
+ *           refreshPresent [2] SEQUENCE {
+ *               cookie         syncCookie OPTIONAL,
+ *               refreshDone    BOOLEAN DEFAULT TRUE
+ *           },
+ *           syncIdSet      [3] SEQUENCE {
+ *               cookie         syncCookie OPTIONAL,
+ *               refreshDeletes BOOLEAN DEFAULT FALSE,
+ *               syncUUIDs      SET OF syncUUID
+ *           }
+ *       }
+ * </pre>
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public interface SyncInfoValue extends Control
@@ -39,7 +64,7 @@ public interface SyncInfoValue extends C
 
     /**
      * Get the control type.
-     * 
+     *
      * @return the type : one of newCookie, refreshDelete, refreshPresent or syncIdSet
      */
     SynchronizationInfoEnum getType();

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValueImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValueImpl.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValueImpl.java (original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/controls/SyncInfoValueImpl.java Thu Feb  3 17:20:10 2011
@@ -223,7 +223,7 @@ public class SyncInfoValueImpl extends A
     @Override
     public boolean equals( Object o )
     {
-        if ( this == o)
+        if ( this == o )
         {
             return true;
         }
@@ -233,7 +233,6 @@ public class SyncInfoValueImpl extends A
             return false;
         }
 
-
         SyncInfoValueDecorator otherControl = ( SyncInfoValueDecorator ) o;
 
         if ( getSyncUUIDs() != null )
@@ -259,7 +258,8 @@ public class SyncInfoValueImpl extends A
         return ( isRefreshDeletes() == otherControl.isRefreshDeletes() ) &&
             ( isRefreshDone() == otherControl.isRefreshDone() ) &&
             ( getType() == otherControl.getType() ) &&
-            ( Arrays.equals( getCookie(), otherControl.getCookie() ) );
+            ( Arrays.equals( getCookie(), otherControl.getCookie() ) &&
+            ( isCritical() == otherControl.isCritical() ) );
     }
 
 

Modified: directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java (original)
+++ directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncDoneValueControlTest.java Thu Feb  3 17:20:10 2011
@@ -33,8 +33,8 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.ISyncDoneValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueDecorator;
+import org.apache.directory.shared.ldap.model.message.controls.SyncDoneValue;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -69,7 +69,7 @@ public class SyncDoneValueControlTest
 
         SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );
 
-        ISyncDoneValue control = (ISyncDoneValue)decorator.decode( bb.array() );
+        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );
         
         assertEquals( "xkcd", Strings.utf8ToString(control.getCookie()) );
         assertTrue( control.isRefreshDeletes() );
@@ -105,7 +105,7 @@ public class SyncDoneValueControlTest
 
         SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );
 
-        ISyncDoneValue control = (ISyncDoneValue)decorator.decode( bb.array() );
+        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );
 
         assertNull( control.getCookie() );
         assertTrue( control.isRefreshDeletes() );
@@ -139,7 +139,7 @@ public class SyncDoneValueControlTest
 
         SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );
 
-        ISyncDoneValue control = (ISyncDoneValue)decorator.decode( bb.array() );
+        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );
 
         assertNull( control.getCookie() );
         assertFalse( control.isRefreshDeletes() );
@@ -162,7 +162,7 @@ public class SyncDoneValueControlTest
 
         SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );
 
-        ISyncDoneValue control = (ISyncDoneValue)decorator.decode( bb.array() );
+        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );
 
         assertEquals( "", Strings.utf8ToString(control.getCookie()) );
         assertFalse( control.isRefreshDeletes() );

Modified: directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java (original)
+++ directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncInfoValueControlTest.java Thu Feb  3 17:20:10 2011
@@ -32,9 +32,9 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.ISyncInfoValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueDecorator;
-import org.apache.directory.shared.ldap.message.control.replication.SynchronizationInfoEnum;
+import org.apache.directory.shared.ldap.model.message.controls.SyncInfoValue;
+import org.apache.directory.shared.ldap.model.message.controls.SynchronizationInfoEnum;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -70,7 +70,7 @@ public class SyncInfoValueControlTest
         SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
         decorator.setType( SynchronizationInfoEnum.NEW_COOKIE );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.NEW_COOKIE, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -105,7 +105,7 @@ public class SyncInfoValueControlTest
         SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
         decorator.setType( SynchronizationInfoEnum.NEW_COOKIE );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.NEW_COOKIE, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -147,7 +147,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -196,7 +196,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -235,7 +235,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -274,7 +274,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -311,7 +311,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -354,7 +354,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -403,7 +403,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -442,7 +442,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -481,7 +481,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -518,7 +518,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -687,7 +687,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -736,7 +736,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -787,7 +787,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -837,7 +837,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -888,7 +888,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -948,7 +948,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -1019,7 +1019,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -1081,7 +1081,7 @@ public class SyncInfoValueControlTest
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        ISyncInfoValue syncInfoValue = (ISyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );

Modified: directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncRequestValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncRequestValueControlTest.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncRequestValueControlTest.java (original)
+++ directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncRequestValueControlTest.java Thu Feb  3 17:20:10 2011
@@ -35,7 +35,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.ISyncRequestValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.SyncRequestValueDecorator;
-import org.apache.directory.shared.ldap.message.control.replication.SynchronizationModeEnum;
+import org.apache.directory.shared.ldap.model.message.controls.SynchronizationModeEnum;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;

Modified: directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java?rev=1066878&r1=1066877&r2=1066878&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java (original)
+++ directory/shared/branches/m1/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncStateValueControlTest.java Thu Feb  3 17:20:10 2011
@@ -34,7 +34,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.ISyncStateValue;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.SyncStateValueDecorator;
-import org.apache.directory.shared.ldap.message.control.replication.SyncStateTypeEnum;
+import org.apache.directory.shared.ldap.model.message.controls.SyncStateTypeEnum;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;



Mime
View raw message