directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1063583 - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/ apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ apacheds/trunk/core/src/main/java/org/apache/directory/se...
Date Wed, 26 Jan 2011 03:10:38 GMT
Author: akarasulu
Date: Wed Jan 26 03:10:37 2011
New Revision: 1063583

URL: http://svn.apache.org/viewvc?rev=1063583&view=rev
Log:
converted Cascade Control into new pattern

Added:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/BasicControlImpl.java
  (contents, props changed)
      - copied, changed from r1063574, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/DefaultControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/Cascade.java
      - copied, changed from r1063551, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecoder.java
  (contents, props changed)
      - copied, changed from r1063551, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControlDecoder.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecorator.java
  (contents, props changed)
      - copied, changed from r1063551, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlDecorator.java
  (contents, props changed)
      - copied, changed from r1063574, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java
Removed:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControlDecoder.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/DefaultControl.java
Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlEnum.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaIT.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaITDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyRequestControl.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=1063583&r1=1063582&r2=1063583&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
Wed Jan 26 03:10:37 2011
@@ -46,7 +46,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.schema.registries.synchronizers.RegistrySynchronizerAdaptor;
 import org.apache.directory.server.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.controls.CascadeControl;
+import org.apache.directory.shared.ldap.codec.controls.Cascade;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.*;
@@ -303,7 +303,7 @@ public final class SchemaPartition exten
      */
     public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
-        boolean cascade = deleteContext.hasRequestControl( CascadeControl.CONTROL_OID );
+        boolean cascade = deleteContext.hasRequestControl( Cascade.OID );
 
         // The SchemaObject always exist when we reach this method.
         synchronizer.delete( deleteContext, cascade );
@@ -355,7 +355,7 @@ public final class SchemaPartition exten
 
         Entry targetEntry = ( Entry ) SchemaUtils.getTargetEntry( modifyContext.getModItems(),
entry );
 
-        boolean cascade = modifyContext.hasRequestControl( CascadeControl.CONTROL_OID );
+        boolean cascade = modifyContext.hasRequestControl( Cascade.OID );
 
         boolean hasModification = synchronizer.modify( modifyContext, targetEntry, cascade
);
 
@@ -376,7 +376,7 @@ public final class SchemaPartition exten
      */
     public void move( MoveOperationContext moveContext ) throws LdapException
     {
-        boolean cascade = moveContext.hasRequestControl( CascadeControl.CONTROL_OID );
+        boolean cascade = moveContext.hasRequestControl( Cascade.OID );
         Entry entry = moveContext.lookup( moveContext.getDn(), ByPassConstants.LOOKUP_BYPASS
);
         synchronizer.move( moveContext, entry, cascade );
         wrapped.move( moveContext );
@@ -389,7 +389,7 @@ public final class SchemaPartition exten
      */
     public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws
LdapException
     {
-        boolean cascade = moveAndRenameContext.hasRequestControl( CascadeControl.CONTROL_OID
);
+        boolean cascade = moveAndRenameContext.hasRequestControl( Cascade.OID );
         Entry entry = moveAndRenameContext.lookup( moveAndRenameContext.getDn(), ByPassConstants.LOOKUP_BYPASS
);
         synchronizer.moveAndRename( moveAndRenameContext, entry, cascade );
         wrapped.moveAndRename( moveAndRenameContext );
@@ -402,7 +402,7 @@ public final class SchemaPartition exten
      */
     public void rename( RenameOperationContext renameContext ) throws LdapException
     {
-        boolean cascade = renameContext.hasRequestControl( CascadeControl.CONTROL_OID );
+        boolean cascade = renameContext.hasRequestControl( Cascade.OID );
 
         // First update the registries
         synchronizer.rename( renameContext, cascade );

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=1063583&r1=1063582&r2=1063583&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 03:10:37 2011
@@ -74,7 +74,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
-import org.apache.directory.shared.ldap.codec.controls.CascadeControl;
+import org.apache.directory.shared.ldap.codec.controls.Cascade;
+import org.apache.directory.shared.ldap.codec.controls.CascadeDecorator;
 import org.apache.directory.shared.ldap.codec.controls.ControlEnum;
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaIT;
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaITDecorator;
@@ -179,7 +180,7 @@ public abstract class ServerContext impl
 
     static
     {
-        ADS_CONTROLS.put( CascadeControl.CONTROL_OID, ControlEnum.CASCADE_CONTROL );
+        ADS_CONTROLS.put( Cascade.OID, ControlEnum.CASCADE_CONTROL );
         ADS_CONTROLS.put( EntryChangeControl.CONTROL_OID, ControlEnum.ENTRY_CHANGE_CONTROL
);
         ADS_CONTROLS.put( ManageDsaIT.OID, ControlEnum.MANAGE_DSA_IT_CONTROL );
         ADS_CONTROLS.put( PagedResultsControl.CONTROL_OID, ControlEnum.PAGED_RESULTS_CONTROL
);
@@ -386,7 +387,7 @@ public abstract class ServerContext impl
         switch ( controlId )
         {
             case CASCADE_CONTROL:
-                control = new CascadeControl();
+                control = new CascadeDecorator();
                 break;
 
             case ENTRY_CHANGE_CONTROL:

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=1063583&r1=1063582&r2=1063583&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Wed Jan 26 03:10:37 2011
@@ -57,6 +57,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
 import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.shared.ldap.codec.controls.Cascade;
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaIT;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.SingletonCursor;
@@ -68,7 +69,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.DnUtils;
 import org.apache.directory.shared.util.exception.MultiException;
 import org.apache.directory.shared.util.exception.NotImplementedException;
-import org.apache.directory.shared.ldap.codec.controls.CascadeControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.SyncRequestValueControl;
@@ -176,7 +176,7 @@ public class DefaultPartitionNexus exten
         // Add the supported controls
         rootDSE.put( SchemaConstants.SUPPORTED_CONTROL_AT, PersistentSearchControl.CONTROL_OID,
             EntryChangeControl.CONTROL_OID, SubentriesControl.CONTROL_OID, ManageDsaIT.OID,
-            CascadeControl.CONTROL_OID, PagedResultsControl.CONTROL_OID,
+            Cascade.OID, PagedResultsControl.CONTROL_OID,
             // Replication controls
             SyncDoneValueControl.CONTROL_OID, SyncInfoValueControl.CONTROL_OID, SyncRequestValueControl.CONTROL_OID,
             SyncStateValueControl.CONTROL_OID );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=1063583&r1=1063582&r2=1063583&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Wed Jan 26 03:10:37 2011
@@ -50,7 +50,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.SearchingOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.controls.CascadeControl;
+import org.apache.directory.shared.ldap.codec.controls.Cascade;
 import org.apache.directory.shared.ldap.model.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.EmptyCursor;
@@ -1227,7 +1227,7 @@ public class SchemaInterceptor extends B
 
             // Now that the entry has been modified, update the SSSE
             schemaSubEntryManager.modifySchemaSubentry( modifyContext, modifyContext
-                .hasRequestControl( CascadeControl.CONTROL_OID ) );
+                .hasRequestControl( Cascade.OID ) );
 
             return;
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=1063583&r1=1063582&r2=1063583&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
Wed Jan 26 03:10:37 2011
@@ -60,7 +60,7 @@ 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.CascadeControl;
+import org.apache.directory.shared.ldap.codec.controls.Cascade;
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaIT;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueControl;
@@ -239,7 +239,7 @@ public class LdapServer extends Director
         this.supportedControls.add( EntryChangeControl.CONTROL_OID );
         this.supportedControls.add( SubentriesControl.CONTROL_OID );
         this.supportedControls.add( ManageDsaIT.OID );
-        this.supportedControls.add( CascadeControl.CONTROL_OID );
+        this.supportedControls.add( Cascade.OID );
         this.supportedControls.add( PagedResultsControl.CONTROL_OID );
         // Replication controls
         this.supportedControls.add( SyncDoneValueControl.CONTROL_OID );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java?rev=1063583&r1=1063582&r2=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
Wed Jan 26 03:10:37 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
-import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.MessageDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.ModifyRequestDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.SearchRequestDecorator;
@@ -72,7 +72,7 @@ public class LdapMessageContainer extend
     private int messageId;
 
     /** The current control */
-    private AbstractControl currentControl;
+    private ControlDecorator currentControl;
 
 
     /**
@@ -392,7 +392,7 @@ public class LdapMessageContainer extend
     /**
      * @return the current control being created
      */
-    public AbstractControl getCurrentControl()
+    public ControlDecorator getCurrentControl()
     {
         return currentControl;
     }
@@ -402,7 +402,7 @@ public class LdapMessageContainer extend
      * Store a newly created control
      * @param currentControl The control to store
      */
-    public void setCurrentControl( AbstractControl currentControl )
+    public void setCurrentControl( ControlDecorator currentControl )
     {
         this.currentControl = currentControl;
     }

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/BasicControlImpl.java
(from r1063574, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/DefaultControl.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/BasicControlImpl.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/BasicControlImpl.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/DefaultControl.java&r1=1063574&r2=1063583&rev=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/DefaultControl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/BasicControlImpl.java
Wed Jan 26 03:10:37 2011
@@ -29,7 +29,7 @@ import org.apache.directory.shared.util.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DefaultControl implements Control
+public class BasicControlImpl implements Control
 {
     /** The control type */
     private String oid;
@@ -46,7 +46,7 @@ public class DefaultControl implements C
      *
      * @param oid The OID of this Control.
      */
-    public DefaultControl( String oid )
+    public BasicControlImpl( String oid )
     {
         this.oid = oid;
     }

Propchange: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/BasicControlImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/Cascade.java
(from r1063551, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControl.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/Cascade.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/Cascade.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControl.java&r1=1063551&r2=1063583&rev=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/Cascade.java
Wed Jan 26 03:10:37 2011
@@ -25,44 +25,30 @@ package org.apache.directory.shared.ldap
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CascadeControl  extends AbstractControl
+public class Cascade extends BasicControlImpl
 {
-    /** The cascade control OID */
-    public static final String CONTROL_OID = "1.3.6.1.4.1.18060.0.0.1";
+    /** The Cascade control OID */
+    public static final String OID = "1.3.6.1.4.1.18060.0.0.1";
+
+    public static final Cascade INSTANCE = new Cascade();
+
 
     /**
      * Default constructor
-     *
      */
-    public CascadeControl()
+    private Cascade()
     {
-        super( CONTROL_OID );
-        
-        decoder = new CascadeControlDecoder();
+        super( OID );
     }
 
-    
-    /**
-     * Returns the default control length.
-     */
-    public int computeLength()
+
+    public void setValue( byte [] value )
     {
-        // Call the super class to compute the global control length
-        return super.computeLength( 0 );
     }
 
-    
-    /**
-     * Return a String representing this Cascade Control.
-     */
-    public String toString()
-    {
-        StringBuffer sb = new StringBuffer();
 
-        sb.append( "    Cascade Control\n" );
-        sb.append( "        oid : " ).append( getOid() ).append( '\n' );
-        sb.append( "        critical : " ).append( isCritical() ).append( '\n' );
-        
-        return sb.toString();
+    public boolean hasValue()
+    {
+        return false;
     }
 }

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecoder.java
(from r1063551, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControlDecoder.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecoder.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecoder.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControlDecoder.java&r1=1063551&r2=1063583&rev=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControlDecoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecoder.java
Wed Jan 26 03:10:37 2011
@@ -30,10 +30,10 @@ import org.apache.directory.shared.ldap.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CascadeControlDecoder implements ControlDecoder
+public class CascadeDecoder implements ControlDecoder
 {
     public Asn1Object decode( byte[] controlBytes, Control control ) throws DecoderException
     {
-        return new CascadeControl();
+        return new CascadeDecorator();
     }
 }

Propchange: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecoder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecorator.java
(from r1063551, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControl.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecorator.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecorator.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControl.java&r1=1063551&r2=1063583&rev=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeControl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecorator.java
Wed Jan 26 03:10:37 2011
@@ -25,20 +25,16 @@ package org.apache.directory.shared.ldap
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CascadeControl  extends AbstractControl
+public class CascadeDecorator extends ControlDecorator
 {
-    /** The cascade control OID */
-    public static final String CONTROL_OID = "1.3.6.1.4.1.18060.0.0.1";
+
 
     /**
      * Default constructor
-     *
      */
-    public CascadeControl()
+    public CascadeDecorator()
     {
-        super( CONTROL_OID );
-        
-        decoder = new CascadeControlDecoder();
+        super( Cascade.INSTANCE, new CascadeDecoder() );
     }
 
     
@@ -50,19 +46,4 @@ public class CascadeControl  extends Abs
         // Call the super class to compute the global control length
         return super.computeLength( 0 );
     }
-
-    
-    /**
-     * Return a String representing this Cascade Control.
-     */
-    public String toString()
-    {
-        StringBuffer sb = new StringBuffer();
-
-        sb.append( "    Cascade Control\n" );
-        sb.append( "        oid : " ).append( getOid() ).append( '\n' );
-        sb.append( "        critical : " ).append( isCritical() ).append( '\n' );
-        
-        return sb.toString();
-    }
 }

Propchange: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CascadeDecorator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlDecorator.java
(from r1063574, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlDecorator.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlDecorator.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java&r1=1063574&r2=1063583&rev=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/CodecControlDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlDecorator.java
Wed Jan 26 03:10:37 2011
@@ -40,7 +40,7 @@ import java.nio.ByteBuffer;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CodecControlDecorator extends AbstractAsn1Object implements Control, CodecControl
+public class ControlDecorator extends AbstractAsn1Object implements Control, CodecControl
 {
     /** The decorated Control */
     private final Control decorated;
@@ -52,7 +52,7 @@ public class CodecControlDecorator exten
     private int controlLength;
 
     /** The control decoder */
-    protected ControlDecoder decoder;
+    private ControlDecoder decoder;
 
 
     /**
@@ -60,7 +60,7 @@ public class CodecControlDecorator exten
      *
      * @param decoratedControl The Control to decorate.
      */
-    public CodecControlDecorator( Control decoratedControl )
+    public ControlDecorator( Control decoratedControl )
     {
         this.decorated = decoratedControl;
     }
@@ -72,7 +72,7 @@ public class CodecControlDecorator exten
      * @param decoratedControl The Control to decorate.
      * @param decoder The Control's decoder.
      */
-    public CodecControlDecorator( Control decoratedControl, ControlDecoder decoder )
+    public ControlDecorator( Control decoratedControl, ControlDecoder decoder )
     {
         this.decorated = decoratedControl;
         this.decoder = decoder;

Propchange: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlDecorator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlEnum.java?rev=1063583&r1=1063582&r2=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlEnum.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlEnum.java
Wed Jan 26 03:10:37 2011
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
  */
 public enum ControlEnum
 {
-    CASCADE_CONTROL( CascadeControl.CONTROL_OID ),
+    CASCADE_CONTROL( Cascade.OID ),
     ENTRY_CHANGE_CONTROL( EntryChangeControl.CONTROL_OID ),
     MANAGE_DSA_IT_CONTROL( ManageDsaIT.OID ),
     PAGED_RESULTS_CONTROL( PagedResultsControl.CONTROL_OID ),

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaIT.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaIT.java?rev=1063583&r1=1063582&r2=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaIT.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaIT.java
Wed Jan 26 03:10:37 2011
@@ -57,7 +57,7 @@ package org.apache.directory.shared.ldap
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ManageDsaIT extends DefaultControl
+public class ManageDsaIT extends BasicControlImpl
 {
     /** This control OID */
     public static final String OID = "2.16.840.1.113730.3.4.2";

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaITDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaITDecorator.java?rev=1063583&r1=1063582&r2=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaITDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ManageDsaITDecorator.java
Wed Jan 26 03:10:37 2011
@@ -57,19 +57,19 @@ package org.apache.directory.shared.ldap
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ManageDsaITDecorator extends CodecControlDecorator
+public class ManageDsaITDecorator extends ControlDecorator
 {
     // @TODO We should not bother encoding and decoding marker controls that always
     // encode and decode into the same TLV/byte sequence. Can't the control just
     // supply the canned PDU element?
 
+
     /**
      * Default constructor
      */
     public ManageDsaITDecorator()
     {
-        super( ManageDsaIT.INSTANCE );
-        decoder = new ManageDsaITDecoder();
+        super( ManageDsaIT.INSTANCE, new ManageDsaITDecoder() );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyRequestControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyRequestControl.java?rev=1063583&r1=1063582&r2=1063583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyRequestControl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyRequestControl.java
Wed Jan 26 03:10:37 2011
@@ -17,10 +17,10 @@
  *   under the License.
  *
  */
-
 package org.apache.directory.shared.ldap.codec.controls.ppolicy;
 
-import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
+
+import org.apache.directory.shared.ldap.codec.controls.ControlImpl;
 
 
 /**
@@ -28,7 +28,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PasswordPolicyRequestControl extends AbstractControl
+public class PasswordPolicyRequestControl extends ControlImpl
 {
     /** the password policy request control */
     public static final String CONTROL_OID = "1.3.6.1.4.1.42.2.27.8.5.1";
@@ -40,9 +40,8 @@ public class PasswordPolicyRequestContro
     }
 
 
-    @Override
     public int computeLength()
     {
-        return super.computeLength( 0 );
+        return 0;
     }
 }



Mime
View raw message