directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1068124 [14/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/d...
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/krbCredInfo/actions/StoreAuthTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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/krbCredInfo/actions/StoreAuthTime.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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.krbCredInfo.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.krbCredInfo.KrbCredInfoContainer;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the KrbCredInfo authtime
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreAuthTime extends AbstractReadKerberosTime
+public class StoreAuthTime extends AbstractReadKerberosTime<KrbCredInfoContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreAuthTime extends Abstr
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, KrbCredInfoContainer krbCredInfoContainer )
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
         krbCredInfoContainer.getKrbCredInfo().setAuthTime( krbtime );
         krbCredInfoContainer.setGrammarEndAllowed( true );
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreCaddr.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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/krbCredInfo/actions/StoreCaddr.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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.krbCredInfo.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadHostAddresses;
 import org.apache.directory.shared.kerberos.codec.krbCredInfo.KrbCredInfoContainer;
 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 KrbCredInfo
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreCaddr extends AbstractReadHostAddresses
+public class StoreCaddr extends AbstractReadHostAddresses<KrbCredInfoContainer>
 {
     /**
      * 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, KrbCredInfoContainer krbCredInfoContainer )
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
         krbCredInfoContainer.getKrbCredInfo().setClientAddresses( hostAddresses );
-        container.setGrammarEndAllowed( true );
+        krbCredInfoContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreEndTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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/krbCredInfo/actions/StoreEndTime.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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.krbCredInfo.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.krbCredInfo.KrbCredInfoContainer;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the KrbCredInfo endtime
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreEndTime extends AbstractReadKerberosTime
+public class StoreEndTime extends AbstractReadKerberosTime<KrbCredInfoContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreEndTime extends Abstra
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, KrbCredInfoContainer krbCredInfoContainer )
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
         krbCredInfoContainer.getKrbCredInfo().setEndTime( krbtime );
         krbCredInfoContainer.setGrammarEndAllowed( true );
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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/krbCredInfo/actions/StoreFlags.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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.krbCredInfo.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.actions.AbstractReadBitString;
 import org.apache.directory.shared.kerberos.codec.krbCredInfo.KrbCredInfoContainer;
 import org.apache.directory.shared.kerberos.flags.TicketFlags;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the flags
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreFlags extends AbstractReadBitString
+public class StoreFlags extends AbstractReadBitString<KrbCredInfoContainer>
 {
 
     /**
@@ -47,10 +46,9 @@ public class StoreFlags extends Abstract
      * {@inheritDoc}
      */
     @Override
-    protected void setBitString( byte[] data, Asn1Container container )
+    protected void setBitString( byte[] data, KrbCredInfoContainer krbCredInfoContainer )
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
         krbCredInfoContainer.getKrbCredInfo().setTicketFlags( new TicketFlags( data ) );
-        container.setGrammarEndAllowed( true );
+        krbCredInfoContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreKey.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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/krbCredInfo/actions/StoreKey.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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.krbCredInfo.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadEncryptionKey;
 import org.apache.directory.shared.kerberos.codec.krbCredInfo.KrbCredInfoContainer;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to set the KrbCredInfo key
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreKey extends AbstractReadEncryptionKey
+public class StoreKey extends AbstractReadEncryptionKey<KrbCredInfoContainer>
 {
     /**
      * 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, KrbCredInfoContainer krbCredInfoContainer )
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
         krbCredInfoContainer.getKrbCredInfo().setKey( encryptionKey );
         krbCredInfoContainer.setGrammarEndAllowed( true );
     }

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

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

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreRenewtill.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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/krbCredInfo/actions/StoreRenewtill.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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.krbCredInfo.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.krbCredInfo.KrbCredInfoContainer;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the KrbCredInfo renewtill
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreRenewtill extends AbstractReadKerberosTime
+public class StoreRenewtill extends AbstractReadKerberosTime<KrbCredInfoContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreRenewtill extends Abst
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, KrbCredInfoContainer krbCredInfoContainer )
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
         krbCredInfoContainer.getKrbCredInfo().setRenewtill( krbtime );
         krbCredInfoContainer.setGrammarEndAllowed( true );
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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/krbCredInfo/actions/StoreSName.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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.krbCredInfo.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadPrincipalName;
 import org.apache.directory.shared.kerberos.codec.krbCredInfo.KrbCredInfoContainer;
 import org.apache.directory.shared.kerberos.components.PrincipalName;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to set the KrbCredInfo sName
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreSName extends AbstractReadPrincipalName
+public class StoreSName extends AbstractReadPrincipalName<KrbCredInfoContainer>
 {
     /**
      * Instantiates a new StoreSName action.
@@ -46,10 +45,9 @@ public class StoreSName extends Abstract
      * {@inheritDoc}
      */
     @Override
-    protected void setPrincipalName( PrincipalName principalName, Asn1Container container )
+    protected void setPrincipalName( PrincipalName principalName, KrbCredInfoContainer krbCredInfoContainer )
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
         krbCredInfoContainer.getKrbCredInfo().setsName( principalName );
-        container.setGrammarEndAllowed( true );
+        krbCredInfoContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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/krbCredInfo/actions/StoreSRealm.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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.krbCredInfo.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadRealm;
 import org.apache.directory.shared.kerberos.codec.krbCredInfo.KrbCredInfoContainer;
 
 
 /**
  * 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<KrbCredInfoContainer>
 {
     /**
      * Instantiates a new StoreSRealm action.
@@ -45,10 +44,9 @@ public class StoreSRealm extends Abstrac
      * {@inheritDoc}
      */
     @Override
-    protected void setRealm( String realm, Asn1Container container )
+    protected void setRealm( String realm, KrbCredInfoContainer krbCredInfoContainer )
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
         krbCredInfoContainer.getKrbCredInfo().setsRealm( realm );
-        container.setGrammarEndAllowed( true );
+        krbCredInfoContainer.setGrammarEndAllowed( true );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreStartTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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/krbCredInfo/actions/StoreStartTime.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/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.krbCredInfo.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.krbCredInfo.KrbCredInfoContainer;
@@ -28,10 +27,10 @@ import org.apache.directory.shared.kerbe
 
 /**
  * The action used to store the KrbCredInfo starttime
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreStartTime extends AbstractReadKerberosTime
+public class StoreStartTime extends AbstractReadKerberosTime<KrbCredInfoContainer>
 {
 
     /**
@@ -47,9 +46,8 @@ public class StoreStartTime extends Abst
      * {@inheritDoc}
      */
     @Override
-    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    protected void setKerberosTime( KerberosTime krbtime, KrbCredInfoContainer krbCredInfoContainer )
     {
-        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
         krbCredInfoContainer.getKrbCredInfo().setStartTime( krbtime );
         krbCredInfoContainer.setGrammarEndAllowed( true );
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/KrbErrorGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/KrbErrorGrammar.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/KrbErrorGrammar.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/KrbErrorGrammar.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.krbError;
 
@@ -48,10 +48,10 @@ import org.slf4j.LoggerFactory;
  * This class implements the KrbError 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 KrbErrorGrammar extends AbstractGrammar
+public final class KrbErrorGrammar extends AbstractGrammar<KrbErrorContainer>
 {
     /** The logger */
     static final Logger LOG = LoggerFactory.getLogger( KrbErrorGrammar.class );
@@ -60,12 +60,13 @@ public final class KrbErrorGrammar exten
     static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
     /** The instance of grammar. KrbErrorGrammar is a singleton */
-    private static Grammar instance = new KrbErrorGrammar();
+    private static Grammar<KrbErrorContainer> instance = new KrbErrorGrammar();
 
 
     /**
      * Creates a new KrbErrorGrammar object.
      */
+    @SuppressWarnings("unchecked")
     private KrbErrorGrammar()
     {
         setName( KrbErrorGrammar.class.getName() );
@@ -74,244 +75,304 @@ public final class KrbErrorGrammar exten
         super.transitions = new GrammarTransition[KrbErrorStatesEnum.LAST_KRB_ERR_STATE.ordinal()][256];
 
         // ============================================================================================
-        // KrbError 
+        // KrbError
         // ============================================================================================
         // --------------------------------------------------------------------------------------------
         // Transition from KrbError init to KrbError tag
         // --------------------------------------------------------------------------------------------
         // KRB-ERROR       ::= [APPLICATION 30]
-        super.transitions[KrbErrorStatesEnum.START_STATE.ordinal()][KerberosConstants.KRB_ERROR_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.START_STATE, KrbErrorStatesEnum.KRB_ERR_TAG, KerberosConstants.KRB_ERROR_TAG,
-            new KrbErrorInit() );
-        
+        super.transitions[KrbErrorStatesEnum.START_STATE.ordinal()][KerberosConstants.KRB_ERROR_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.START_STATE, KrbErrorStatesEnum.KRB_ERR_TAG,
+                KerberosConstants.KRB_ERROR_TAG,
+                new KrbErrorInit() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from KrbError tag to KrbError SEQ
         // --------------------------------------------------------------------------------------------
         // KRB-ERROR       ::= [APPLICATION 30] SEQUENCE {
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_TAG.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_TAG, KrbErrorStatesEnum.KRB_ERR_SEQ_STATE, UniversalTag.SEQUENCE.getValue(),
-            new CheckNotNullLength() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_TAG.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_TAG,
+                KrbErrorStatesEnum.KRB_ERR_SEQ_STATE,
+                UniversalTag.SEQUENCE.getValue(),
+                new CheckNotNullLength<KrbErrorContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from KrbError SEQ to pvno tag
         // --------------------------------------------------------------------------------------------
         // KRB-ERROR         ::= SEQUENCE {
         //         pvno            [0]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_SEQ_STATE.ordinal()][KerberosConstants.KRB_ERROR_PVNO_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_SEQ_STATE, KrbErrorStatesEnum.KRB_ERR_PVNO_TAG_STATE, KerberosConstants.KRB_ERROR_PVNO_TAG,
-            new CheckNotNullLength() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_SEQ_STATE.ordinal()][KerberosConstants.KRB_ERROR_PVNO_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_SEQ_STATE, KrbErrorStatesEnum.KRB_ERR_PVNO_TAG_STATE,
+                KerberosConstants.KRB_ERROR_PVNO_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from pvno tag to pvno value
         // --------------------------------------------------------------------------------------------
         // KRB-ERROR         ::= SEQUENCE {
         //         pvno            [0] INTEGER (5) ,
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_PVNO_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_PVNO_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_PVNO_STATE, UniversalTag.INTEGER.getValue(),
-            new StorePvno() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_PVNO_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_PVNO_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_PVNO_STATE,
+                UniversalTag.INTEGER.getValue(),
+                new StorePvno() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from pvno to msg-type tag
         // --------------------------------------------------------------------------------------------
         // msg-type        [1]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_PVNO_STATE.ordinal()][KerberosConstants.KRB_ERROR_MSGTYPE_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_PVNO_STATE, KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_TAG_STATE, KerberosConstants.KRB_ERROR_MSGTYPE_TAG, 
-            new CheckNotNullLength() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_PVNO_STATE.ordinal()][KerberosConstants.KRB_ERROR_MSGTYPE_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_PVNO_STATE, KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_TAG_STATE,
+                KerberosConstants.KRB_ERROR_MSGTYPE_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from msg-type tag to msg-type value
         // --------------------------------------------------------------------------------------------
         // msg-type        [1] INTEGER (30)
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE, UniversalTag.INTEGER.getValue(), 
-            new CheckMsgType() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE,
+                UniversalTag.INTEGER.getValue(),
+                new CheckMsgType() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from msg-type value to cTime tag
         // --------------------------------------------------------------------------------------------
         // ctime        [2]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE.ordinal()][KerberosConstants.KRB_ERROR_CTIME_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE, KrbErrorStatesEnum.KRB_ERR_CTIME_TAG_STATE, KerberosConstants.KRB_ERROR_CTIME_TAG, 
-            new CheckNotNullLength());
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE.ordinal()][KerberosConstants.KRB_ERROR_CTIME_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE, KrbErrorStatesEnum.KRB_ERR_CTIME_TAG_STATE,
+                KerberosConstants.KRB_ERROR_CTIME_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from cTime tag to cTime value
         // --------------------------------------------------------------------------------------------
         // ctime        [2] KerberosTime OPTIONAL
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_CTIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_CTIME_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_CTIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(), 
-            new StoreCTime() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_CTIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME
+            .getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_CTIME_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_CTIME_STATE,
+                UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreCTime() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from cTime value to cusec tag
         // --------------------------------------------------------------------------------------------
         // cusec           [3]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_CTIME_STATE.ordinal()][KerberosConstants.KRB_ERROR_CUSEC_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_CTIME_STATE, KrbErrorStatesEnum.KRB_ERR_CUSEC_TAG_STATE, KerberosConstants.KRB_ERROR_CUSEC_TAG, 
-            new CheckNotNullLength() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_CTIME_STATE.ordinal()][KerberosConstants.KRB_ERROR_CUSEC_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_CTIME_STATE, KrbErrorStatesEnum.KRB_ERR_CUSEC_TAG_STATE,
+                KerberosConstants.KRB_ERROR_CUSEC_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from cusec tag to cusec value
         // --------------------------------------------------------------------------------------------
         // cusec           [3] Microseconds OPTIONAL
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_CUSEC_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_CUSEC_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_CUSEC_STATE, UniversalTag.INTEGER.getValue(), 
-            new StoreCusec() );
-    
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_CUSEC_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_CUSEC_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_CUSEC_STATE,
+                UniversalTag.INTEGER.getValue(),
+                new StoreCusec() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from cusec value to stime tag
         // --------------------------------------------------------------------------------------------
         // stime           [4]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_CUSEC_STATE.ordinal()][KerberosConstants.KRB_ERROR_STIME_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_CUSEC_STATE, KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE, KerberosConstants.KRB_ERROR_STIME_TAG, 
-            new CheckNotNullLength() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_CUSEC_STATE.ordinal()][KerberosConstants.KRB_ERROR_STIME_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_CUSEC_STATE, KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE,
+                KerberosConstants.KRB_ERROR_STIME_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from stime tag to stime value
         // --------------------------------------------------------------------------------------------
         // stime           [4] KerberosTime
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_STIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(), 
-            new StoreSTime() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME
+            .getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_STIME_STATE,
+                UniversalTag.GENERALIZED_TIME.getValue(),
+                new StoreSTime() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from stime value to susec tag
         // --------------------------------------------------------------------------------------------
         // susec           [5]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_STIME_STATE.ordinal()][KerberosConstants.KRB_ERROR_SUSEC_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_STIME_STATE, KrbErrorStatesEnum.KRB_ERR_SUSEC_TAG_STATE, KerberosConstants.KRB_ERROR_SUSEC_TAG, 
-            new CheckNotNullLength() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_STIME_STATE.ordinal()][KerberosConstants.KRB_ERROR_SUSEC_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_STIME_STATE, KrbErrorStatesEnum.KRB_ERR_SUSEC_TAG_STATE,
+                KerberosConstants.KRB_ERROR_SUSEC_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from susec tag to susec value
         // --------------------------------------------------------------------------------------------
         // susec           [5] Microseconds
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_SUSEC_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_SUSEC_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_SUSEC_STATE, UniversalTag.INTEGER.getValue(), 
-            new StoreSusec() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_SUSEC_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_SUSEC_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_SUSEC_STATE,
+                UniversalTag.INTEGER.getValue(),
+                new StoreSusec() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from susec value to error-code tag
         // --------------------------------------------------------------------------------------------
         // error-code      [6]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_SUSEC_STATE.ordinal()][KerberosConstants.KRB_ERROR_ERROR_CODE_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_SUSEC_STATE, KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_TAG_STATE, KerberosConstants.KRB_ERROR_ERROR_CODE_TAG, 
-            new CheckNotNullLength() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_SUSEC_STATE.ordinal()][KerberosConstants.KRB_ERROR_ERROR_CODE_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_SUSEC_STATE, KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_TAG_STATE,
+                KerberosConstants.KRB_ERROR_ERROR_CODE_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from error-code tag to error-code value
         // --------------------------------------------------------------------------------------------
         // error-code      [6] Int32
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE, UniversalTag.INTEGER.getValue(), 
-            new StoreErrorCode() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE,
+                UniversalTag.INTEGER.getValue(),
+                new StoreErrorCode() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from error-code value to crealm tag
         // --------------------------------------------------------------------------------------------
         // crealm          [7]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE.ordinal()][KerberosConstants.KRB_ERROR_CREALM_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE, KrbErrorStatesEnum.KRB_ERR_CREALM_TAG_STATE, KerberosConstants.KRB_ERROR_CREALM_TAG, 
-            new CheckNotNullLength() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE.ordinal()][KerberosConstants.KRB_ERROR_CREALM_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE, KrbErrorStatesEnum.KRB_ERR_CREALM_TAG_STATE,
+                KerberosConstants.KRB_ERROR_CREALM_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from crealm tag to crealm value
         // --------------------------------------------------------------------------------------------
         // crealm          [7] Realm
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_CREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_CREALM_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_CREALM_STATE, UniversalTag.GENERAL_STRING.getValue(), 
-            new StoreCRealm() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_CREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_CREALM_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_CREALM_STATE,
+                UniversalTag.GENERAL_STRING.getValue(),
+                new StoreCRealm() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from crealm value to cname
         // --------------------------------------------------------------------------------------------
         // cname           [8] PrincipalName OPTIONAL,
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_CREALM_STATE.ordinal()][KerberosConstants.KRB_ERROR_CNAME_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_CREALM_STATE, KrbErrorStatesEnum.KRB_ERR_CNAME_STATE, KerberosConstants.KRB_ERROR_CNAME_TAG, 
-            new StoreCName() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_CREALM_STATE.ordinal()][KerberosConstants.KRB_ERROR_CNAME_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_CREALM_STATE, KrbErrorStatesEnum.KRB_ERR_CNAME_STATE,
+                KerberosConstants.KRB_ERROR_CNAME_TAG,
+                new StoreCName() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from cname value to realm tag
         // --------------------------------------------------------------------------------------------
         // realm           [9]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_CNAME_STATE.ordinal()][KerberosConstants.KRB_ERROR_REALM_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_CNAME_STATE, KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE, KerberosConstants.KRB_ERROR_REALM_TAG, 
-            new CheckNotNullLength() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_CNAME_STATE.ordinal()][KerberosConstants.KRB_ERROR_REALM_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_CNAME_STATE, KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE,
+                KerberosConstants.KRB_ERROR_REALM_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from realm tag to realm value
         // --------------------------------------------------------------------------------------------
         // realm           [9] Realm
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_REALM_STATE, UniversalTag.GENERAL_STRING.getValue(), 
-            new StoreRealm() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_REALM_STATE,
+                UniversalTag.GENERAL_STRING.getValue(),
+                new StoreRealm() );
 
         // --------------------------------------------------------------------------------------------
-        // Transition from realm value to sname 
+        // Transition from realm value to sname
         // --------------------------------------------------------------------------------------------
         // sname           [10] PrincipalName,
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_REALM_STATE.ordinal()][KerberosConstants.KRB_ERROR_SNAME_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_REALM_STATE, KrbErrorStatesEnum.KRB_ERR_SNAME_STATE, KerberosConstants.KRB_ERROR_SNAME_TAG, 
-            new StoreSName() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_REALM_STATE.ordinal()][KerberosConstants.KRB_ERROR_SNAME_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_REALM_STATE, KrbErrorStatesEnum.KRB_ERR_SNAME_STATE,
+                KerberosConstants.KRB_ERROR_SNAME_TAG,
+                new StoreSName() );
+
         // --------------------------------------------------------------------------------------------
-        // Transition from sname value to etext tag 
+        // Transition from sname value to etext tag
         // --------------------------------------------------------------------------------------------
         // e-text          [11]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_SNAME_STATE.ordinal()][KerberosConstants.KRB_ERROR_ETEXT_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_SNAME_STATE, KrbErrorStatesEnum.KRB_ERR_ETEXT_TAG_STATE, KerberosConstants.KRB_ERROR_ETEXT_TAG, 
-            new CheckNotNullLength() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_SNAME_STATE.ordinal()][KerberosConstants.KRB_ERROR_ETEXT_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_SNAME_STATE, KrbErrorStatesEnum.KRB_ERR_ETEXT_TAG_STATE,
+                KerberosConstants.KRB_ERROR_ETEXT_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
+
         // --------------------------------------------------------------------------------------------
-        // Transition from etext tag to etext value 
+        // Transition from etext tag to etext value
         // --------------------------------------------------------------------------------------------
         // e-text          [11] KerberosString OPTIONAL
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_ETEXT_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_ETEXT_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_ETEXT_STATE, UniversalTag.GENERAL_STRING.getValue(), 
-            new StoreEText() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_ETEXT_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_ETEXT_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_ETEXT_STATE,
+                UniversalTag.GENERAL_STRING.getValue(),
+                new StoreEText() );
 
         // --------------------------------------------------------------------------------------------
-        // Transition from etext value to edata tag 
+        // Transition from etext value to edata tag
         // --------------------------------------------------------------------------------------------
         // e-data          [12]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_ETEXT_STATE.ordinal()][KerberosConstants.KRB_ERROR_EDATA_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_ETEXT_STATE, KrbErrorStatesEnum.KRB_ERR_EDATA_TAG_STATE, KerberosConstants.KRB_ERROR_EDATA_TAG, 
-            new CheckNotNullLength() );
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_ETEXT_STATE.ordinal()][KerberosConstants.KRB_ERROR_EDATA_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_ETEXT_STATE, KrbErrorStatesEnum.KRB_ERR_EDATA_TAG_STATE,
+                KerberosConstants.KRB_ERROR_EDATA_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
+
         // --------------------------------------------------------------------------------------------
-        // Transition from edata tag to edata value 
+        // Transition from edata tag to edata value
         // --------------------------------------------------------------------------------------------
         // e-data          [12] OCTET STRING OPTIONAL
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_EDATA_TAG_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_EDATA_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_EDATA_STATE, UniversalTag.OCTET_STRING.getValue(), 
-            new StoreEData() );
-        
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_EDATA_TAG_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_EDATA_TAG_STATE, KrbErrorStatesEnum.KRB_ERR_EDATA_STATE,
+                UniversalTag.OCTET_STRING.getValue(),
+                new StoreEData() );
+
         // ----------------------------------------- OPTIONAL transitions -----------------------------------------
-        
+
         // --------------------------------------------------------------------------------------------
         // Transition from msg-type value to cusec tag
         // --------------------------------------------------------------------------------------------
         // cusec           [3]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE.ordinal()][KerberosConstants.KRB_ERROR_CUSEC_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE, KrbErrorStatesEnum.KRB_ERR_CUSEC_TAG_STATE, KerberosConstants.KRB_ERROR_CUSEC_TAG, 
-            new CheckNotNullLength());
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE.ordinal()][KerberosConstants.KRB_ERROR_CUSEC_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE, KrbErrorStatesEnum.KRB_ERR_CUSEC_TAG_STATE,
+                KerberosConstants.KRB_ERROR_CUSEC_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from msg-type value to stime tag
         // --------------------------------------------------------------------------------------------
         // stime           [4]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE.ordinal()][KerberosConstants.KRB_ERROR_STIME_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE, KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE, KerberosConstants.KRB_ERROR_STIME_TAG, 
-            new CheckNotNullLength());
-        
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE.ordinal()][KerberosConstants.KRB_ERROR_STIME_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_MSG_TYPE_STATE, KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE,
+                KerberosConstants.KRB_ERROR_STIME_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
+
         // --------------------------------------------------------------------------------------------
         // Transition from cTime value to stime tag
         // --------------------------------------------------------------------------------------------
         // stime           [4]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_CTIME_STATE.ordinal()][KerberosConstants.KRB_ERROR_STIME_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_CTIME_STATE, KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE, KerberosConstants.KRB_ERROR_STIME_TAG, 
-            new CheckNotNullLength() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_CTIME_STATE.ordinal()][KerberosConstants.KRB_ERROR_STIME_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_CTIME_STATE, KrbErrorStatesEnum.KRB_ERR_STIME_TAG_STATE,
+                KerberosConstants.KRB_ERROR_STIME_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
 
         // from erro-code to realm
 
@@ -319,41 +380,50 @@ public final class KrbErrorGrammar exten
         // Transition from error-code value to realm tag
         // --------------------------------------------------------------------------------------------
         // realm           [9]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE.ordinal()][KerberosConstants.KRB_ERROR_REALM_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE, KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE, KerberosConstants.KRB_ERROR_REALM_TAG, 
-            new CheckNotNullLength() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE.ordinal()][KerberosConstants.KRB_ERROR_REALM_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE, KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE,
+                KerberosConstants.KRB_ERROR_REALM_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from error-code value to cname
         // --------------------------------------------------------------------------------------------
         // cname           [8] PrincipalName OPTIONAL,
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE.ordinal()][KerberosConstants.KRB_ERROR_CNAME_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE, KrbErrorStatesEnum.KRB_ERR_CNAME_STATE, KerberosConstants.KRB_ERROR_CNAME_TAG, 
-            new StoreCName() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE.ordinal()][KerberosConstants.KRB_ERROR_CNAME_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_ERROR_CODE_STATE, KrbErrorStatesEnum.KRB_ERR_CNAME_STATE,
+                KerberosConstants.KRB_ERROR_CNAME_TAG,
+                new StoreCName() );
 
         // --------------------------------------------------------------------------------------------
         // Transition from crealm value to realm tag
         // --------------------------------------------------------------------------------------------
         // realm           [9]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_CREALM_STATE.ordinal()][KerberosConstants.KRB_ERROR_REALM_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_CREALM_STATE, KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE, KerberosConstants.KRB_ERROR_REALM_TAG, 
-            new CheckNotNullLength() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_CREALM_STATE.ordinal()][KerberosConstants.KRB_ERROR_REALM_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_CREALM_STATE, KrbErrorStatesEnum.KRB_ERR_REALM_TAG_STATE,
+                KerberosConstants.KRB_ERROR_REALM_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
 
         // --------------------------------------------------------------------------------------------
-        // Transition from sname value to edata tag 
+        // Transition from sname value to edata tag
         // --------------------------------------------------------------------------------------------
         // e-data          [12]
-        super.transitions[KrbErrorStatesEnum.KRB_ERR_SNAME_STATE.ordinal()][KerberosConstants.KRB_ERROR_EDATA_TAG] = new GrammarTransition(
-            KrbErrorStatesEnum.KRB_ERR_SNAME_STATE, KrbErrorStatesEnum.KRB_ERR_EDATA_TAG_STATE, KerberosConstants.KRB_ERROR_EDATA_TAG, 
-            new CheckNotNullLength() );
+        super.transitions[KrbErrorStatesEnum.KRB_ERR_SNAME_STATE.ordinal()][KerberosConstants.KRB_ERROR_EDATA_TAG] =
+            new GrammarTransition<KrbErrorContainer>(
+                KrbErrorStatesEnum.KRB_ERR_SNAME_STATE, KrbErrorStatesEnum.KRB_ERR_EDATA_TAG_STATE,
+                KerberosConstants.KRB_ERROR_EDATA_TAG,
+                new CheckNotNullLength<KrbErrorContainer>() );
     }
 
+
     /**
      * Get the instance of this grammar
-     * 
+     *
      * @return An instance on the KRB-ERROR Grammar
      */
-    public static Grammar getInstance()
+    public static Grammar<KrbErrorContainer> getInstance()
     {
         return instance;
     }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/KrbErrorStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/KrbErrorStatesEnum.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/KrbErrorStatesEnum.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/KrbErrorStatesEnum.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.krbError;
 
@@ -27,22 +27,22 @@ import org.apache.directory.shared.asn1.
 /**
  * This class store the KRB-ERROR grammar's constants. It is also used for debugging
  * purpose
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum KrbErrorStatesEnum implements States
 {
     // Start
     START_STATE,                        // 0
-    
+
     // ----- KRB-ERROR component --------------------------------------
     KRB_ERR_TAG,                        // 1
-    
+
     KRB_ERR_SEQ_STATE,                  // 2
-    
+
     KRB_ERR_PVNO_TAG_STATE,             // 3
     KRB_ERR_PVNO_STATE,                 // 4
-    
+
     KRB_ERR_MSG_TYPE_TAG_STATE,         // 5
     KRB_ERR_MSG_TYPE_STATE,             // 6
 
@@ -80,10 +80,10 @@ public enum KrbErrorStatesEnum implement
     // End
     LAST_KRB_ERR_STATE;                 // 27
 
-    
+
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar code
      * @return The grammar name
      */
@@ -95,11 +95,11 @@ public enum KrbErrorStatesEnum implement
 
     /**
      * Get the grammar name
-     * 
+     *
      * @param grammar The grammar class
      * @return The grammar name
      */
-    public String getGrammarName( Grammar grammar )
+    public String getGrammarName( Grammar<KrbErrorContainer> grammar )
     {
         if ( grammar instanceof KrbErrorGrammar )
         {
@@ -114,7 +114,7 @@ public enum KrbErrorStatesEnum implement
 
     /**
      * Get the string representing the state
-     * 
+     *
      * @param state The state number
      * @return The String representing the state
      */
@@ -123,7 +123,7 @@ public enum KrbErrorStatesEnum implement
         return ( ( state == LAST_KRB_ERR_STATE.ordinal() ) ? "LAST_KRB_ERR_STATE" : name() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -131,8 +131,8 @@ public enum KrbErrorStatesEnum implement
     {
         return this == LAST_KRB_ERR_STATE;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/CheckMsgType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/CheckMsgType.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/CheckMsgType.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/CheckMsgType.java Mon Feb  7 20:49:04 2011
@@ -6,30 +6,31 @@
  *  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.krbError.actions;
 
 
 import org.apache.directory.shared.kerberos.KerberosMessageType;
 import org.apache.directory.shared.kerberos.codec.actions.AbstractReadMsgType;
+import org.apache.directory.shared.kerberos.codec.krbError.KrbErrorContainer;
 
 
 /**
  * The action used to check the KRB-ERROR msg-type
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CheckMsgType extends AbstractReadMsgType
+public class CheckMsgType extends AbstractReadMsgType<KrbErrorContainer>
 {
     /**
      * Instantiates a new CheckMsgType action.

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

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

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

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

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreCusec.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreCusec.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreCusec.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreCusec.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.krbError.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.actions.AbstractReadInteger;
 import org.apache.directory.shared.kerberos.codec.krbError.KrbErrorContainer;
 
 
 /**
  * The action used to store the cusec
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreCusec extends AbstractReadInteger
+public class StoreCusec extends AbstractReadInteger<KrbErrorContainer>
 {
 
     /**
@@ -46,9 +45,8 @@ public class StoreCusec extends Abstract
      * {@inheritDoc}
      */
     @Override
-    protected void setIntegerValue( int value, Asn1Container container )
+    protected void setIntegerValue( int value, KrbErrorContainer krbErrorContainer )
     {
-        KrbErrorContainer krbErrorContainer = ( KrbErrorContainer ) container;
         krbErrorContainer.getKrbError().setCusec( value );
     }
 }

Modified: directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEData.java?rev=1068124&r1=1068123&r2=1068124&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEData.java (original)
+++ directory/apacheds/branches/m1/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbError/actions/StoreEData.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.krbError.actions;
 
 
-import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.actions.AbstractReadOctetString;
 import org.apache.directory.shared.kerberos.codec.krbError.KrbErrorContainer;
 
 
 /**
  * The action used to read the KrbError edata
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoreEData extends AbstractReadOctetString
+public class StoreEData extends AbstractReadOctetString<KrbErrorContainer>
 {
     /**
      * Instantiates a new AbstractReadRealm action.
@@ -45,10 +44,9 @@ public class StoreEData extends Abstract
      * {@inheritDoc}
      */
     @Override
-    protected void setOctetString( byte[] data, Asn1Container container )
+    protected void setOctetString( byte[] data, KrbErrorContainer krbErrorContainer )
     {
-        KrbErrorContainer krbErrContainer = ( KrbErrorContainer ) container;
-        krbErrContainer.getKrbError().setEData( data );
-        container.setGrammarEndAllowed( true );
+        krbErrorContainer.getKrbError().setEData( data );
+        krbErrorContainer.setGrammarEndAllowed( true );
     }
 }



Mime
View raw message