directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235364 [23/27] - in /directory/shared/trunk: asn1/api/src/main/java/org/apache/directory/shared/asn1/util/ asn1/api/src/test/java/org/apache/directory/shared/asn1/util/ asn1/ber/src/main/java/org/apache/directory/shared/asn1/actions/ asn1...
Date Tue, 24 Jan 2012 17:27:12 GMT
Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueGrammar.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueGrammar.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueGrammar.java Tue Jan 24 17:27:00 2012
@@ -101,9 +101,10 @@ public final class SyncStateValueGrammar
          *     
          * Stores the sync state type value
          */
-        super.transitions[SyncStateValueStatesEnum.SYNC_STATE_VALUE_SEQUENCE_STATE.ordinal()][UniversalTag.ENUMERATED.getValue()] = new GrammarTransition(
+        super.transitions[SyncStateValueStatesEnum.SYNC_STATE_VALUE_SEQUENCE_STATE.ordinal()][UniversalTag.ENUMERATED
+            .getValue()] = new GrammarTransition(
             SyncStateValueStatesEnum.SYNC_STATE_VALUE_SEQUENCE_STATE,
-            SyncStateValueStatesEnum.SYNC_TYPE_STATE, UniversalTag.ENUMERATED.getValue(), 
+            SyncStateValueStatesEnum.SYNC_TYPE_STATE, UniversalTag.ENUMERATED.getValue(),
             new GrammarAction<SyncStateValueContainer>( "Set SyncStateValueControl state type" )
             {
                 public void action( SyncStateValueContainer container ) throws DecoderException
@@ -113,8 +114,8 @@ public final class SyncStateValueGrammar
                     try
                     {
                         // Check that the value is into the allowed interval
-                        int syncStateType = IntegerDecoder.parse(value, SyncStateTypeEnum.PRESENT.getValue(),
-                                SyncStateTypeEnum.MODDN.getValue());
+                        int syncStateType = IntegerDecoder.parse( value, SyncStateTypeEnum.PRESENT.getValue(),
+                            SyncStateTypeEnum.MODDN.getValue() );
 
                         SyncStateTypeEnum syncStateTypeEnum = SyncStateTypeEnum.getSyncStateType( syncStateType );
 
@@ -148,7 +149,7 @@ public final class SyncStateValueGrammar
          */
         super.transitions[SyncStateValueStatesEnum.SYNC_TYPE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             SyncStateValueStatesEnum.SYNC_TYPE_STATE, SyncStateValueStatesEnum.SYNC_UUID_STATE,
-            UniversalTag.OCTET_STRING.getValue(), 
+            UniversalTag.OCTET_STRING.getValue(),
             new GrammarAction<SyncStateValueContainer>( "Set SyncStateValueControl entryUUID" )
             {
                 public void action( SyncStateValueContainer container ) throws DecoderException
@@ -159,7 +160,7 @@ public final class SyncStateValueGrammar
 
                     if ( IS_DEBUG )
                     {
-                        LOG.debug( "entryUUID = {}", Strings.dumpBytes(entryUUID) );
+                        LOG.debug( "entryUUID = {}", Strings.dumpBytes( entryUUID ) );
                     }
 
                     container.getSyncStateValueControl().setEntryUUID( entryUUID );
@@ -180,7 +181,7 @@ public final class SyncStateValueGrammar
          */
         super.transitions[SyncStateValueStatesEnum.SYNC_UUID_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             SyncStateValueStatesEnum.SYNC_UUID_STATE, SyncStateValueStatesEnum.COOKIE_STATE,
-            UniversalTag.OCTET_STRING.getValue(), 
+            UniversalTag.OCTET_STRING.getValue(),
             new GrammarAction<SyncStateValueContainer>( "Set SyncStateValueControl cookie value" )
             {
                 public void action( SyncStateValueContainer container ) throws DecoderException

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueStatesEnum.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueStatesEnum.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueStatesEnum.java Tue Jan 24 17:27:00 2012
@@ -49,7 +49,7 @@ public enum SyncStateValueStatesEnum imp
 
     /** sync state type Value */
     SYNC_TYPE_STATE,
-    
+
     /** syncUUID Value */
     SYNC_UUID_STATE,
 
@@ -99,7 +99,7 @@ public enum SyncStateValueStatesEnum imp
         return ( ( state == END_STATE.ordinal() ) ? "SYNC_STATE_VALUE_END_STATE" : this.name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -107,8 +107,8 @@ public enum SyncStateValueStatesEnum imp
     {
         return this == END_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/Cancel.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/Cancel.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/Cancel.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/Cancel.java Tue Jan 24 17:27:00 2012
@@ -46,10 +46,11 @@ public class Cancel extends AbstractAsn1
 {
     /** The Id of the the message to cancel */
     private int cancelId;
-    
+
     /** Length of the sequence */
     private int cancelSequenceLength;
 
+
     /**
      * Create a Cancel object, with a messageId
      * 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelFactory.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelFactory.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelFactory.java Tue Jan 24 17:27:00 2012
@@ -42,14 +42,14 @@ import org.apache.directory.shared.ldap.
 public class CancelFactory implements ExtendedRequestFactory<CancelRequest, CancelResponse>
 {
     private LdapApiService codec;
-    
-    
+
+
     public CancelFactory( LdapApiService codec )
     {
         this.codec = codec;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -58,7 +58,7 @@ public class CancelFactory implements Ex
         return CancelRequest.EXTENSION_OID;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -99,7 +99,7 @@ public class CancelFactory implements Ex
         {
             return ( CancelRequestDecorator ) modelRequest;
         }
-        
+
         return new CancelRequestDecorator( codec, ( CancelRequest ) modelRequest );
     }
 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelGrammar.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelGrammar.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelGrammar.java Tue Jan 24 17:27:00 2012
@@ -65,7 +65,8 @@ public final class CancelGrammar extends
     /**
      * Creates a new GracefulDisconnectGrammar object.
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @SuppressWarnings(
+        { "unchecked", "rawtypes" })
     private CancelGrammar()
     {
         setName( CancelGrammar.class.getName() );
@@ -80,19 +81,19 @@ public final class CancelGrammar extends
          * 
          * Creates the Cancel object
          */
-        super.transitions[CancelStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = 
+        super.transitions[CancelStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
             new GrammarTransition<CancelContainer>( CancelStatesEnum.START_STATE,
-                                    CancelStatesEnum.CANCEL_SEQUENCE_STATE, 
-                                    UniversalTag.SEQUENCE.getValue(),
+                CancelStatesEnum.CANCEL_SEQUENCE_STATE,
+                UniversalTag.SEQUENCE.getValue(),
                 new GrammarAction( "Init Cancel" )
-            {
-                public void action( Asn1Container container )
                 {
-                    CancelContainer cancelContainer = ( CancelContainer ) container;
-                    Cancel cancel = new Cancel();
-                    cancelContainer.setCancel( cancel );
-                }
-            } );
+                    public void action( Asn1Container container )
+                    {
+                        CancelContainer cancelContainer = ( CancelContainer ) container;
+                        Cancel cancel = new Cancel();
+                        cancelContainer.setCancel( cancel );
+                    }
+                } );
 
         /**
          * Transition from cancel SEQ to cancelId
@@ -103,37 +104,37 @@ public final class CancelGrammar extends
          *     
          * Set the cancelId value into the Cancel object.    
          */
-        super.transitions[CancelStatesEnum.CANCEL_SEQUENCE_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = 
+        super.transitions[CancelStatesEnum.CANCEL_SEQUENCE_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
             new GrammarTransition<CancelContainer>( CancelStatesEnum.CANCEL_SEQUENCE_STATE,
-                                    CancelStatesEnum.CANCEL_ID_STATE, 
-                                    UniversalTag.INTEGER.getValue(), 
+                CancelStatesEnum.CANCEL_ID_STATE,
+                UniversalTag.INTEGER.getValue(),
                 new GrammarAction( "Stores CancelId" )
-            {
-                public void action( Asn1Container container ) throws DecoderException
                 {
-                    CancelContainer cancelContainer = ( CancelContainer ) container;
-                    Value value = cancelContainer.getCurrentTLV().getValue();
-    
-                    try
+                    public void action( Asn1Container container ) throws DecoderException
                     {
-                        int cancelId = IntegerDecoder.parse( value, 0, Integer.MAX_VALUE );
-        
-                        if ( IS_DEBUG )
+                        CancelContainer cancelContainer = ( CancelContainer ) container;
+                        Value value = cancelContainer.getCurrentTLV().getValue();
+
+                        try
                         {
-                            LOG.debug( "CancelId = " + cancelId );
+                            int cancelId = IntegerDecoder.parse( value, 0, Integer.MAX_VALUE );
+
+                            if ( IS_DEBUG )
+                            {
+                                LOG.debug( "CancelId = " + cancelId );
+                            }
+
+                            cancelContainer.getCancel().setCancelId( cancelId );
+                            cancelContainer.setGrammarEndAllowed( true );
+                        }
+                        catch ( IntegerDecoderException e )
+                        {
+                            String msg = I18n.err( I18n.ERR_04031, Strings.dumpBytes( value.getData() ) );
+                            LOG.error( msg );
+                            throw new DecoderException( msg );
                         }
-        
-                        cancelContainer.getCancel().setCancelId( cancelId );
-                        cancelContainer.setGrammarEndAllowed( true );
-                    }
-                    catch ( IntegerDecoderException e )
-                    {
-                        String msg = I18n.err( I18n.ERR_04031, Strings.dumpBytes(value.getData()) );
-                        LOG.error( msg );
-                        throw new DecoderException( msg );
                     }
-                }
-            });
+                } );
     }
 
 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelRequestDecorator.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelRequestDecorator.java Tue Jan 24 17:27:00 2012
@@ -36,11 +36,12 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CancelRequestDecorator extends ExtendedRequestDecorator<CancelRequest,CancelResponse> implements CancelRequest
+public class CancelRequestDecorator extends ExtendedRequestDecorator<CancelRequest, CancelResponse> implements
+    CancelRequest
 {
     private static final Logger LOG = LoggerFactory.getLogger( CancelRequestDecorator.class );
-    
-    
+
+
     public CancelRequestDecorator( LdapApiService codec, CancelRequest decoratedMessage )
     {
         super( codec, decoratedMessage );
@@ -59,12 +60,12 @@ public class CancelRequestDecorator exte
         {
             return;
         }
-        
+
         this.requestValue = null;
         getDecorated().setCancelId( cancelId );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -77,7 +78,7 @@ public class CancelRequestDecorator exte
             {
                 Cancel cancel = new Cancel();
                 cancel.setCancelId( getDecorated().getCancelId() );
-    
+
                 requestValue = cancel.encode().array();
             }
             catch ( EncoderException e )
@@ -86,11 +87,11 @@ public class CancelRequestDecorator exte
                 throw new RuntimeException( e );
             }
         }
-    
+
         return requestValue;
     }
 
-    
+
     /**
      * Sets the extended request's <b>requestValue</b> portion of the PDU.
      *
@@ -100,11 +101,11 @@ public class CancelRequestDecorator exte
     public void setRequestValue( byte[] requestValue )
     {
         CancelDecoder decoder = new CancelDecoder();
-    
+
         try
         {
             Cancel cancel = ( Cancel ) decoder.decode( requestValue );
-    
+
             if ( requestValue != null )
             {
                 this.requestValue = new byte[requestValue.length];
@@ -114,7 +115,7 @@ public class CancelRequestDecorator exte
             {
                 this.requestValue = null;
             }
-            
+
             getDecorated().setCancelId( cancel.getCancelId() );
         }
         catch ( DecoderException e )

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelStatesEnum.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelStatesEnum.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/cancel/CancelStatesEnum.java Tue Jan 24 17:27:00 2012
@@ -88,7 +88,7 @@ public enum CancelStatesEnum implements 
         return ( ( state == END_STATE.ordinal() ) ? "CANCEL_END_STATE" : this.name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -96,8 +96,8 @@ public enum CancelStatesEnum implements 
     {
         return this == END_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationFactory.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationFactory.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationFactory.java Tue Jan 24 17:27:00 2012
@@ -39,18 +39,18 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CertGenerationFactory 
+public class CertGenerationFactory
     implements ExtendedRequestFactory<CertGenerationRequest, CertGenerationResponse>
 {
     private LdapApiService codec;
-    
-    
+
+
     public CertGenerationFactory( LdapApiService codec )
     {
         this.codec = codec;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -59,7 +59,7 @@ public class CertGenerationFactory 
         return CertGenerationRequest.EXTENSION_OID;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -74,7 +74,8 @@ public class CertGenerationFactory 
      */
     public CertGenerationResponse newResponse( byte[] encodedValue ) throws DecoderException
     {
-        CertGenerationResponseDecorator response = new CertGenerationResponseDecorator( codec, new CertGenerationResponseImpl() );
+        CertGenerationResponseDecorator response = new CertGenerationResponseDecorator( codec,
+            new CertGenerationResponseImpl() );
         response.setResponseValue( encodedValue );
         return response;
     }
@@ -94,7 +95,8 @@ public class CertGenerationFactory 
     /**
      * {@inheritDoc}
      */
-    public ExtendedRequestDecorator<CertGenerationRequest, CertGenerationResponse> decorate( ExtendedRequest<?> modelRequest )
+    public ExtendedRequestDecorator<CertGenerationRequest, CertGenerationResponse> decorate(
+        ExtendedRequest<?> modelRequest )
     {
         if ( modelRequest instanceof CertGenerationRequestDecorator )
         {

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationGrammar.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationGrammar.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationGrammar.java Tue Jan 24 17:27:00 2012
@@ -83,18 +83,19 @@ public class CertGenerationGrammar exten
          *     
          * Creates the CertGenerationObject object
          */
-        super.transitions[CertGenerationStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = 
+        super.transitions[CertGenerationStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
             new GrammarTransition<CertGenerationContainer>(
-            CertGenerationStatesEnum.START_STATE, CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE,
-            UniversalTag.SEQUENCE.getValue(), new GrammarAction<CertGenerationContainer>( "Init CertGenerationObject" )
-            {
-                public void action( CertGenerationContainer container )
+                CertGenerationStatesEnum.START_STATE, CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE,
+                UniversalTag.SEQUENCE.getValue(), new GrammarAction<CertGenerationContainer>(
+                    "Init CertGenerationObject" )
                 {
-                    CertGenerationRequestDecorator certGenerationObject = new CertGenerationRequestDecorator( 
-                        LdapApiServiceFactory.getSingleton(), new CertGenerationRequestImpl() );
-                    container.setCertGenerationObject( certGenerationObject );
-                }
-            } );
+                    public void action( CertGenerationContainer container )
+                    {
+                        CertGenerationRequestDecorator certGenerationObject = new CertGenerationRequestDecorator(
+                            LdapApiServiceFactory.getSingleton(), new CertGenerationRequestImpl() );
+                        container.setCertGenerationObject( certGenerationObject );
+                    }
+                } );
 
         /**
          * Transition from certificate generation request to targetDN
@@ -105,41 +106,43 @@ public class CertGenerationGrammar exten
          *     
          * Set the targetDN value into the CertGenerationObject instance.
          */
-        super.transitions[CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
-            new GrammarTransition<CertGenerationContainer>( CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE, 
-                CertGenerationStatesEnum.TARGETDN_STATE, UniversalTag.OCTET_STRING.getValue(), 
+        super.transitions[CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE.ordinal()][UniversalTag.OCTET_STRING
+            .getValue()] =
+            new GrammarTransition<CertGenerationContainer>(
+                CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE,
+                CertGenerationStatesEnum.TARGETDN_STATE, UniversalTag.OCTET_STRING.getValue(),
                 new GrammarAction<CertGenerationContainer>( "Set Cert Generation target Dn value" )
-            {
-                public void action( CertGenerationContainer container ) throws DecoderException
                 {
-                    Value value = container.getCurrentTLV().getValue();
+                    public void action( CertGenerationContainer container ) throws DecoderException
+                    {
+                        Value value = container.getCurrentTLV().getValue();
 
-                    String targetDN = Strings.utf8ToString(value.getData());
+                        String targetDN = Strings.utf8ToString( value.getData() );
 
-                    if ( IS_DEBUG )
-                    {
-                        LOG.debug( "Target Dn = " + targetDN );
-                    }
+                        if ( IS_DEBUG )
+                        {
+                            LOG.debug( "Target Dn = " + targetDN );
+                        }
 
-                    if ( ( targetDN != null ) && ( targetDN.trim().length() > 0 ) )
-                    {
-                        if( !Dn.isValid(targetDN) )
+                        if ( ( targetDN != null ) && ( targetDN.trim().length() > 0 ) )
+                        {
+                            if ( !Dn.isValid( targetDN ) )
+                            {
+                                String msg = I18n.err( I18n.ERR_04032, targetDN );
+                                LOG.error( msg );
+                                throw new DecoderException( msg );
+                            }
+
+                            container.getCertGenerationObject().setTargetDN( targetDN );
+                        }
+                        else
                         {
-                            String msg = I18n.err( I18n.ERR_04032, targetDN );
+                            String msg = I18n.err( I18n.ERR_04033, Strings.dumpBytes( value.getData() ) );
                             LOG.error( msg );
                             throw new DecoderException( msg );
                         }
-                        
-                        container.getCertGenerationObject().setTargetDN( targetDN );
                     }
-                    else
-                    {
-                        String msg = I18n.err( I18n.ERR_04033, Strings.dumpBytes(value.getData()) );
-                        LOG.error( msg );
-                        throw new DecoderException( msg );
-                    }
-                }
-            } );
+                } );
 
         /**
          * Transition from targetDN state to issuerDN
@@ -151,35 +154,35 @@ public class CertGenerationGrammar exten
          *     
          * Set the issuerDN value into the CertGenerationObject instance.
          */
-        super.transitions[CertGenerationStatesEnum.TARGETDN_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
-            new GrammarTransition<CertGenerationContainer>( CertGenerationStatesEnum.TARGETDN_STATE, 
+        super.transitions[CertGenerationStatesEnum.TARGETDN_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] =
+            new GrammarTransition<CertGenerationContainer>( CertGenerationStatesEnum.TARGETDN_STATE,
                 CertGenerationStatesEnum.ISSUER_STATE, UniversalTag.OCTET_STRING.getValue(),
                 new GrammarAction<CertGenerationContainer>( "Set Cert Generation issuer Dn value" )
-            {
-                public void action( CertGenerationContainer container ) throws DecoderException
                 {
-                    Value value = container.getCurrentTLV().getValue();
+                    public void action( CertGenerationContainer container ) throws DecoderException
+                    {
+                        Value value = container.getCurrentTLV().getValue();
 
-                    String issuerDN = Strings.utf8ToString(value.getData());
+                        String issuerDN = Strings.utf8ToString( value.getData() );
 
-                    if ( IS_DEBUG )
-                    {
-                        LOG.debug( "Issuer Dn = " + issuerDN );
-                    }
+                        if ( IS_DEBUG )
+                        {
+                            LOG.debug( "Issuer Dn = " + issuerDN );
+                        }
 
-                    if ( ( issuerDN != null ) && ( issuerDN.trim().length() > 0 ) )
-                    {
-                        if( !Dn.isValid(issuerDN) )
+                        if ( ( issuerDN != null ) && ( issuerDN.trim().length() > 0 ) )
                         {
-                            String msg = I18n.err( I18n.ERR_04034, issuerDN );
-                            LOG.error( msg );
-                            throw new DecoderException( msg );
+                            if ( !Dn.isValid( issuerDN ) )
+                            {
+                                String msg = I18n.err( I18n.ERR_04034, issuerDN );
+                                LOG.error( msg );
+                                throw new DecoderException( msg );
+                            }
+
+                            container.getCertGenerationObject().setIssuerDN( issuerDN );
                         }
-                        
-                        container.getCertGenerationObject().setIssuerDN( issuerDN );
                     }
-                }
-            } );
+                } );
 
         /**
          * Transition from issuerDN state to subjectDN
@@ -191,41 +194,41 @@ public class CertGenerationGrammar exten
          *     
          * Set the subjectDN value into the CertGenerationObject instance.
          */
-        super.transitions[CertGenerationStatesEnum.ISSUER_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
-            new GrammarTransition<CertGenerationContainer>( CertGenerationStatesEnum.ISSUER_STATE, 
+        super.transitions[CertGenerationStatesEnum.ISSUER_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] =
+            new GrammarTransition<CertGenerationContainer>( CertGenerationStatesEnum.ISSUER_STATE,
                 CertGenerationStatesEnum.SUBJECT_STATE, UniversalTag.OCTET_STRING.getValue(),
-            new GrammarAction<CertGenerationContainer>( "Set Cert Generation subject Dn value" )
-            {
-                public void action( CertGenerationContainer container ) throws DecoderException
+                new GrammarAction<CertGenerationContainer>( "Set Cert Generation subject Dn value" )
                 {
-                    Value value = container.getCurrentTLV().getValue();
+                    public void action( CertGenerationContainer container ) throws DecoderException
+                    {
+                        Value value = container.getCurrentTLV().getValue();
 
-                    String subjectDN = Strings.utf8ToString(value.getData());
+                        String subjectDN = Strings.utf8ToString( value.getData() );
 
-                    if ( IS_DEBUG )
-                    {
-                        LOG.debug( "subject Dn = " + subjectDN );
-                    }
+                        if ( IS_DEBUG )
+                        {
+                            LOG.debug( "subject Dn = " + subjectDN );
+                        }
 
-                    if ( ( subjectDN != null ) && ( subjectDN.trim().length() > 0 ) )
-                    {
-                        if( !Dn.isValid(subjectDN) )
+                        if ( ( subjectDN != null ) && ( subjectDN.trim().length() > 0 ) )
                         {
-                            String msg = I18n.err( I18n.ERR_04035, subjectDN );
+                            if ( !Dn.isValid( subjectDN ) )
+                            {
+                                String msg = I18n.err( I18n.ERR_04035, subjectDN );
+                                LOG.error( msg );
+                                throw new DecoderException( msg );
+                            }
+
+                            container.getCertGenerationObject().setSubjectDN( subjectDN );
+                        }
+                        else
+                        {
+                            String msg = I18n.err( I18n.ERR_04033, Strings.dumpBytes( value.getData() ) );
                             LOG.error( msg );
                             throw new DecoderException( msg );
                         }
-
-                        container.getCertGenerationObject().setSubjectDN( subjectDN );
-                    }
-                    else
-                    {
-                        String msg = I18n.err( I18n.ERR_04033, Strings.dumpBytes(value.getData()) );
-                        LOG.error( msg );
-                        throw new DecoderException( msg );
                     }
-                }
-            } );
+                } );
 
         /**
          * Transition from subjectDN state to keyAlgo
@@ -236,31 +239,31 @@ public class CertGenerationGrammar exten
          *     
          * Set the key algorithm value into the CertGenerationObject instance.
          */
-        super.transitions[CertGenerationStatesEnum.SUBJECT_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
-            new GrammarTransition<CertGenerationContainer>( CertGenerationStatesEnum.SUBJECT_STATE, 
+        super.transitions[CertGenerationStatesEnum.SUBJECT_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] =
+            new GrammarTransition<CertGenerationContainer>( CertGenerationStatesEnum.SUBJECT_STATE,
                 CertGenerationStatesEnum.KEY_ALGORITHM_STATE,
-                UniversalTag.OCTET_STRING.getValue(), 
+                UniversalTag.OCTET_STRING.getValue(),
                 new GrammarAction<CertGenerationContainer>( "Set Cert Generation key algorithm value" )
-            {
-                public void action( CertGenerationContainer container ) throws DecoderException
                 {
-                    Value value = container.getCurrentTLV().getValue();
+                    public void action( CertGenerationContainer container ) throws DecoderException
+                    {
+                        Value value = container.getCurrentTLV().getValue();
 
-                    String keyAlgorithm = Strings.utf8ToString(value.getData());
+                        String keyAlgorithm = Strings.utf8ToString( value.getData() );
 
-                    if ( IS_DEBUG )
-                    {
-                        LOG.debug( "key algorithm = " + keyAlgorithm );
-                    }
+                        if ( IS_DEBUG )
+                        {
+                            LOG.debug( "key algorithm = " + keyAlgorithm );
+                        }
 
-                    if ( keyAlgorithm != null && ( keyAlgorithm.trim().length() > 0 ) )
-                    {
-                        container.getCertGenerationObject().setKeyAlgorithm( keyAlgorithm );
-                    }
+                        if ( keyAlgorithm != null && ( keyAlgorithm.trim().length() > 0 ) )
+                        {
+                            container.getCertGenerationObject().setKeyAlgorithm( keyAlgorithm );
+                        }
 
-                    container.setGrammarEndAllowed( true );
-                }
-            } );
+                        container.setGrammarEndAllowed( true );
+                    }
+                } );
 
     }
 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationObject.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationObject.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationObject.java Tue Jan 24 17:27:00 2012
@@ -48,14 +48,13 @@ import org.apache.directory.shared.util.
 public class CertGenerationObject extends AbstractAsn1Object
 {
     private CertGenerationRequest request;
-    
-    
+
+
     public CertGenerationObject( CertGenerationRequest request )
     {
         this.request = request;
     }
-    
-    
+
     /** stores the length of the request*/
     private int requestLength = 0;
 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationRequestDecorator.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationRequestDecorator.java Tue Jan 24 17:27:00 2012
@@ -36,12 +36,11 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CertGenerationRequestDecorator 
-    extends ExtendedRequestDecorator<CertGenerationRequest,CertGenerationResponse> 
+public class CertGenerationRequestDecorator
+    extends ExtendedRequestDecorator<CertGenerationRequest, CertGenerationResponse>
     implements CertGenerationRequest
 {
     private static final Logger LOG = LoggerFactory.getLogger( CertGenerationRequestDecorator.class );
-    
 
     private CertGenerationObject certGenObj;
 
@@ -52,13 +51,13 @@ public class CertGenerationRequestDecora
         certGenObj = new CertGenerationObject( decoratedMessage );
     }
 
-    
+
     public CertGenerationObject getCertGenerationObject()
     {
         return certGenObj;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -127,7 +126,7 @@ public class CertGenerationRequestDecora
     {
         return getDecorated().getResultResponse();
     }
-    
+
 
     /**
      * {@inheritDoc}

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationResponseDecorator.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationResponseDecorator.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationResponseDecorator.java Tue Jan 24 17:27:00 2012
@@ -30,7 +30,8 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CertGenerationResponseDecorator extends ExtendedResponseDecorator<CertGenerationResponse> implements CertGenerationResponse
+public class CertGenerationResponseDecorator extends ExtendedResponseDecorator<CertGenerationResponse> implements
+    CertGenerationResponse
 {
     /**
      * Creates a new instance of CancelResponseDecorator.

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationStatesEnum.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationStatesEnum.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/certGeneration/CertGenerationStatesEnum.java Tue Jan 24 17:27:00 2012
@@ -23,6 +23,7 @@ package org.apache.directory.shared.ldap
 import org.apache.directory.shared.asn1.ber.grammar.Grammar;
 import org.apache.directory.shared.asn1.ber.grammar.States;
 
+
 /**
  * This class store the CertGeneration's grammar constants. It is also used
  * for debugging purposes.
@@ -67,7 +68,7 @@ public enum CertGenerationStatesEnum imp
         return "CERT_GENERATION_GRAMMER";
     }
 
-    
+
     /**
      * Get the grammar name
      * 
@@ -79,7 +80,7 @@ public enum CertGenerationStatesEnum imp
         return "CERT_GENERATION_GRAMMER";
     }
 
-    
+
     /**
      * Get the string representing the state
      * 
@@ -91,7 +92,7 @@ public enum CertGenerationStatesEnum imp
         return ( ( state == END_STATE.ordinal() ) ? "CERT_GENERATION_END_STATE" : this.name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -99,8 +100,8 @@ public enum CertGenerationStatesEnum imp
     {
         return this == END_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnect.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnect.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnect.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnect.java Tue Jan 24 17:27:00 2012
@@ -131,7 +131,7 @@ public class GracefulDisconnect extends 
             replicatedContextsLength = 0;
 
             // We may have more than one reference.
-            for ( LdapUrl replicatedContext:replicatedContexts )
+            for ( LdapUrl replicatedContext : replicatedContexts )
             {
                 int ldapUrlLength = replicatedContext.getNbBytes();
                 replicatedContextsLength += 1 + TLV.getNbBytes( ldapUrlLength ) + ldapUrlLength;
@@ -177,7 +177,7 @@ public class GracefulDisconnect extends 
             bb.put( TLV.getBytes( replicatedContextsLength ) );
 
             // We may have more than one reference.
-            for ( LdapUrl replicatedContext:replicatedContexts )
+            for ( LdapUrl replicatedContext : replicatedContexts )
             {
                 Value.encode( bb, replicatedContext.getBytesReference() );
             }
@@ -198,12 +198,12 @@ public class GracefulDisconnect extends 
         sb.append( "    TimeOffline : " ).append( timeOffline ).append( '\n' );
         sb.append( "    Delay : " ).append( delay ).append( '\n' );
 
-        if ( ( replicatedContexts != null) && ( replicatedContexts.size() != 0 ) )
+        if ( ( replicatedContexts != null ) && ( replicatedContexts.size() != 0 ) )
         {
             sb.append( "    Replicated contexts :" );
 
             // We may have more than one reference.
-            for ( LdapUrl url:replicatedContexts )
+            for ( LdapUrl url : replicatedContexts )
             {
                 sb.append( "\n        " ).append( url );
             }

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectFactory.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectFactory.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectFactory.java Tue Jan 24 17:27:00 2012
@@ -39,14 +39,14 @@ import org.apache.directory.shared.ldap.
 public class GracefulDisconnectFactory implements UnsolicitedResponseFactory<GracefulDisconnectResponse>
 {
     private LdapApiService codec;
-    
-    
+
+
     public GracefulDisconnectFactory( LdapApiService codec )
     {
         this.codec = codec;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -55,7 +55,7 @@ public class GracefulDisconnectFactory i
         return GracefulDisconnectResponse.EXTENSION_OID;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectGrammar.java Tue Jan 24 17:27:00 2012
@@ -68,109 +68,108 @@ public final class GracefulDisconnectGra
     /** The instance of grammar. GracefulDisconnectnGrammar is a singleton */
     private static GracefulDisconnectGrammar instance = new GracefulDisconnectGrammar();
 
-
     /**
      * The action used to store a Time Offline.
      */
-    private GrammarAction<GracefulDisconnectContainer> storeDelay = 
+    private GrammarAction<GracefulDisconnectContainer> storeDelay =
         new GrammarAction<GracefulDisconnectContainer>( "Set Graceful Disconnect Delay" )
-    {
-        public void action( GracefulDisconnectContainer container ) throws DecoderException
         {
-            Value value = container.getCurrentTLV().getValue();
-    
-            try
+            public void action( GracefulDisconnectContainer container ) throws DecoderException
             {
-                int delay = IntegerDecoder.parse( value, 0, 86400 );
-    
-                if ( IS_DEBUG )
+                Value value = container.getCurrentTLV().getValue();
+
+                try
                 {
-                    LOG.debug( "Delay = " + delay );
+                    int delay = IntegerDecoder.parse( value, 0, 86400 );
+
+                    if ( IS_DEBUG )
+                    {
+                        LOG.debug( "Delay = " + delay );
+                    }
+
+                    container.getGracefulDisconnect().setDelay( delay );
+                    container.setGrammarEndAllowed( true );
+                }
+                catch ( IntegerDecoderException e )
+                {
+                    String msg = I18n.err( I18n.ERR_04036, Strings.dumpBytes( value.getData() ) );
+                    LOG.error( msg );
+                    throw new DecoderException( msg );
                 }
-    
-                container.getGracefulDisconnect().setDelay( delay );
-                container.setGrammarEndAllowed( true );
-            }
-            catch ( IntegerDecoderException e )
-            {
-                String msg = I18n.err( I18n.ERR_04036, Strings.dumpBytes(value.getData()) );
-                LOG.error( msg );
-                throw new DecoderException( msg );
             }
-        }
-    };
-    
+        };
+
     /**
      * The action used to store a referral.
      */
-    private GrammarAction<GracefulDisconnectContainer> storeReferral = 
+    private GrammarAction<GracefulDisconnectContainer> storeReferral =
         new GrammarAction<GracefulDisconnectContainer>( "Stores a referral" )
-    {
-        public void action( GracefulDisconnectContainer container ) throws DecoderException
         {
-            Value value = container.getCurrentTLV().getValue();
-
-            try
+            public void action( GracefulDisconnectContainer container ) throws DecoderException
             {
-                if ( Strings.isEmpty( value.getData() ) )
+                Value value = container.getCurrentTLV().getValue();
+
+                try
                 {
-                    String msg = "failed to decode a null URL";
-                    LOG.error( msg );
-                    throw new DecoderException( msg );
+                    if ( Strings.isEmpty( value.getData() ) )
+                    {
+                        String msg = "failed to decode a null URL";
+                        LOG.error( msg );
+                        throw new DecoderException( msg );
+                    }
+
+                    String url = Strings.utf8ToString( value.getData() );
+
+                    LdapUrl ldapUrl = new LdapUrl( url );
+                    container.getGracefulDisconnect().addReplicatedContexts( ldapUrl );
+                    container.setGrammarEndAllowed( true );
+
+                    if ( IS_DEBUG )
+                    {
+                        LOG.debug( "Stores a referral : {}", ldapUrl );
+                    }
                 }
-                
-                String url = Strings.utf8ToString( value.getData() );
-                
-                LdapUrl ldapUrl = new LdapUrl( url );
-                container.getGracefulDisconnect().addReplicatedContexts( ldapUrl );
-                container.setGrammarEndAllowed( true );
-                
-                if ( IS_DEBUG )
+                catch ( LdapURLEncodingException e )
                 {
-                    LOG.debug( "Stores a referral : {}", ldapUrl );
+                    String msg = "failed to decode the URL '" + Strings.dumpBytes( value.getData() ) + "'";
+                    LOG.error( msg );
+                    throw new DecoderException( msg );
                 }
             }
-            catch ( LdapURLEncodingException e )
-            {
-                String msg = "failed to decode the URL '" + Strings.dumpBytes(value.getData()) + "'";
-                LOG.error( msg );
-                throw new DecoderException( msg );
-            }
-        }
-    };
-    
+        };
+
     /**
      * The action used to store a Time Offline.
      */
-    private GrammarAction<GracefulDisconnectContainer> storeTimeOffline = 
+    private GrammarAction<GracefulDisconnectContainer> storeTimeOffline =
         new GrammarAction<GracefulDisconnectContainer>( "Set Graceful Disconnect time offline" )
-    {
-        public void action( GracefulDisconnectContainer container ) throws DecoderException
         {
-            Value value = container.getCurrentTLV().getValue();
-
-            try
+            public void action( GracefulDisconnectContainer container ) throws DecoderException
             {
-                int timeOffline = IntegerDecoder.parse( value, 0, 720 );
+                Value value = container.getCurrentTLV().getValue();
 
-                if ( IS_DEBUG )
+                try
                 {
-                    LOG.debug( "Time Offline = " + timeOffline );
-                }
+                    int timeOffline = IntegerDecoder.parse( value, 0, 720 );
 
-                container.getGracefulDisconnect().setTimeOffline( timeOffline );
-                container.setGrammarEndAllowed( true );
-            }
-            catch ( IntegerDecoderException e )
-            {
-                String msg = I18n.err( I18n.ERR_04037, Strings.dumpBytes(value.getData()) );
-                LOG.error( msg );
-                throw new DecoderException( msg );
+                    if ( IS_DEBUG )
+                    {
+                        LOG.debug( "Time Offline = " + timeOffline );
+                    }
+
+                    container.getGracefulDisconnect().setTimeOffline( timeOffline );
+                    container.setGrammarEndAllowed( true );
+                }
+                catch ( IntegerDecoderException e )
+                {
+                    String msg = I18n.err( I18n.ERR_04037, Strings.dumpBytes( value.getData() ) );
+                    LOG.error( msg );
+                    throw new DecoderException( msg );
+                }
             }
-        }
-    };
+        };
+
 
-    
     /**
      * Creates a new GracefulDisconnectGrammar object.
      */
@@ -189,19 +188,19 @@ public final class GracefulDisconnectGra
          * 
          * Creates the GracefulDisconnect object
          */
-        super.transitions[GracefulDisconnectStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = 
+        super.transitions[GracefulDisconnectStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
             new GrammarTransition<GracefulDisconnectContainer>( GracefulDisconnectStatesEnum.START_STATE,
-                                    GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE, 
-                                    UniversalTag.SEQUENCE.getValue(),
+                GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE,
+                UniversalTag.SEQUENCE.getValue(),
                 new GrammarAction<GracefulDisconnectContainer>( "Init Graceful Disconnect" )
-            {
-                public void action( GracefulDisconnectContainer container )
                 {
-                    GracefulDisconnect gracefulDisconnect = new GracefulDisconnect();
-                    container.setGracefulDisconnect( gracefulDisconnect );
-                    container.setGrammarEndAllowed( true );
-                }
-            } );
+                    public void action( GracefulDisconnectContainer container )
+                    {
+                        GracefulDisconnect gracefulDisconnect = new GracefulDisconnect();
+                        container.setGracefulDisconnect( gracefulDisconnect );
+                        container.setGrammarEndAllowed( true );
+                    }
+                } );
 
         /**
          * Transition from graceful disconnect to time offline
@@ -212,12 +211,13 @@ public final class GracefulDisconnectGra
          *     
          * Set the time offline value into the GracefulDisconnect object.    
          */
-        super.transitions[GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = 
-            new GrammarTransition<GracefulDisconnectContainer>( 
+        super.transitions[GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE.ordinal()][UniversalTag.INTEGER
+            .getValue()] =
+            new GrammarTransition<GracefulDisconnectContainer>(
                 GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE,
-                GracefulDisconnectStatesEnum.TIME_OFFLINE_STATE, 
+                GracefulDisconnectStatesEnum.TIME_OFFLINE_STATE,
                 UniversalTag.INTEGER.getValue(), storeTimeOffline );
-        
+
         /**
          * Transition from graceful disconnect to delay
          * 
@@ -228,14 +228,13 @@ public final class GracefulDisconnectGra
          *     
          * Set the delay value into the GracefulDisconnect object.    
          */
-        super.transitions[GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE.ordinal()]
-                         [GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG] = 
-            new GrammarTransition<GracefulDisconnectContainer>( 
+        super.transitions[GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE.ordinal()][GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG] =
+            new GrammarTransition<GracefulDisconnectContainer>(
                 GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE,
-                GracefulDisconnectStatesEnum.DELAY_STATE, 
-                GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG, 
+                GracefulDisconnectStatesEnum.DELAY_STATE,
+                GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG,
                 storeDelay );
-        
+
         /**
          * Transition from graceful disconnect to replicated Contexts
          * 
@@ -247,11 +246,13 @@ public final class GracefulDisconnectGra
          *     
          * Get some replicated contexts. Nothing to do    
          */
-        super.transitions[GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = 
-            new GrammarTransition<GracefulDisconnectContainer>( GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE,
+        super.transitions[GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE.ordinal()][UniversalTag.SEQUENCE
+            .getValue()] =
+            new GrammarTransition<GracefulDisconnectContainer>(
+                GracefulDisconnectStatesEnum.GRACEFUL_DISCONNECT_SEQUENCE_STATE,
                 GracefulDisconnectStatesEnum.REPLICATED_CONTEXTS_STATE,
                 UniversalTag.SEQUENCE.getValue(), null );
-        
+
         /**
          * Transition from time offline to delay
          * 
@@ -262,9 +263,9 @@ public final class GracefulDisconnectGra
          *     
          * Set the delay value into the GracefulDisconnect object.    
          */
-        super.transitions[GracefulDisconnectStatesEnum.TIME_OFFLINE_STATE.ordinal()][GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG] = 
+        super.transitions[GracefulDisconnectStatesEnum.TIME_OFFLINE_STATE.ordinal()][GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG] =
             new GrammarTransition<GracefulDisconnectContainer>( GracefulDisconnectStatesEnum.TIME_OFFLINE_STATE,
-                GracefulDisconnectStatesEnum.DELAY_STATE, 
+                GracefulDisconnectStatesEnum.DELAY_STATE,
                 GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG,
                 storeDelay );
 
@@ -279,11 +280,11 @@ public final class GracefulDisconnectGra
          *     
          * Get some replicated contexts. Nothing to do    
          */
-        super.transitions[GracefulDisconnectStatesEnum.TIME_OFFLINE_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = 
+        super.transitions[GracefulDisconnectStatesEnum.TIME_OFFLINE_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
             new GrammarTransition<GracefulDisconnectContainer>( GracefulDisconnectStatesEnum.TIME_OFFLINE_STATE,
                 GracefulDisconnectStatesEnum.REPLICATED_CONTEXTS_STATE,
                 UniversalTag.SEQUENCE.getValue(), null );
-        
+
         /**
          * Transition from delay to replicated contexts
          * 
@@ -295,11 +296,11 @@ public final class GracefulDisconnectGra
          *     
          * Get some replicated contexts. Nothing to do    
          */
-        super.transitions[GracefulDisconnectStatesEnum.DELAY_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = 
+        super.transitions[GracefulDisconnectStatesEnum.DELAY_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
             new GrammarTransition<GracefulDisconnectContainer>( GracefulDisconnectStatesEnum.DELAY_STATE,
-                GracefulDisconnectStatesEnum.REPLICATED_CONTEXTS_STATE, 
+                GracefulDisconnectStatesEnum.REPLICATED_CONTEXTS_STATE,
                 UniversalTag.SEQUENCE.getValue(), null );
-        
+
         /**
          * Transition from replicated contexts to referral
          * 
@@ -311,9 +312,10 @@ public final class GracefulDisconnectGra
          *     
          * Stores the referral
          */
-        super.transitions[GracefulDisconnectStatesEnum.REPLICATED_CONTEXTS_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
+        super.transitions[GracefulDisconnectStatesEnum.REPLICATED_CONTEXTS_STATE.ordinal()][UniversalTag.OCTET_STRING
+            .getValue()] =
             new GrammarTransition<GracefulDisconnectContainer>( GracefulDisconnectStatesEnum.REPLICATED_CONTEXTS_STATE,
-                GracefulDisconnectStatesEnum.REFERRAL_STATE, 
+                GracefulDisconnectStatesEnum.REFERRAL_STATE,
                 UniversalTag.OCTET_STRING.getValue(),
                 storeReferral );
 
@@ -328,9 +330,9 @@ public final class GracefulDisconnectGra
          *     
          * Stores the referral
          */
-        super.transitions[GracefulDisconnectStatesEnum.REFERRAL_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
+        super.transitions[GracefulDisconnectStatesEnum.REFERRAL_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] =
             new GrammarTransition<GracefulDisconnectContainer>( GracefulDisconnectStatesEnum.REFERRAL_STATE,
-                GracefulDisconnectStatesEnum.REFERRAL_STATE, 
+                GracefulDisconnectStatesEnum.REFERRAL_STATE,
                 UniversalTag.OCTET_STRING.getValue(),
                 storeReferral );
 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectResponseDecorator.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectResponseDecorator.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectResponseDecorator.java Tue Jan 24 17:27:00 2012
@@ -45,12 +45,13 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulDisconnectResponseDecorator extends ExtendedResponseDecorator<GracefulDisconnectResponse> implements GracefulDisconnectResponse
+public class GracefulDisconnectResponseDecorator extends ExtendedResponseDecorator<GracefulDisconnectResponse>
+    implements GracefulDisconnectResponse
 {
     /** The logger. */
     private static final Logger LOG = LoggerFactory.getLogger( GracefulDisconnectResponseDecorator.class );
 
-    
+
     /**
      * Creates a new instance of CancelResponseDecorator.
      *
@@ -63,8 +64,8 @@ public class GracefulDisconnectResponseD
         responseValue = null;
         encodeResponse();
     }
-    
-    
+
+
     /**
      * Creates a new instance of CancelResponseDecorator.
      *
@@ -77,8 +78,8 @@ public class GracefulDisconnectResponseD
         this.responseValue = responseValue;
         decodeValue();
     }
-    
-    
+
+
     private void decodeValue() throws DecoderException
     {
         GracefulDisconnectDecoder decoder = new GracefulDisconnectDecoder();
@@ -86,7 +87,7 @@ public class GracefulDisconnectResponseD
 
         try
         {
-            codec = (org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnect) decoder
+            codec = ( org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnect ) decoder
                 .decode( responseValue );
             getDecorated().setTimeOffline( codec.getTimeOffline() );
             getDecorated().setDelay( codec.getDelay() );
@@ -108,7 +109,7 @@ public class GracefulDisconnectResponseD
 
     private void encodeResponse()
     {
-        org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnect codec = 
+        org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnect codec =
             new org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnect();
         codec.setTimeOffline( getDecorated().getTimeOffline() );
         codec.setDelay( getDecorated().getDelay() );
@@ -146,7 +147,6 @@ public class GracefulDisconnectResponseD
     // ExtendedResponse Interface Method Implementations
     // ------------------------------------------------------------------------
 
-    
     /**
      * Gets the response OID specific encoded response values.
      * 
@@ -180,7 +180,7 @@ public class GracefulDisconnectResponseD
             getDecorated().getLdapResult().setReferral( new ReferralImpl() );
             return;
         }
-        
+
         ByteBuffer bb = ByteBuffer.wrap( responseValue );
         GracefulDisconnectContainer container = new GracefulDisconnectContainer();
         Asn1Decoder decoder = new Asn1Decoder();
@@ -196,7 +196,7 @@ public class GracefulDisconnectResponseD
 
         org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnect codec = container
             .getGracefulDisconnect();
-        
+
         getDecorated().setDelay( codec.getDelay() );
         getDecorated().setTimeOffline( codec.getTimeOffline() );
 
@@ -208,7 +208,7 @@ public class GracefulDisconnectResponseD
         this.responseValue = new byte[responseValue.length];
         System.arraycopy( responseValue, 0, this.responseValue, 0, responseValue.length );
     }
-    
+
 
     /**
      * {@inheritDoc}
@@ -218,7 +218,7 @@ public class GracefulDisconnectResponseD
         return getDecorated().getDelay();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -227,7 +227,7 @@ public class GracefulDisconnectResponseD
         getDecorated().setDelay( delay );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -235,7 +235,7 @@ public class GracefulDisconnectResponseD
     {
         return getDecorated().getTimeOffline();
     }
-    
+
 
     /**
      * {@inheritDoc}
@@ -245,7 +245,7 @@ public class GracefulDisconnectResponseD
         getDecorated().setTimeOffline( timeOffline );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectStatesEnum.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectStatesEnum.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulDisconnect/GracefulDisconnectStatesEnum.java Tue Jan 24 17:27:00 2012
@@ -97,7 +97,7 @@ public enum GracefulDisconnectStatesEnum
         return ( ( state == END_STATE.ordinal() ) ? "GRACEFUL_DISCONNECT_END_STATE" : name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -105,8 +105,8 @@ public enum GracefulDisconnectStatesEnum
     {
         return this == END_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownFactory.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownFactory.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownFactory.java Tue Jan 24 17:27:00 2012
@@ -39,18 +39,18 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulShutdownFactory 
+public class GracefulShutdownFactory
     implements ExtendedRequestFactory<GracefulShutdownRequest, GracefulShutdownResponse>
 {
     private LdapApiService codec;
-    
-    
+
+
     public GracefulShutdownFactory( LdapApiService codec )
     {
         this.codec = codec;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -59,7 +59,7 @@ public class GracefulShutdownFactory 
         return GracefulShutdownRequest.EXTENSION_OID;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -74,7 +74,7 @@ public class GracefulShutdownFactory 
      */
     public GracefulShutdownResponse newResponse( byte[] encodedValue ) throws DecoderException
     {
-        GracefulShutdownResponseDecorator response = new GracefulShutdownResponseDecorator( 
+        GracefulShutdownResponseDecorator response = new GracefulShutdownResponseDecorator(
             codec, new GracefulShutdownResponseImpl() );
         response.setResponseValue( encodedValue );
         return response;
@@ -86,7 +86,8 @@ public class GracefulShutdownFactory 
      */
     public GracefulShutdownRequest newRequest( byte[] value )
     {
-        GracefulShutdownRequestDecorator req = new GracefulShutdownRequestDecorator( codec, new GracefulShutdownRequestImpl() );
+        GracefulShutdownRequestDecorator req = new GracefulShutdownRequestDecorator( codec,
+            new GracefulShutdownRequestImpl() );
         req.setRequestValue( value );
         return req;
     }

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownGrammar.java Tue Jan 24 17:27:00 2012
@@ -80,19 +80,19 @@ public final class GracefulShutdownGramm
          *     
          * Creates the GracefulShutdown object
          */
-        super.transitions[GracefulShutdownStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = 
-            new GrammarTransition<GracefulShutdownContainer>( GracefulShutdownStatesEnum.START_STATE, 
-                GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE, 
+        super.transitions[GracefulShutdownStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+            new GrammarTransition<GracefulShutdownContainer>( GracefulShutdownStatesEnum.START_STATE,
+                GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE,
                 UniversalTag.SEQUENCE.getValue(),
                 new GrammarAction<GracefulShutdownContainer>( "Init GracefulShutdown" )
-            {
-                public void action( GracefulShutdownContainer container )
                 {
-                    GracefulShutdown gracefulShutdown = new GracefulShutdown();
-                    container.setGracefulShutdown( gracefulShutdown );
-                    container.setGrammarEndAllowed( true );
-                }
-            } );
+                    public void action( GracefulShutdownContainer container )
+                    {
+                        GracefulShutdown gracefulShutdown = new GracefulShutdown();
+                        container.setGracefulShutdown( gracefulShutdown );
+                        container.setGrammarEndAllowed( true );
+                    }
+                } );
 
         /**
          * Transition from graceful shutdown to time offline
@@ -104,36 +104,38 @@ public final class GracefulShutdownGramm
          * Set the time offline value into the GracefulShutdown
          * object.
          */
-        super.transitions[GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = 
-            new GrammarTransition<GracefulShutdownContainer>( GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE, 
-                                    GracefulShutdownStatesEnum.TIME_OFFLINE_STATE, 
-                                    UniversalTag.INTEGER.getValue(), 
+        super.transitions[GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE.ordinal()][UniversalTag.INTEGER
+            .getValue()] =
+            new GrammarTransition<GracefulShutdownContainer>(
+                GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE,
+                GracefulShutdownStatesEnum.TIME_OFFLINE_STATE,
+                UniversalTag.INTEGER.getValue(),
                 new GrammarAction<GracefulShutdownContainer>( "Set Graceful Shutdown time offline" )
-            {
-                public void action( GracefulShutdownContainer container ) throws DecoderException
                 {
-                    Value value = container.getCurrentTLV().getValue();
-
-                    try
+                    public void action( GracefulShutdownContainer container ) throws DecoderException
                     {
-                        int timeOffline = IntegerDecoder.parse( value, 0, 720 );
+                        Value value = container.getCurrentTLV().getValue();
 
-                        if ( IS_DEBUG )
+                        try
                         {
-                            LOG.debug( "Time Offline = " + timeOffline );
-                        }
+                            int timeOffline = IntegerDecoder.parse( value, 0, 720 );
 
-                        container.getGracefulShutdown().setTimeOffline( timeOffline );
-                        container.setGrammarEndAllowed( true );
-                    }
-                    catch ( IntegerDecoderException e )
-                    {
-                        String msg = I18n.err( I18n.ERR_04037, Strings.dumpBytes(value.getData()) );
-                        LOG.error( msg );
-                        throw new DecoderException( msg );
+                            if ( IS_DEBUG )
+                            {
+                                LOG.debug( "Time Offline = " + timeOffline );
+                            }
+
+                            container.getGracefulShutdown().setTimeOffline( timeOffline );
+                            container.setGrammarEndAllowed( true );
+                        }
+                        catch ( IntegerDecoderException e )
+                        {
+                            String msg = I18n.err( I18n.ERR_04037, Strings.dumpBytes( value.getData() ) );
+                            LOG.error( msg );
+                            throw new DecoderException( msg );
+                        }
                     }
-                }
-            } );
+                } );
 
         /**
          * Transition from time offline to delay
@@ -145,38 +147,38 @@ public final class GracefulShutdownGramm
          * Set the delay value into the GracefulShutdown
          * object.
          */
-        super.transitions[GracefulShutdownStatesEnum.TIME_OFFLINE_STATE.ordinal()][GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG] = 
-            new GrammarTransition<GracefulShutdownContainer>( GracefulShutdownStatesEnum.TIME_OFFLINE_STATE, 
-                                    GracefulShutdownStatesEnum.DELAY_STATE, 
-                                    GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG, 
+        super.transitions[GracefulShutdownStatesEnum.TIME_OFFLINE_STATE.ordinal()][GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG] =
+            new GrammarTransition<GracefulShutdownContainer>( GracefulShutdownStatesEnum.TIME_OFFLINE_STATE,
+                GracefulShutdownStatesEnum.DELAY_STATE,
+                GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG,
 
                 new GrammarAction<GracefulShutdownContainer>( "Set Graceful Shutdown Delay" )
-            {
-                public void action( GracefulShutdownContainer container ) throws DecoderException
                 {
-                    Value value = container.getCurrentTLV().getValue();
-
-                    try
+                    public void action( GracefulShutdownContainer container ) throws DecoderException
                     {
-                        int delay = IntegerDecoder.parse( value, 0, 86400 );
+                        Value value = container.getCurrentTLV().getValue();
 
-                        if ( IS_DEBUG )
+                        try
                         {
-                            LOG.debug( "Delay = " + delay );
-                        }
+                            int delay = IntegerDecoder.parse( value, 0, 86400 );
 
-                        container.getGracefulShutdown().setDelay( delay );
-                        container.setGrammarEndAllowed( true );
-                    }
-                    catch ( IntegerDecoderException e )
-                    {
-                        String msg = I18n.err( I18n.ERR_04036, Strings.dumpBytes(value.getData()) );
-                        LOG.error( msg );
-                        throw new DecoderException( msg );
+                            if ( IS_DEBUG )
+                            {
+                                LOG.debug( "Delay = " + delay );
+                            }
+
+                            container.getGracefulShutdown().setDelay( delay );
+                            container.setGrammarEndAllowed( true );
+                        }
+                        catch ( IntegerDecoderException e )
+                        {
+                            String msg = I18n.err( I18n.ERR_04036, Strings.dumpBytes( value.getData() ) );
+                            LOG.error( msg );
+                            throw new DecoderException( msg );
+                        }
                     }
-                }
-            } );
-        
+                } );
+
         /**
          * Transition from graceful shutdown to delay
          * 
@@ -187,39 +189,39 @@ public final class GracefulShutdownGramm
          * Set the delay value into the GracefulShutdown
          * object.
          */
-        super.transitions[GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE.ordinal()]
-                         [GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG] = 
-            new GrammarTransition<GracefulShutdownContainer>( GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE, 
-                                    GracefulShutdownStatesEnum.DELAY_STATE, 
-                                    GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG, 
+        super.transitions[GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE.ordinal()][GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG] =
+            new GrammarTransition<GracefulShutdownContainer>(
+                GracefulShutdownStatesEnum.GRACEFUL_SHUTDOWN_SEQUENCE_STATE,
+                GracefulShutdownStatesEnum.DELAY_STATE,
+                GracefulActionConstants.GRACEFUL_ACTION_DELAY_TAG,
 
                 new GrammarAction<GracefulShutdownContainer>( "Set Graceful Shutdown Delay" )
-            {
-                public void action( GracefulShutdownContainer container ) throws DecoderException
                 {
-                    GracefulShutdownContainer gracefulShutdownContainer = ( GracefulShutdownContainer ) container;
-                    Value value = gracefulShutdownContainer.getCurrentTLV().getValue();
-
-                    try
+                    public void action( GracefulShutdownContainer container ) throws DecoderException
                     {
-                        int delay = IntegerDecoder.parse( value, 0, 86400 );
+                        GracefulShutdownContainer gracefulShutdownContainer = ( GracefulShutdownContainer ) container;
+                        Value value = gracefulShutdownContainer.getCurrentTLV().getValue();
 
-                        if ( IS_DEBUG )
+                        try
                         {
-                            LOG.debug( "Delay = " + delay );
-                        }
+                            int delay = IntegerDecoder.parse( value, 0, 86400 );
 
-                        gracefulShutdownContainer.getGracefulShutdown().setDelay( delay );
-                        gracefulShutdownContainer.setGrammarEndAllowed( true );
-                    }
-                    catch ( IntegerDecoderException e )
-                    {
-                        String msg = I18n.err( I18n.ERR_04036, Strings.dumpBytes(value.getData()) );
-                        LOG.error( msg );
-                        throw new DecoderException( msg );
+                            if ( IS_DEBUG )
+                            {
+                                LOG.debug( "Delay = " + delay );
+                            }
+
+                            gracefulShutdownContainer.getGracefulShutdown().setDelay( delay );
+                            gracefulShutdownContainer.setGrammarEndAllowed( true );
+                        }
+                        catch ( IntegerDecoderException e )
+                        {
+                            String msg = I18n.err( I18n.ERR_04036, Strings.dumpBytes( value.getData() ) );
+                            LOG.error( msg );
+                            throw new DecoderException( msg );
+                        }
                     }
-                }
-            } );
+                } );
     }
 
 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownRequestDecorator.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownRequestDecorator.java Tue Jan 24 17:27:00 2012
@@ -36,11 +36,12 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulShutdownRequestDecorator extends ExtendedRequestDecorator<GracefulShutdownRequest,GracefulShutdownResponse> 
+public class GracefulShutdownRequestDecorator extends
+    ExtendedRequestDecorator<GracefulShutdownRequest, GracefulShutdownResponse>
     implements GracefulShutdownRequest
 {
     private static final Logger LOG = LoggerFactory.getLogger( GracefulShutdownRequestDecorator.class );
-    
+
 
     /**
      * Creates a new instance of GracefulShutdownRequestDecorator.
@@ -52,8 +53,8 @@ public class GracefulShutdownRequestDeco
     {
         super( codec, decoratedMessage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -63,7 +64,7 @@ public class GracefulShutdownRequestDeco
 
         try
         {
-            GracefulShutdown gs = (GracefulShutdown) decoder.decode( requestValue );
+            GracefulShutdown gs = ( GracefulShutdown ) decoder.decode( requestValue );
 
             if ( requestValue != null )
             {

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownResponseDecorator.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownResponseDecorator.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownResponseDecorator.java Tue Jan 24 17:27:00 2012
@@ -20,7 +20,7 @@
 package org.apache.directory.shared.ldap.extras.extended.ads_impl.gracefulShutdown;
 
 
-import org.apache.directory.shared.ldap.codec.api.ExtendedResponseDecorator; 
+import org.apache.directory.shared.ldap.codec.api.ExtendedResponseDecorator;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
 import org.apache.directory.shared.ldap.extras.extended.GracefulShutdownResponse;
 
@@ -30,7 +30,8 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulShutdownResponseDecorator extends ExtendedResponseDecorator<GracefulShutdownResponse> implements GracefulShutdownResponse
+public class GracefulShutdownResponseDecorator extends ExtendedResponseDecorator<GracefulShutdownResponse> implements
+    GracefulShutdownResponse
 {
     /**
      * Creates a new instance of GracefulShutdownResponseDecorator.

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownStatesEnum.java?rev=1235364&r1=1235363&r2=1235364&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownStatesEnum.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/extended/ads_impl/gracefulShutdown/GracefulShutdownStatesEnum.java Tue Jan 24 17:27:00 2012
@@ -92,7 +92,7 @@ public enum GracefulShutdownStatesEnum i
         return ( ( state == END_STATE.ordinal() ) ? "GRACEFUL_SHUTDOWN_END_STATE" : name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -100,8 +100,8 @@ public enum GracefulShutdownStatesEnum i
     {
         return this == END_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */



Mime
View raw message