directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1068124 [2/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/EncKdcRepPart/EncKdcRepPartGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartGrammar.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartGrammar.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartGrammar.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.EncKdcRepPart;
 
@@ -47,10 +47,10 @@ import org.slf4j.LoggerFactory;
  * This class implements the EncKdcRepPart 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 EncKdcRepPartGrammar extends AbstractGrammar
+public final class EncKdcRepPartGrammar extends AbstractGrammar<EncKdcRepPartContainer>
 {
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( EncKdcRepPartGrammar.class );
@@ -59,12 +59,13 @@ public final class EncKdcRepPartGrammar 
     static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
     /** The instance of grammar. EncKdcRepPartGrammar is a singleton */
-    private static Grammar instance = new EncKdcRepPartGrammar();
+    private static Grammar<EncKdcRepPartContainer> instance = new EncKdcRepPartGrammar();
 
 
     /**
      * Creates a new EncKdcRepPartGrammar object.
      */
+    @SuppressWarnings("unchecked")
     private EncKdcRepPartGrammar()
     {
         setName( EncKdcRepPartGrammar.class.getName() );
@@ -73,235 +74,304 @@ public final class EncKdcRepPartGrammar 
         super.transitions = new GrammarTransition[EncKdcRepPartStatesEnum.LAST_ENC_KDC_REP_PART_STATE.ordinal()][256];
 
         // ============================================================================================
-        // EncKdcRepPart 
+        // EncKdcRepPart
         // ============================================================================================
         // --------------------------------------------------------------------------------------------
         // Transition from EncKdcRepPart init to EncKdcRepPart tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
-        super.transitions[EncKdcRepPartStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.START_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SEQ_TAG_STATE, UniversalTag.SEQUENCE.getValue(),
-            new EncKdcRepPartInit() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.START_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SEQ_TAG_STATE,
+                UniversalTag.SEQUENCE.getValue(),
+                new EncKdcRepPartInit() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from EncKdcRepPart tag to key
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         key             [0] EncryptionKey,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SEQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_KEY_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SEQ_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_KEY_TAG,
-            new StoreKey() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SEQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_KEY_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SEQ_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_KEY_TAG,
+                new StoreKey() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from key to last-req
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         last-req        [1] LastReq,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_LAST_REQ_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_LAST_REQ_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_LAST_REQ_TAG,
-            new StoreLastReq() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_LAST_REQ_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_LAST_REQ_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_LAST_REQ_TAG,
+                new StoreLastReq() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from last-req to nonce tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         nonce           [2]
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_LAST_REQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_NONCE_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_LAST_REQ_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_NONCE_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_LAST_REQ_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_NONCE_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_LAST_REQ_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_NONCE_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from nonce tag to nonce value
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         nonce           [2] UInt32,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE, UniversalTag.INTEGER.getValue(),
-            new StoreNonce() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE,
+                UniversalTag.INTEGER.getValue(),
+                new StoreNonce() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from nonce value to key-expiration tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         key-expiration  [3]
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from nonce value to flags tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         flags           [4]
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_NONCE_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from key-expiration tag to key-expiration value
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         key-expiration  [3] KerberosTime OPTIONAL,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreKeyExpiration() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_STATE,
+                UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreKeyExpiration() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from key-expiration value to flags tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         flags           [4]
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_KEY_EXPIRATION_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_FLAGS_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from flags tag to flags value
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         flags           [4] TicketFlags,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE.ordinal()][UniversalTag.BIT_STRING.getValue()] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_STATE, UniversalTag.BIT_STRING.getValue(),
-            new StoreFlags() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE.ordinal()][UniversalTag.BIT_STRING.getValue()] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_STATE,
+                UniversalTag.BIT_STRING.getValue(),
+                new StoreFlags() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from flags value to authtime tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         authtime        [5]
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_AUTH_TIME_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_AUTH_TIME_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_AUTH_TIME_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_FLAGS_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_AUTH_TIME_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from authtime tag to authtime value
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         authtime        [5] KerberosTime,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreAuthTime() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE,
+                UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreAuthTime() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from authtime value to starttime tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         starttime       [6]
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_START_TIME_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_START_TIME_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_START_TIME_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_START_TIME_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from authtime value to endtime tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
-        //         endtime         [7] 
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG,
-            new CheckNotNullLength() );
-        
+        //         endtime         [7]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_AUTH_TIME_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from starttime tag to starttime value
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         starttime       [6] KerberosTime OPTIONAL,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreStartTime() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_STATE,
+                UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreStartTime() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from starttime value to endtime tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
-        //         endtime         [7] 
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG,
-            new CheckNotNullLength() );
-        
+        //         endtime         [7]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_START_TIME_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_END_TIME_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from endtime tag to endtime value
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         endtime         [7] KerberosTime,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreEndTime() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE,
+                UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreEndTime() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from endtime value to renew-till tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
-        //         renew-till      [8] 
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_RENEW_TILL_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_RENEW_TILL_TAG,
-            new CheckNotNullLength() );
-        
+        //         renew-till      [8]
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_RENEW_TILL_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_RENEW_TILL_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from endtime value to srealm tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         srealm          [9]
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_END_TIME_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from renew-till tag to renew-till value
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         renew-till      [8] KerberosTime OPTIONAL,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
-            new StoreRenewTill() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_STATE,
+                UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreRenewTill() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from renew-till value to srealm tag
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         srealm          [9]
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_RENEW_TILL_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_SREALM_TAG,
+                new CheckNotNullLength<EncKdcRepPartContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from srealm tag to srealm value
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         srealm          [9] Realm,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_STATE, UniversalTag.GENERAL_STRING.getValue(),
-            new StoreSRealm() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_STATE,
+                UniversalTag.GENERAL_STRING.getValue(),
+                new StoreSRealm() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from srealm value to sname
         // --------------------------------------------------------------------------------------------
         // EncKDCRepPart   ::= SEQUENCE {
         //         ...
         //         sname           [10] PrincipalName,
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_SNAME_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SNAME_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_SNAME_TAG,
-            new StoreSName() );
-        
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_SNAME_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SREALM_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SNAME_TAG_STATE,
+                KerberosConstants.ENC_KDC_REP_PART_SNAME_TAG,
+                new StoreSName() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from sname to caddr
         // --------------------------------------------------------------------------------------------
@@ -309,18 +379,20 @@ public final class EncKdcRepPartGrammar 
         //         ...
         //         caddr           [11] <HostAddresses> OPTIONAL
         // }
-        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SNAME_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_CADDR_TAG] = new GrammarTransition(
-            EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SNAME_TAG_STATE, EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_CADDR_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_CADDR_TAG,
-            new StoreCAddr() );
+        super.transitions[EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SNAME_TAG_STATE.ordinal()][KerberosConstants.ENC_KDC_REP_PART_CADDR_TAG] =
+            new GrammarTransition<EncKdcRepPartContainer>(
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_SNAME_TAG_STATE,
+                EncKdcRepPartStatesEnum.ENC_KDC_REP_PART_CADDR_TAG_STATE, KerberosConstants.ENC_KDC_REP_PART_CADDR_TAG,
+                new StoreCAddr() );
     }
 
 
     /**
      * Get the instance of this grammar
-     * 
+     *
      * @return An instance on the EncKdcRepPart Grammar
      */
-    public static Grammar getInstance()
+    public static Grammar<EncKdcRepPartContainer> getInstance()
     {
         return instance;
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartStatesEnum.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartStatesEnum.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/EncKdcRepPartStatesEnum.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.EncKdcRepPart;
 
@@ -27,20 +27,20 @@ import org.apache.directory.shared.asn1.
 /**
  * This class stores the EncKdcRepPart grammar's constants. It is also used for debugging
  * purpose
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum EncKdcRepPartStatesEnum implements States
 {
     // Start
     START_STATE,                                // 0
-    
+
     // ----- EncKdcRepPart component --------------------------------------
-    
+
     ENC_KDC_REP_PART_SEQ_TAG_STATE,             // 1
-    
+
     ENC_KDC_REP_PART_KEY_TAG_STATE,             // 2
-    
+
     ENC_KDC_REP_PART_LAST_REQ_TAG_STATE,        // 3
 
     ENC_KDC_REP_PART_NONCE_TAG_STATE,           // 4
@@ -70,14 +70,14 @@ public enum EncKdcRepPartStatesEnum impl
     ENC_KDC_REP_PART_SNAME_TAG_STATE,           // 20
 
     ENC_KDC_REP_PART_CADDR_TAG_STATE,           // 21
-    
+
     // End
     LAST_ENC_KDC_REP_PART_STATE;                // 22
 
-    
+
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar code
      * @return The grammar name
      */
@@ -89,11 +89,11 @@ public enum EncKdcRepPartStatesEnum impl
 
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar class
      * @return The grammar name
      */
-    public String getGrammarName( Grammar grammar )
+    public String getGrammarName( Grammar<EncKdcRepPartContainer> grammar )
     {
         if ( grammar instanceof EncKdcRepPartGrammar )
         {
@@ -108,7 +108,7 @@ public enum EncKdcRepPartStatesEnum impl
 
     /**
      * Get the string representing the state
-     * 
+     *
      * @param state The state number
      * @return The String representing the state
      */
@@ -117,7 +117,7 @@ public enum EncKdcRepPartStatesEnum impl
         return ( ( state == LAST_ENC_KDC_REP_PART_STATE.ordinal() ) ? "LAST_ENC_KDC_REP_PART_STATE" : name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -125,8 +125,8 @@ public enum EncKdcRepPartStatesEnum impl
     {
         return this == LAST_ENC_KDC_REP_PART_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/EncKdcRepPartInit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/EncKdcRepPartInit.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/EncKdcRepPartInit.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/EncKdcRepPartInit.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.EncKdcRepPart.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 EncKdcRepPart object
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class EncKdcRepPartInit extends GrammarAction
+public class EncKdcRepPartInit extends GrammarAction<EncKdcRepPartContainer>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( EncKdcRepPart.class );
@@ -57,10 +56,8 @@ public class EncKdcRepPartInit extends G
     /**
      * {@inheritDoc}
      */
-    public void action( Asn1Container container ) throws DecoderException
+    public void action( EncKdcRepPartContainer encKdcRepPartContainer ) throws DecoderException
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
-
         TLV tlv = encKdcRepPartContainer.getCurrentTLV();
 
         // The Length should not be null
@@ -71,10 +68,10 @@ public class EncKdcRepPartInit extends G
             // This will generate a PROTOCOL_ERROR
             throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
         }
-        
+
         EncKdcRepPart encKdcRepPart = new EncKdcRepPart();
         encKdcRepPartContainer.setEncKdcRepPart( encKdcRepPart );
-        
+
         if ( IS_DEBUG )
         {
             LOG.debug( "EncKdcRepPart created" );

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreAuthTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreAuthTime.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreAuthTime.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreAuthTime.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the EncKdcRepPart auth time
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreAuthTime extends AbstractReadKerberosTime
+public class StoreAuthTime extends AbstractReadKerberosTime<EncKdcRepPartContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreAuthTime extends Abstr
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
         encKdcRepPartContainer.getEncKdcRepPart().setAuthTime( krbtime );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreCAddr.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreCAddr.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreCAddr.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreCAddr.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadHostAddresses;
 import org.apache.directory.shared.kerberos.components.HostAddresses;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the caddr of EncKdcRepPart
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreCAddr extends AbstractReadHostAddresses
+public class StoreCAddr extends AbstractReadHostAddresses<EncKdcRepPartContainer>
 {
     /**
      * Instantiates a new StoreAddresses action.
@@ -46,10 +45,9 @@ public class StoreCAddr extends Abstract
      * {@inheritDoc}
      */
     @Override
-    protected void setHostAddresses( HostAddresses hostAddresses, Asn1Container container )
+    protected void setHostAddresses( HostAddresses hostAddresses, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
         encKdcRepPartContainer.getEncKdcRepPart().setClientAddresses( hostAddresses );
-        container.setGrammarEndAllowed( true );
+        encKdcRepPartContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreEndTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreEndTime.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreEndTime.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreEndTime.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the EncKdcRepPart end time
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreEndTime extends AbstractReadKerberosTime
+public class StoreEndTime extends AbstractReadKerberosTime<EncKdcRepPartContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreEndTime extends Abstra
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
         encKdcRepPartContainer.getEncKdcRepPart().setEndTime( krbtime );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreFlags.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreFlags.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreFlags.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreFlags.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.actions.AbstractReadBitString;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.components.EncKdcRepPart;
@@ -29,10 +28,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the TicketFlags
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreFlags extends AbstractReadBitString
+public class StoreFlags extends AbstractReadBitString<EncKdcRepPartContainer>
 {
 
     /**
@@ -48,12 +47,11 @@ public class StoreFlags extends Abstract
      * {@inheritDoc}
      */
     @Override
-    protected void setBitString( byte[] data, Asn1Container container )
+    protected void setBitString( byte[] data, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
         EncKdcRepPart encKdcRepPart = encKdcRepPartContainer.getEncKdcRepPart();
         TicketFlags flags = new TicketFlags( data );
-        
+
         encKdcRepPart.setFlags( flags );
 
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKey.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKey.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKey.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKey.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadEncryptionKey;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to set the EncKdcRepPart key
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreKey extends AbstractReadEncryptionKey
+public class StoreKey extends AbstractReadEncryptionKey<EncKdcRepPartContainer>
 {
     /**
      * Instantiates a new StoreKey action.
@@ -46,9 +45,8 @@ public class StoreKey extends AbstractRe
      * {@inheritDoc}
      */
     @Override
-    protected void setEncryptionKey( EncryptionKey encryptionKey, Asn1Container container )
+    protected void setEncryptionKey( EncryptionKey encryptionKey, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer EncKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
-        EncKdcRepPartContainer.getEncKdcRepPart().setKey( encryptionKey );
+        encKdcRepPartContainer.getEncKdcRepPart().setKey( encryptionKey );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKeyExpiration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKeyExpiration.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKeyExpiration.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreKeyExpiration.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the EncKdcRepPart key expiration
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreKeyExpiration extends AbstractReadKerberosTime
+public class StoreKeyExpiration extends AbstractReadKerberosTime<EncKdcRepPartContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreKeyExpiration extends 
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
         encKdcRepPartContainer.getEncKdcRepPart().setKeyExpiration( krbtime );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreLastReq.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.EncKdcRepPart.actions;
 
 
 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;
@@ -35,10 +34,10 @@ import org.slf4j.LoggerFactory;
 
 /**
  * The action used to set the LastReq
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreLastReq extends GrammarAction
+public class StoreLastReq extends GrammarAction<EncKdcRepPartContainer>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( StoreLastReq.class );
@@ -59,9 +58,9 @@ public class StoreLastReq extends Gramma
     /**
      * {@inheritDoc}
      */
-    public final void action( Asn1Container container ) throws DecoderException
+    public final void action( EncKdcRepPartContainer encKdcRepPartContainer ) throws DecoderException
     {
-        TLV tlv = container.getCurrentTLV();
+        TLV tlv = encKdcRepPartContainer.getCurrentTLV();
 
         // The Length should not be null
         if ( tlv.getLength() == 0 )
@@ -80,7 +79,7 @@ public class StoreLastReq extends Gramma
         // Decode the LastReq PDU
         try
         {
-            lastReqDecoder.decode( container.getStream(), lastReqContainer );
+            lastReqDecoder.decode( encKdcRepPartContainer.getStream(), lastReqContainer );
         }
         catch ( DecoderException de )
         {
@@ -94,12 +93,12 @@ public class StoreLastReq extends Gramma
             LOG.debug( "LastReq : " + lastReq );
         }
 
-        ((EncKdcRepPartContainer)container).getEncKdcRepPart().setLastReq( lastReq );
-        
+        encKdcRepPartContainer.getEncKdcRepPart().setLastReq( lastReq );
+
         // Update the expected length for the current TLV
         tlv.setExpectedLength( tlv.getExpectedLength() - tlv.getLength() );
 
         // Update the parent
-        container.updateParent();
+        encKdcRepPartContainer.updateParent();
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreNonce.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/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/EncKdcRepPart/actions/StoreNonce.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.actions.AbstractReadInteger;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 
 
 /**
  * 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<EncKdcRepPartContainer>
 {
     /**
      * Instantiates a new StoreNonce action.
@@ -44,10 +43,9 @@ public class StoreNonce extends Abstract
     /**
      * {@inheritDoc}
      */
-    public void setIntegerValue( int value, Asn1Container container )
+    @Override
+    public void setIntegerValue( int value, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
-
         encKdcRepPartContainer.getEncKdcRepPart().setNonce( value );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreRenewTill.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreRenewTill.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreRenewTill.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreRenewTill.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the EncKdcRepPart renew till
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreRenewTill extends AbstractReadKerberosTime
+public class StoreRenewTill extends AbstractReadKerberosTime<EncKdcRepPartContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreRenewTill extends Abst
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
         encKdcRepPartContainer.getEncKdcRepPart().setRenewTill( krbtime );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSName.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSName.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSName.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadPrincipalName;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the SName
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreSName extends AbstractReadPrincipalName
+public class StoreSName extends AbstractReadPrincipalName<EncKdcRepPartContainer>
 {
     /**
      * Instantiates a new StoreSName action.
@@ -46,9 +45,8 @@ public class StoreSName extends Abstract
      * {@inheritDoc}
      */
     @Override
-    protected void setPrincipalName( PrincipalName principalName, Asn1Container container )
+    protected void setPrincipalName( PrincipalName principalName, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
         encKdcRepPartContainer.getEncKdcRepPart().setSName( principalName );
         encKdcRepPartContainer.setGrammarEndAllowed( true );
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreSRealm.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadRealm;
 
 
 /**
  * The action used to set the srealm
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreSRealm extends AbstractReadRealm
+public class StoreSRealm extends AbstractReadRealm<EncKdcRepPartContainer>
 {
     /**
      * Instantiates a new StoreSRealm action.
@@ -45,9 +44,8 @@ public class StoreSRealm extends Abstrac
      * {@inheritDoc}
      */
     @Override
-    protected void setRealm( String srealm, Asn1Container container )
+    protected void setRealm( String srealm, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
         encKdcRepPartContainer.getEncKdcRepPart().setSRealm( srealm );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreStartTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreStartTime.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreStartTime.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/EncKdcRepPart/actions/StoreStartTime.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.EncKdcRepPart.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.KerberosTime;
 import org.apache.directory.shared.kerberos.codec.EncKdcRepPart.EncKdcRepPartContainer;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadKerberosTime;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the EncKdcRepPart start time
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreStartTime extends AbstractReadKerberosTime
+public class StoreStartTime extends AbstractReadKerberosTime<EncKdcRepPartContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreStartTime extends Abst
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, EncKdcRepPartContainer encKdcRepPartContainer )
     {
-        EncKdcRepPartContainer encKdcRepPartContainer = ( EncKdcRepPartContainer ) container;
         encKdcRepPartContainer.getEncKdcRepPart().setStartTime( krbtime );
     }
 }



Mime
View raw message