directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1068124 [7/19] - in /directory/apacheds/branches/m1/kerberos-codec/src: main/java/org/apache/directory/server/kerberos/shared/crypto/checksum/ main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/ main/java/org/apache/di...
Date Mon, 07 Feb 2011 20:49:13 GMT
Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/EncKrbCredPartGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/EncKrbCredPartGrammar.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/EncKrbCredPartGrammar.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/EncKrbCredPartGrammar.java Mon Feb  7 20:49:04 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbCredPart;
 
@@ -41,10 +41,10 @@ import org.slf4j.LoggerFactory;
  * This class implements the EncKrbCredPart structure. All the actions are declared
  * in this class. As it is a singleton, these declaration are only done once. If
  * an action is to be added or modified, this is where the work is to be done !
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public final class EncKrbCredPartGrammar extends AbstractGrammar
+public final class EncKrbCredPartGrammar extends AbstractGrammar<EncKrbCredPartContainer>
 {
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( EncKrbCredPartGrammar.class );
@@ -53,12 +53,13 @@ public final class EncKrbCredPartGrammar
     static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
     /** The instance of grammar. EncKrbCredPartGrammar is a singleton */
-    private static Grammar instance = new EncKrbCredPartGrammar();
+    private static Grammar<EncKrbCredPartContainer> instance = new EncKrbCredPartGrammar();
 
 
     /**
      * Creates a new EncKrbCredPartGrammar object.
      */
+    @SuppressWarnings("unchecked")
     private EncKrbCredPartGrammar()
     {
         setName( EncKrbCredPartGrammar.class.getName() );
@@ -67,109 +68,173 @@ public final class EncKrbCredPartGrammar
         super.transitions = new GrammarTransition[EncKrbCredPartStatesEnum.LAST_ENC_KRB_CRED_PART_STATE.ordinal()][256];
 
         // ============================================================================================
-        // EncKrbCredPart 
+        // EncKrbCredPart
         // ============================================================================================
-        super.transitions[EncKrbCredPartStatesEnum.START_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.START_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_TAG,
-            new EncKrbCredPartInit());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TAG_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TAG_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SEQ_TAG_STATE, UniversalTag.SEQUENCE.getValue(),
-            new CheckNotNullLength());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SEQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_TICKET_INFO_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SEQ_TAG_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_TAG_STATE, KerberosConstants.ENC_KRB_CRED_TICKET_INFO_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_TAG_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_TAG_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, UniversalTag.SEQUENCE.getValue(),
-            new CheckNotNullLength());
-
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, UniversalTag.SEQUENCE.getValue(),
-            new StoreTicketInfo());
-
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_NONCE_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_NONCE_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_TAG_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE, UniversalTag.INTEGER.getValue(),
-            new StoreNonce());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreTimestamp());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE, UniversalTag.INTEGER.getValue(),
-            new StoreUsec());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
-            new StoreSenderAddress());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
-            new StoreRecipientAddress());
-        
+        super.transitions[EncKrbCredPartStatesEnum.START_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.START_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_TAG,
+                new EncKrbCredPartInit() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TAG_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TAG_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SEQ_TAG_STATE, UniversalTag.SEQUENCE.getValue(),
+                new CheckNotNullLength<EncKrbCredPartContainer>() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SEQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_TICKET_INFO_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SEQ_TAG_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_TICKET_INFO_TAG,
+                new CheckNotNullLength<EncKrbCredPartContainer>() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_TAG_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_TAG_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, UniversalTag.SEQUENCE.getValue(),
+                new CheckNotNullLength<EncKrbCredPartContainer>() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, UniversalTag.SEQUENCE.getValue(),
+                new StoreTicketInfo() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_NONCE_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_NONCE_TAG,
+                new CheckNotNullLength<EncKrbCredPartContainer>() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_TAG_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE, UniversalTag.INTEGER.getValue(),
+                new StoreNonce() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG,
+                new CheckNotNullLength<EncKrbCredPartContainer>() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE,
+                UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreTimestamp() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG,
+                new CheckNotNullLength<EncKrbCredPartContainer>() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE,
+                UniversalTag.INTEGER.getValue(),
+                new StoreUsec() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
+                new StoreSenderAddress() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
+                new StoreRecipientAddress() );
+
         // ---------------------------------- OPTIONAL transitions -----------------------------------------------
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
-            new StoreSenderAddress());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG,
-            new StoreRecipientAddress());
-
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG,
-            new CheckNotNullLength());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
-            new StoreSenderAddress());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG,
-            new StoreRecipientAddress());
-
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
-            new StoreSenderAddress());
-        
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG,
-            new StoreRecipientAddress());
-
-        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE, EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG,
-            new StoreRecipientAddress());
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_TIMESTAMP_TAG,
+                new CheckNotNullLength<EncKrbCredPartContainer>() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG,
+                new CheckNotNullLength<EncKrbCredPartContainer>() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
+                new StoreSenderAddress() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TICKET_INFO_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG,
+                new StoreRecipientAddress() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_USEC_TAG,
+                new CheckNotNullLength<EncKrbCredPartContainer>() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
+                new StoreSenderAddress() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_NONCE_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG,
+                new StoreRecipientAddress() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG,
+                new StoreSenderAddress() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_TIMESTAMP_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG,
+                new StoreRecipientAddress() );
+
+        super.transitions[EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE.ordinal()][KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbCredPartContainer>(
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_USEC_STATE,
+                EncKrbCredPartStatesEnum.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG,
+                new StoreRecipientAddress() );
     }
 
 
     /**
      * Get the instance of this grammar
-     * 
+     *
      * @return An instance on the EncKrbCredPart Grammar
      */
-    public static Grammar getInstance()
+    public static Grammar<EncKrbCredPartContainer> getInstance()
     {
         return instance;
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/EncKrbCredPartStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/EncKrbCredPartStatesEnum.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/EncKrbCredPartStatesEnum.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/EncKrbCredPartStatesEnum.java Mon Feb  7 20:49:04 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbCredPart;
 
@@ -27,7 +27,7 @@ import org.apache.directory.shared.asn1.
 /**
  * This class stores the EncKrbCredPart grammar's constants. It is also used for debugging
  * purpose
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum EncKrbCredPartStatesEnum implements States
@@ -37,32 +37,32 @@ public enum EncKrbCredPartStatesEnum imp
 
     // ----- EncKrbPrivPart component --------------------------------------
 
-    ENC_KRB_CRED_PART_TAG_STATE, // 1
+    ENC_KRB_CRED_PART_TAG_STATE,                    // 1
 
-    ENC_KRB_CRED_PART_SEQ_TAG_STATE, // 2
+    ENC_KRB_CRED_PART_SEQ_TAG_STATE,                // 2
 
-    ENC_KRB_CRED_PART_TICKET_INFO_TAG_STATE, // 3
-    ENC_KRB_CRED_PART_TICKET_INFO_STATE, // 4
-    
-    ENC_KRB_CRED_PART_NONCE_TAG_STATE, // 5
-    ENC_KRB_CRED_PART_NONCE_STATE, // 6
+    ENC_KRB_CRED_PART_TICKET_INFO_TAG_STATE,        // 3
+    ENC_KRB_CRED_PART_TICKET_INFO_STATE,            // 4
 
-    ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE, // 7
-    ENC_KRB_CRED_PART_TIMESTAMP_STATE, // 8
+    ENC_KRB_CRED_PART_NONCE_TAG_STATE,              // 5
+    ENC_KRB_CRED_PART_NONCE_STATE,                  // 6
 
-    ENC_KRB_CRED_PART_USEC_TAG_STATE, // 9
-    ENC_KRB_CRED_PART_USEC_STATE, // 10
+    ENC_KRB_CRED_PART_TIMESTAMP_TAG_STATE,          // 7
+    ENC_KRB_CRED_PART_TIMESTAMP_STATE,              // 8
 
-    ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE, // 11
+    ENC_KRB_CRED_PART_USEC_TAG_STATE,               // 9
+    ENC_KRB_CRED_PART_USEC_STATE,                   // 10
 
-    ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE, // 12
+    ENC_KRB_CRED_PART_SENDER_ADDRESS_TAG_STATE,     // 11
+
+    ENC_KRB_CRED_PART_RECIPIENT_ADDRESS_TAG_STATE,  // 12
 
     // End
-    LAST_ENC_KRB_CRED_PART_STATE; // 13
+    LAST_ENC_KRB_CRED_PART_STATE;                   // 13
 
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar code
      * @return The grammar name
      */
@@ -74,11 +74,11 @@ public enum EncKrbCredPartStatesEnum imp
 
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar class
      * @return The grammar name
      */
-    public String getGrammarName( Grammar grammar )
+    public String getGrammarName( Grammar<EncKrbCredPartContainer> grammar )
     {
         if ( grammar instanceof EncKrbCredPartGrammar )
         {
@@ -93,7 +93,7 @@ public enum EncKrbCredPartStatesEnum imp
 
     /**
      * Get the string representing the state
-     * 
+     *
      * @param state The state number
      * @return The String representing the state
      */

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/EncKrbCredPartInit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/EncKrbCredPartInit.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/EncKrbCredPartInit.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/EncKrbCredPartInit.java Mon Feb  7 20:49:04 2011
@@ -6,22 +6,21 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbCredPart.actions;
 
 
 import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.i18n.I18n;
@@ -33,10 +32,10 @@ import org.slf4j.LoggerFactory;
 
 /**
  * The action used to initialize the EncKrbCredPart object
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class EncKrbCredPartInit extends GrammarAction
+public class EncKrbCredPartInit extends GrammarAction<EncKrbCredPartContainer>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( EncKrbCredPartInit.class );
@@ -57,10 +56,8 @@ public class EncKrbCredPartInit extends 
     /**
      * {@inheritDoc}
      */
-    public void action( Asn1Container container ) throws DecoderException
+    public void action( EncKrbCredPartContainer encKrbCredPartContainer ) throws DecoderException
     {
-        EncKrbCredPartContainer encKrbCredPartContainer = ( EncKrbCredPartContainer ) container;
-
         TLV tlv = encKrbCredPartContainer.getCurrentTLV();
 
         // The Length should not be null
@@ -71,10 +68,10 @@ public class EncKrbCredPartInit extends 
             // This will generate a PROTOCOL_ERROR
             throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
         }
-        
+
         EncKrbCredPart encKrbCredPart = new EncKrbCredPart();
         encKrbCredPartContainer.setEncKrbCredPart( encKrbCredPart );
-        
+
         if ( IS_DEBUG )
         {
             LOG.debug( "EncKrbCredPart created" );

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreNonce.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreNonce.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreNonce.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreNonce.java Mon Feb  7 20:49:04 2011
@@ -6,31 +6,30 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbCredPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.actions.AbstractReadInteger;
 import org.apache.directory.shared.kerberos.codec.encKrbCredPart.EncKrbCredPartContainer;
 
 
 /**
  * The action used to store the Nonce
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreNonce extends AbstractReadInteger
+public class StoreNonce extends AbstractReadInteger<EncKrbCredPartContainer>
 {
     /**
      * Instantiates a new StoreNonce action.
@@ -44,11 +43,11 @@ public class StoreNonce extends Abstract
     /**
      * {@inheritDoc}
      */
-    public void setIntegerValue( int value, Asn1Container container )
+    @Override
+    public void setIntegerValue( int value, EncKrbCredPartContainer encKrbCredPartContainer )
     {
-        EncKrbCredPartContainer encKrbCredPartContainer = ( EncKrbCredPartContainer ) container;
         encKrbCredPartContainer.getEncKrbCredPart().setNonce( value );
-        
-        container.setGrammarEndAllowed( true );
+
+        encKrbCredPartContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreRecipientAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreRecipientAddress.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreRecipientAddress.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreRecipientAddress.java Mon Feb  7 20:49:04 2011
@@ -21,7 +21,6 @@
 package org.apache.directory.shared.kerberos.codec.encKrbCredPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadHostAddress;
 import org.apache.directory.shared.kerberos.codec.encKrbCredPart.EncKrbCredPartContainer;
 import org.apache.directory.shared.kerberos.components.HostAddress;
@@ -32,7 +31,7 @@ import org.apache.directory.shared.kerbe
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreRecipientAddress extends AbstractReadHostAddress
+public class StoreRecipientAddress extends AbstractReadHostAddress<EncKrbCredPartContainer>
 {
     public StoreRecipientAddress()
     {
@@ -44,11 +43,10 @@ public class StoreRecipientAddress exten
      * {@inheritDoc}
      */
     @Override
-    protected void setAddress( HostAddress hostAddress, Asn1Container container )
+    protected void setAddress( HostAddress hostAddress, EncKrbCredPartContainer encKrbCredPartContainer )
     {
-        EncKrbCredPartContainer encKrbCredPartContainer = ( EncKrbCredPartContainer ) container;
         encKrbCredPartContainer.getEncKrbCredPart().setRecipientAddress( hostAddress );
-        
-        container.setGrammarEndAllowed( true );
+
+        encKrbCredPartContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreSenderAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreSenderAddress.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreSenderAddress.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreSenderAddress.java Mon Feb  7 20:49:04 2011
@@ -21,7 +21,6 @@
 package org.apache.directory.shared.kerberos.codec.encKrbCredPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadHostAddress;
 import org.apache.directory.shared.kerberos.codec.encKrbCredPart.EncKrbCredPartContainer;
 import org.apache.directory.shared.kerberos.components.HostAddress;
@@ -32,7 +31,7 @@ import org.apache.directory.shared.kerbe
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreSenderAddress extends AbstractReadHostAddress
+public class StoreSenderAddress extends AbstractReadHostAddress<EncKrbCredPartContainer>
 {
     public StoreSenderAddress()
     {
@@ -44,11 +43,10 @@ public class StoreSenderAddress extends 
      * {@inheritDoc}
      */
     @Override
-    protected void setAddress( HostAddress hostAddress, Asn1Container container )
+    protected void setAddress( HostAddress hostAddress, EncKrbCredPartContainer encKrbCredPartContainer )
     {
-        EncKrbCredPartContainer encKrbCredPartContainer = ( EncKrbCredPartContainer ) container;
         encKrbCredPartContainer.getEncKrbCredPart().setSenderAddress( hostAddress );
-        
-        container.setGrammarEndAllowed( true );
+
+        encKrbCredPartContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTicketInfo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTicketInfo.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTicketInfo.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTicketInfo.java Mon Feb  7 20:49:04 2011
@@ -22,7 +22,6 @@ package org.apache.directory.shared.kerb
 
 
 import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -39,7 +38,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreTicketInfo extends GrammarAction
+public class StoreTicketInfo extends GrammarAction<EncKrbCredPartContainer>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreTicketInfo.class );
@@ -51,10 +50,8 @@ public class StoreTicketInfo extends Gra
     /**
      * {@inheritDoc}
      */
-    public void action( Asn1Container container ) throws DecoderException
+    public void action( EncKrbCredPartContainer encKrbCredPartContainer ) throws DecoderException
     {
-        EncKrbCredPartContainer encKrbCredPartContainer = ( EncKrbCredPartContainer ) container;
-
         TLV tlv = encKrbCredPartContainer.getCurrentTLV();
 
         // The Length should not be null
@@ -71,14 +68,14 @@ public class StoreTicketInfo extends Gra
 
         // KrbCredInfo container
         KrbCredInfoContainer ticketInfoContainer = new KrbCredInfoContainer();
-        ticketInfoContainer.setStream( container.getStream() );
+        ticketInfoContainer.setStream( encKrbCredPartContainer.getStream() );
+
+        encKrbCredPartContainer.rewind();
 
-        container.rewind();
-        
         try
         {
             // decode KrbCredInfo
-            decoder.decode( container.getStream(), ticketInfoContainer );
+            decoder.decode( encKrbCredPartContainer.getStream(), ticketInfoContainer );
         }
         catch ( DecoderException e )
         {
@@ -93,9 +90,9 @@ public class StoreTicketInfo extends Gra
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
 
         // Update the parent
-        container.updateParent();
+        encKrbCredPartContainer.updateParent();
 
-        container.setGrammarEndAllowed( true );
+        encKrbCredPartContainer.setGrammarEndAllowed( true );
 
         if ( IS_DEBUG )
         {

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTimestamp.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTimestamp.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTimestamp.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreTimestamp.java Mon Feb  7 20:49:04 2011
@@ -6,21 +6,20 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbCredPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
 import org.apache.directory.shared.kerberos.codec.encKrbCredPart.EncKrbCredPartContainer;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the EncKrbCredPart timemstamp
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreTimestamp extends AbstractReadKerberosTime
+public class StoreTimestamp extends AbstractReadKerberosTime<EncKrbCredPartContainer>
 {
 
     /**
@@ -47,11 +46,10 @@ public class StoreTimestamp extends Abst
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, EncKrbCredPartContainer encKrbCredPartContainer )
     {
-        EncKrbCredPartContainer encKrbCredPartContainer = ( EncKrbCredPartContainer ) container;
         encKrbCredPartContainer.getEncKrbCredPart().setTimestamp( krbtime );
-        
-        container.setGrammarEndAllowed( true );
+
+        encKrbCredPartContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreUsec.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreUsec.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreUsec.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbCredPart/actions/StoreUsec.java Mon Feb  7 20:49:04 2011
@@ -6,31 +6,30 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbCredPart.actions;
 
 
 import org.apache.directory.shared.asn1.actions.AbstractReadInteger;
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.encKrbCredPart.EncKrbCredPartContainer;
 
 
 /**
  * The action used to store the EncKrbCredPart usec
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreUsec extends AbstractReadInteger
+public class StoreUsec extends AbstractReadInteger<EncKrbCredPartContainer>
 {
 
     /**
@@ -46,12 +45,11 @@ public class StoreUsec extends AbstractR
      * {@inheritDoc}
      */
     @Override
-    protected void setIntegerValue( int value, Asn1Container container )
+    protected void setIntegerValue( int value, EncKrbCredPartContainer encKrbCredPartContainer )
     {
-        EncKrbCredPartContainer encKrbCredPartContainer = ( EncKrbCredPartContainer ) container;
         encKrbCredPartContainer.getEncKrbCredPart().setUsec( value );
-        
-        container.setGrammarEndAllowed( true );
+
+        encKrbCredPartContainer.setGrammarEndAllowed( true );
     }
 
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/EncKrbPrivPartGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/EncKrbPrivPartGrammar.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/EncKrbPrivPartGrammar.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/EncKrbPrivPartGrammar.java Mon Feb  7 20:49:04 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbPrivPart;
 
@@ -41,10 +41,10 @@ import org.slf4j.LoggerFactory;
  * This class implements the EncKrbPrivPart structure. All the actions are declared
  * in this class. As it is a singleton, these declaration are only done once. If
  * an action is to be added or modified, this is where the work is to be done !
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public final class EncKrbPrivPartGrammar extends AbstractGrammar
+public final class EncKrbPrivPartGrammar extends AbstractGrammar<EncKrbPrivPartContainer>
 {
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( EncKrbPrivPartGrammar.class );
@@ -53,12 +53,13 @@ public final class EncKrbPrivPartGrammar
     static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
     /** The instance of grammar. EncKrbPrivPartGrammar is a singleton */
-    private static Grammar instance = new EncKrbPrivPartGrammar();
+    private static Grammar<EncKrbPrivPartContainer> instance = new EncKrbPrivPartGrammar();
 
 
     /**
      * Creates a new EncKrbPrivPartGrammar object.
      */
+    @SuppressWarnings("unchecked")
     private EncKrbPrivPartGrammar()
     {
         setName( EncKrbPrivPartGrammar.class.getName() );
@@ -67,160 +68,207 @@ public final class EncKrbPrivPartGrammar
         super.transitions = new GrammarTransition[EncKrbPrivPartStatesEnum.LAST_ENC_KRB_PRIV_PART_STATE.ordinal()][256];
 
         // ============================================================================================
-        // EncKrbPrivPart 
+        // EncKrbPrivPart
         // ============================================================================================
         // --------------------------------------------------------------------------------------------
         // Transition from EncKrbPrivPart init to EncKrbPrivPart tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart  ::= [APPLICATION 28] EncKrbPrivPart   ::= SEQUENCE {
-        super.transitions[EncKrbPrivPartStatesEnum.START_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.START_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_TAG,
-            new EncKrbPrivPartInit() );
+        super.transitions[EncKrbPrivPartStatesEnum.START_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.START_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_TAG,
+                new EncKrbPrivPartInit() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from EncKrbPrivPart tag to EncKrbPrivPart seq
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart  ::= [APPLICATION 28] SEQUENCE {
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TAG_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TAG_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_TAG_STATE, UniversalTag.SEQUENCE.getValue(),
-            new CheckNotNullLength() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TAG_STATE.ordinal()][UniversalTag.SEQUENCE
+            .getValue()] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TAG_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_TAG_STATE, UniversalTag.SEQUENCE.getValue(),
+                new CheckNotNullLength<EncKrbPrivPartContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from EncKrbPrivPart seq to user-data tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // user-data       [0]
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_USER_DATA_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_TAG_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_USER_DATA_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_USER_DATA_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_TAG_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_USER_DATA_TAG,
+                new CheckNotNullLength<EncKrbPrivPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from user-data tag to user-data value
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // user-data       [0] OCTET STRING
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_TAG_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_TAG_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE, UniversalTag.OCTET_STRING.getValue(),
-            new StoreUserData() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_TAG_STATE.ordinal()][UniversalTag.OCTET_STRING
+            .getValue()] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_TAG_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE, UniversalTag.OCTET_STRING.getValue(),
+                new StoreUserData() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from user-data value to timestamp tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // timestamp       [1]
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_TIMESTAMP_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_TIMESTAMP_TAG,
-            new CheckNotNullLength() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_TIMESTAMP_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_TIMESTAMP_TAG,
+                new CheckNotNullLength<EncKrbPrivPartContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from timestamp tag to timestamp value
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // timestamp       [1] KerberosTime OPTIONAL
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_TAG_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreTimestamp() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME
+            .getValue()] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_TAG_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreTimestamp() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from timestamp value to usec tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // usec            [2]
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_USEC_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_USEC_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_USEC_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_TIMESTAMP_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_USEC_TAG,
+                new CheckNotNullLength<EncKrbPrivPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from usec tag to usec value
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // usec            [2] Microseconds OPTIONAL
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_TAG_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE, UniversalTag.INTEGER.getValue(),
-            new StoreUsec() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_TAG_STATE.ordinal()][UniversalTag.INTEGER
+            .getValue()] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_TAG_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE, UniversalTag.INTEGER.getValue(),
+                new StoreUsec() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from usec value to seq-number tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // seq-number      [3]
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG,
+                new CheckNotNullLength<EncKrbPrivPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from seq-number tag to seq-number value
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // seq-number      [3] UInt32 OPTIONAL
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_STATE, UniversalTag.INTEGER.getValue(),
-            new StoreSeqNumber() );
-        
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG_STATE.ordinal()][UniversalTag.INTEGER
+            .getValue()] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_STATE, UniversalTag.INTEGER.getValue(),
+                new StoreSeqNumber() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from seq-number to s-address tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // s-address       [4] HostAddress
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG,
-            new StoreSenderAddress() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG,
+                new StoreSenderAddress() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from s-address tag to r-address tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // r-address       [5] HostAddress
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_RECIPIENT_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_RECIPIENT_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_RECIPIENT_ADDRESS_TAG,
-            new StoreRecipientAddress() );
-        
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_RECIPIENT_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_RECIPIENT_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_RECIPIENT_ADDRESS_TAG,
+                new StoreRecipientAddress() );
+
         //----------------------------- OPTIONAL transitions ---------------------------
-        
+
         // --------------------------------------------------------------------------------------------
         // Transition from user-data value to usec tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // usec       [2]
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_USEC_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_USEC_TAG,
-            new CheckNotNullLength() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_USEC_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_USEC_TAG,
+                new CheckNotNullLength<EncKrbPrivPartContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from user-data value to seq-number tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // seq-number       [3]
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG,
-            new CheckNotNullLength() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG,
+                new CheckNotNullLength<EncKrbPrivPartContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from user-data value to s-address tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // s-address       [4]
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG,
-            new StoreSenderAddress() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USER_DATA_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG,
+                new StoreSenderAddress() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from usec value to s-address tag
         // --------------------------------------------------------------------------------------------
         // EncKrbPrivPart   ::= SEQUENCE {
         // s-address       [4]
-        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG] = new GrammarTransition(
-            EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE, EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE, KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG,
-            new StoreSenderAddress() );
+        super.transitions[EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE.ordinal()][KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG] =
+            new GrammarTransition<EncKrbPrivPartContainer>(
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_USEC_STATE,
+                EncKrbPrivPartStatesEnum.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE,
+                KerberosConstants.ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG,
+                new StoreSenderAddress() );
     }
 
 
     /**
      * Get the instance of this grammar
-     * 
+     *
      * @return An instance on the EncKrbPrivPart Grammar
      */
-    public static Grammar getInstance()
+    public static Grammar<EncKrbPrivPartContainer> getInstance()
     {
         return instance;
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/EncKrbPrivPartStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/EncKrbPrivPartStatesEnum.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/EncKrbPrivPartStatesEnum.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/EncKrbPrivPartStatesEnum.java Mon Feb  7 20:49:04 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbPrivPart;
 
@@ -27,43 +27,43 @@ import org.apache.directory.shared.asn1.
 /**
  * This class stores the EncKrbPrivPart grammar's constants. It is also used for debugging
  * purpose
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum EncKrbPrivPartStatesEnum implements States
 {
     // Start
     START_STATE,                                    // 0
-    
+
     // ----- EncKrbPrivPart component --------------------------------------
-    
+
     ENC_KRB_PRIV_PART_TAG_STATE,                    // 2
-    
+
     ENC_KRB_PRIV_PART_SEQ_TAG_STATE,                // 3
-    
+
     ENC_KRB_PRIV_PART_USER_DATA_TAG_STATE,          // 4
     ENC_KRB_PRIV_PART_USER_DATA_STATE,              // 5
-    
+
     ENC_KRB_PRIV_PART_TIMESTAMP_TAG_STATE,          // 5
     ENC_KRB_PRIV_PART_TIMESTAMP_STATE,              // 6
-    
+
     ENC_KRB_PRIV_PART_USEC_TAG_STATE,               // 7
     ENC_KRB_PRIV_PART_USEC_STATE,                   // 8
-    
+
     ENC_KRB_PRIV_PART_SEQ_NUMBER_TAG_STATE,         // 9
     ENC_KRB_PRIV_PART_SEQ_NUMBER_STATE,             // 10
-    
+
     ENC_KRB_PRIV_PART_SENDER_ADDRESS_TAG_STATE,     // 11
-    
+
     ENC_KRB_PRIV_PART_RECIPIENT_ADDRESS_TAG_STATE,  // 12
 
     // End
     LAST_ENC_KRB_PRIV_PART_STATE;                   // 13
 
-    
+
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar code
      * @return The grammar name
      */
@@ -75,11 +75,11 @@ public enum EncKrbPrivPartStatesEnum imp
 
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar class
      * @return The grammar name
      */
-    public String getGrammarName( Grammar grammar )
+    public String getGrammarName( Grammar<EncKrbPrivPartContainer> grammar )
     {
         if ( grammar instanceof EncKrbPrivPartGrammar )
         {
@@ -94,7 +94,7 @@ public enum EncKrbPrivPartStatesEnum imp
 
     /**
      * Get the string representing the state
-     * 
+     *
      * @param state The state number
      * @return The String representing the state
      */
@@ -103,7 +103,7 @@ public enum EncKrbPrivPartStatesEnum imp
         return ( ( state == LAST_ENC_KRB_PRIV_PART_STATE.ordinal() ) ? "LAST_ENC_KRB_PRIV_PART_STATE" : name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -111,8 +111,8 @@ public enum EncKrbPrivPartStatesEnum imp
     {
         return this == LAST_ENC_KRB_PRIV_PART_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/EncKrbPrivPartInit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/EncKrbPrivPartInit.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/EncKrbPrivPartInit.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/EncKrbPrivPartInit.java Mon Feb  7 20:49:04 2011
@@ -6,22 +6,21 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbPrivPart.actions;
 
 
 import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.i18n.I18n;
@@ -33,10 +32,10 @@ import org.slf4j.LoggerFactory;
 
 /**
  * The action used to initialize the EncKrbPrivPart object
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class EncKrbPrivPartInit extends GrammarAction
+public class EncKrbPrivPartInit extends GrammarAction<EncKrbPrivPartContainer>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( EncKrbPrivPartInit.class );
@@ -57,10 +56,8 @@ public class EncKrbPrivPartInit extends 
     /**
      * {@inheritDoc}
      */
-    public void action( Asn1Container container ) throws DecoderException
+    public void action( EncKrbPrivPartContainer encKrbPrivPartContainer ) throws DecoderException
     {
-        EncKrbPrivPartContainer encKrbPrivPartContainer = ( EncKrbPrivPartContainer ) container;
-
         TLV tlv = encKrbPrivPartContainer.getCurrentTLV();
 
         // The Length should not be null
@@ -71,10 +68,10 @@ public class EncKrbPrivPartInit extends 
             // This will generate a PROTOCOL_ERROR
             throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
         }
-        
+
         EncKrbPrivPart encKrbPrivPart = new EncKrbPrivPart();
         encKrbPrivPartContainer.setEncKrbPrivPart( encKrbPrivPart );
-        
+
         if ( IS_DEBUG )
         {
             LOG.debug( "EncKrbPrivPart created" );

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreRecipientAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreRecipientAddress.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreRecipientAddress.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreRecipientAddress.java Mon Feb  7 20:49:04 2011
@@ -21,7 +21,6 @@
 package org.apache.directory.shared.kerberos.codec.encKrbPrivPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadHostAddress;
 import org.apache.directory.shared.kerberos.codec.encKrbPrivPart.EncKrbPrivPartContainer;
 import org.apache.directory.shared.kerberos.components.HostAddress;
@@ -32,7 +31,7 @@ import org.apache.directory.shared.kerbe
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreRecipientAddress extends AbstractReadHostAddress
+public class StoreRecipientAddress extends AbstractReadHostAddress<EncKrbPrivPartContainer>
 {
     public StoreRecipientAddress()
     {
@@ -44,11 +43,10 @@ public class StoreRecipientAddress exten
      * {@inheritDoc}
      */
     @Override
-    protected void setAddress( HostAddress hostAddress, Asn1Container container )
+    protected void setAddress( HostAddress hostAddress, EncKrbPrivPartContainer encKrbPrivPartContainer )
     {
-        EncKrbPrivPartContainer encKrbPrivPartContainer = ( EncKrbPrivPartContainer ) container;
         encKrbPrivPartContainer.getEncKrbPrivPart().setRecipientAddress( hostAddress );
-        
-        container.setGrammarEndAllowed( true );
+
+        encKrbPrivPartContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreSenderAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreSenderAddress.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreSenderAddress.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreSenderAddress.java Mon Feb  7 20:49:04 2011
@@ -21,7 +21,6 @@
 package org.apache.directory.shared.kerberos.codec.encKrbPrivPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadHostAddress;
 import org.apache.directory.shared.kerberos.codec.encKrbPrivPart.EncKrbPrivPartContainer;
 import org.apache.directory.shared.kerberos.components.HostAddress;
@@ -32,7 +31,7 @@ import org.apache.directory.shared.kerbe
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreSenderAddress extends AbstractReadHostAddress
+public class StoreSenderAddress extends AbstractReadHostAddress<EncKrbPrivPartContainer>
 {
     public StoreSenderAddress()
     {
@@ -44,11 +43,10 @@ public class StoreSenderAddress extends 
      * {@inheritDoc}
      */
     @Override
-    protected void setAddress( HostAddress hostAddress, Asn1Container container )
+    protected void setAddress( HostAddress hostAddress, EncKrbPrivPartContainer encKrbPrivPartContainer )
     {
-        EncKrbPrivPartContainer encKrbPrivPartContainer = ( EncKrbPrivPartContainer ) container;
         encKrbPrivPartContainer.getEncKrbPrivPart().setSenderAddress( hostAddress );
-        
-        container.setGrammarEndAllowed( true );
+
+        encKrbPrivPartContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreSeqNumber.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreSeqNumber.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreSeqNumber.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreSeqNumber.java Mon Feb  7 20:49:04 2011
@@ -6,31 +6,30 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbPrivPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.actions.AbstractReadInteger;
 import org.apache.directory.shared.kerberos.codec.encKrbPrivPart.EncKrbPrivPartContainer;
 
 
 /**
  * The action used to store the EncKrbPrivPart seq-number
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreSeqNumber extends AbstractReadInteger
+public class StoreSeqNumber extends AbstractReadInteger<EncKrbPrivPartContainer>
 {
 
     /**
@@ -46,9 +45,8 @@ public class StoreSeqNumber extends Abst
      * {@inheritDoc}
      */
     @Override
-    protected void setIntegerValue( int value, Asn1Container container )
+    protected void setIntegerValue( int value, EncKrbPrivPartContainer encKrbPrivPartContainer )
     {
-        EncKrbPrivPartContainer encKrbPrivPartContainer = ( EncKrbPrivPartContainer ) container;
         encKrbPrivPartContainer.getEncKrbPrivPart().setSeqNumber( value );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreTimestamp.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreTimestamp.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreTimestamp.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreTimestamp.java Mon Feb  7 20:49:04 2011
@@ -6,21 +6,20 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbPrivPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
 import org.apache.directory.shared.kerberos.codec.encKrbPrivPart.EncKrbPrivPartContainer;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the EncKrbPrivPart timemstamp
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreTimestamp extends AbstractReadKerberosTime
+public class StoreTimestamp extends AbstractReadKerberosTime<EncKrbPrivPartContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreTimestamp extends Abst
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, EncKrbPrivPartContainer encKrbPrivPartContainer )
     {
-        EncKrbPrivPartContainer encKrbPrivPartContainer = ( EncKrbPrivPartContainer ) container;
         encKrbPrivPartContainer.getEncKrbPrivPart().setTimestamp( krbtime );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreUsec.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreUsec.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreUsec.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encKrbPrivPart/actions/StoreUsec.java Mon Feb  7 20:49:04 2011
@@ -6,31 +6,30 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.kerberos.codec.encKrbPrivPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.actions.AbstractReadInteger;
 import org.apache.directory.shared.kerberos.codec.encKrbPrivPart.EncKrbPrivPartContainer;
 
 
 /**
  * The action used to store the EncKrbPrivPart usec
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreUsec extends AbstractReadInteger
+public class StoreUsec extends AbstractReadInteger<EncKrbPrivPartContainer>
 {
 
     /**
@@ -46,10 +45,8 @@ public class StoreUsec extends AbstractR
      * {@inheritDoc}
      */
     @Override
-    protected void setIntegerValue( int value, Asn1Container container )
+    protected void setIntegerValue( int value, EncKrbPrivPartContainer encKrbPrivPartContainer )
     {
-        EncKrbPrivPartContainer encKrbPrivPartContainer = ( EncKrbPrivPartContainer ) container;
         encKrbPrivPartContainer.getEncKrbPrivPart().setUsec( value );
     }
-
 }



Mime
View raw message