directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1038678 - in /directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo: ./ actions/
Date Wed, 24 Nov 2010 16:28:33 GMT
Author: kayyagari
Date: Wed Nov 24 16:28:32 2010
New Revision: 1038678

URL: http://svn.apache.org/viewvc?rev=1038678&view=rev
Log:
o implementation of KrbCredInfo codec

Added:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoContainer.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoStatesEnum.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/KrbCredInfoInit.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreAuthTime.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreClientAddresses.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreEndTime.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreKey.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePName.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreRenewtill.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSName.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreStartTime.java

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoContainer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoContainer.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoContainer.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoContainer.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.krbCredInfo;
+
+import org.apache.directory.shared.asn1.ber.AbstractContainer;
+import org.apache.directory.shared.kerberos.components.KrbCredInfo;
+
+
+/**
+ * The KrbError container stores the KrbCredInfo decoded by the Asn1Decoder.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class KrbCredInfoContainer extends AbstractContainer
+{
+    /** An KrbCredInfo container */
+    private KrbCredInfo krbCredInfo;
+    
+    /**
+     * Creates a new KrbErrorContainer object.
+     */
+    public KrbCredInfoContainer()
+    {
+        super();
+        this.stateStack = new int[1];
+        this.grammar = KrbCredInfoGrammar.getInstance();
+        setTransition( KrbCredInfoStatesEnum.START_STATE );
+    }
+
+
+    /**
+     * @return Returns the KrbCredInfo.
+     */
+    public KrbCredInfo getKrbCredInfo()
+    {
+        return krbCredInfo;
+    }
+
+    
+    /**
+     * Set a KrbCredInfo Object into the container. It will be completed by the
+     * KerberosDecoder.
+     * 
+     * @param krbCredInfo The KrbCredInfo to set.
+     */
+    public void setKrbCredInfo( KrbCredInfo krbCredInfo )
+    {
+        this.krbCredInfo = krbCredInfo;
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoGrammar.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,393 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.krbCredInfo;
+
+
+import org.apache.directory.shared.asn1.ber.grammar.AbstractGrammar;
+import org.apache.directory.shared.asn1.ber.grammar.Grammar;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarTransition;
+import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
+import org.apache.directory.shared.kerberos.KerberosConstants;
+import org.apache.directory.shared.kerberos.codec.actions.CheckNotNullLength;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.KrbCredInfoInit;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StoreAuthTime;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StoreClientAddresses;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StoreEndTime;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StoreFlags;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StoreKey;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StorePName;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StorePRealm;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StoreRenewtill;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StoreSName;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StoreSRealm;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.actions.StoreStartTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * This class implements the KrbCredInfo 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 KrbCredInfoGrammar extends AbstractGrammar
+{
+    /** The logger */
+    static final Logger LOG = LoggerFactory.getLogger( KrbCredInfoGrammar.class );
+
+    /** A speedup for logger */
+    static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+    /** The instance of grammar. KrbCredInfoGrammar is a singleton */
+    private static Grammar instance = new KrbCredInfoGrammar();
+
+
+    /**
+     * Creates a new KrbCredInfoGrammar object.
+     */
+    private KrbCredInfoGrammar()
+    {
+        setName( KrbCredInfoGrammar.class.getName() );
+
+        // Create the transitions table
+        super.transitions = new GrammarTransition[KrbCredInfoStatesEnum.LAST_KRB_CRED_INFO_STATE.ordinal()][256];
+
+        // ============================================================================================
+        // KrbCredInfo 
+        // ============================================================================================
+        
+        super.transitions[KrbCredInfoStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
+            KrbCredInfoStatesEnum.START_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SEQ_TAG_STATE, UniversalTag.SEQUENCE.getValue(),
+            new KrbCredInfoInit());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SEQ_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_KEY_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_SEQ_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KerberosConstants.KRB_CRED_INFO_KEY_TAG,
+            new StoreKey());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+            new CheckNotNullLength());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE, UniversalTag.GENERAL_STRING.getValue(),
+            new StorePRealm());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_PNAME_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KerberosConstants.KRB_CRED_INFO_PNAME_TAG,
+            new StorePName());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_FLAGS_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE , KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
+            new CheckNotNullLength());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE .ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE , KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE, UniversalTag.INTEGER.getValue(),
+            new StoreFlags());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
+            new CheckNotNullLength());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE  , UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreAuthTime());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE  .ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_TAG_STATE  , KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+            new CheckNotNullLength());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE , UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreStartTime());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE .ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_TAG_STATE , KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+            new CheckNotNullLength());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreEndTime());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+            new CheckNotNullLength());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE  , UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreRenewtill());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE  .ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_TAG_STATE  , KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+            new CheckNotNullLength());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, UniversalTag.GENERAL_STRING.getValue(),
+            new StoreSRealm());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+            new StoreSName());
+        
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+            KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+            new StoreClientAddresses());
+
+        // ---------------------------- OPTIONAL transitions ------------------------
+        
+        // transition from key to pname
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_PNAME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_PNAME_TAG,
+         new CheckNotNullLength());
+
+        // transition from key to flags
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_FLAGS_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
+         new CheckNotNullLength());
+
+        // transition from key to authtime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from key to starttime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from key to endtime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from key to renewtill
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+         new CheckNotNullLength());
+
+        // transition from key to srealm
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+         new CheckNotNullLength());
+
+        // transition from key to sname
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+         new CheckNotNullLength());
+
+        // transition from key to caddr
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_KEY_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+         new CheckNotNullLength());
+
+        // transition from prealm to flags
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_FLAGS_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KerberosConstants.KRB_CRED_INFO_FLAGS_TAG,
+         new CheckNotNullLength());
+
+        // transition from prealm to authtime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from prealm to starttime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from prealm to endtime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from prealm to renewtill
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+         new CheckNotNullLength());
+
+        // transition from prealm to srealm
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+         new CheckNotNullLength());
+
+        // transition from prealm to sname
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+         new CheckNotNullLength());
+
+        // transition from prealm to caddr
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+         new CheckNotNullLength());
+
+        // transition from pname to authtime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KerberosConstants.KRB_CRED_INFO_AUTHTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from pname to starttime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from pname to endtime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from pname to renewtill
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+         new CheckNotNullLength());
+
+        // transition from pname to srealm
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+         new CheckNotNullLength());
+
+        // transition from pname to sname
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+         new CheckNotNullLength());
+
+        // transition from pname to caddr
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_PNAME_TAG_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+         new CheckNotNullLength());
+
+        // transition from flags to starttime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KerberosConstants.KRB_CRED_INFO_STARTTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from flags to endtime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from flags to renewtill
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+         new CheckNotNullLength());
+
+        // transition from flags to srealm
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+         new CheckNotNullLength());
+
+        // transition from flags to sname
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+         new CheckNotNullLength());
+
+        // transition from flags to caddr
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_FLAGS_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+         new CheckNotNullLength());
+
+        // transition from authtime to endtime
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KerberosConstants.KRB_CRED_INFO_ENDTIME_TAG,
+         new CheckNotNullLength());
+
+        // transition from authtime to renewtill
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+         new CheckNotNullLength());
+
+        // transition from authtime to srealm
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+         new CheckNotNullLength());
+
+        // transition from authtime to sname
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+         new CheckNotNullLength());
+
+        // transition from authtime to caddr
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_AUTHTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+         new CheckNotNullLength());
+
+        // transition from starttime to renewtill
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KerberosConstants.KRB_CRED_INFO_RENEWTILL_TAG,
+         new CheckNotNullLength());
+
+        // transition from starttime to srealm
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+         new CheckNotNullLength());
+
+        // transition from starttime to sname
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+         new CheckNotNullLength());
+
+        // transition from starttime to caddr
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_STARTTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+         new CheckNotNullLength());
+
+        // transition from endtime to srealm
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SREALM_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KerberosConstants.KRB_CRED_INFO_SREALM_TAG,
+         new CheckNotNullLength());
+
+        // transition from endtime to sname
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+         new CheckNotNullLength());
+
+        // transition from endtime to caddr
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_ENDTIME_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+         new CheckNotNullLength());
+
+        // transition from renewtill to sname
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_SNAME_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_SNAME_TAG_STATE, KerberosConstants.KRB_CRED_INFO_SNAME_TAG,
+         new CheckNotNullLength());
+
+        // transition from renewtill to caddr
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_RENEWTILL_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+         new CheckNotNullLength());
+
+        // transition from srealm to caddr
+        super.transitions[KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE.ordinal()][KerberosConstants.KRB_CRED_INFO_CADDR_TAG] = new GrammarTransition(
+         KrbCredInfoStatesEnum.KRB_CRED_INFO_SREALM_STATE, KrbCredInfoStatesEnum.KRB_CRED_INFO_CADDR_TAG_STATE, KerberosConstants.KRB_CRED_INFO_CADDR_TAG,
+         new CheckNotNullLength());
+
+    }
+
+
+    /**
+     * Get the instance of this grammar
+     * 
+     * @return An instance on the KrbCredInfo Grammar
+     */
+    public static Grammar getInstance()
+    {
+        return instance;
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoStatesEnum.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoStatesEnum.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/KrbCredInfoStatesEnum.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,134 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.krbCredInfo;
+
+
+import org.apache.directory.shared.asn1.ber.grammar.Grammar;
+import org.apache.directory.shared.asn1.ber.grammar.States;
+import org.apache.directory.shared.kerberos.codec.KerberosMessageGrammar;
+
+
+/**
+ * This class store the KrbCredInfo grammar's constants. It is also used for debugging
+ * purpose
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum KrbCredInfoStatesEnum implements States
+{
+    // Start
+    START_STATE,                        // 0
+    
+    // ----- KRB-ERROR component --------------------------------------
+    KRB_CRED_INFO_SEQ_TAG_STATE,             // 1
+    
+    KRB_CRED_INFO_KEY_TAG_STATE,       // 2
+    
+    KRB_CRED_INFO_PREALM_TAG_STATE,         // 5
+    KRB_CRED_INFO_PREALM_STATE,             // 6
+
+    KRB_CRED_INFO_PNAME_TAG_STATE,            // 7
+
+    KRB_CRED_INFO_FLAGS_TAG_STATE,            // 9
+    KRB_CRED_INFO_FLAGS_STATE,                // 10
+
+    KRB_CRED_INFO_AUTHTIME_TAG_STATE,            // 11
+    KRB_CRED_INFO_AUTHTIME_STATE,                // 12
+
+    KRB_CRED_INFO_STARTTIME_TAG_STATE,            // 13
+    KRB_CRED_INFO_STARTTIME_STATE,                // 14
+
+    KRB_CRED_INFO_ENDTIME_TAG_STATE,       // 15
+    KRB_CRED_INFO_ENDTIME_STATE,           // 16
+
+    KRB_CRED_INFO_RENEWTILL_TAG_STATE,           // 17
+    KRB_CRED_INFO_RENEWTILL_STATE,               // 18
+
+    KRB_CRED_INFO_SREALM_TAG_STATE,                // 19
+    KRB_CRED_INFO_SREALM_STATE,
+    
+    KRB_CRED_INFO_SNAME_TAG_STATE,                // 22
+
+    KRB_CRED_INFO_CADDR_TAG_STATE,                // 26
+
+    // End
+    LAST_KRB_CRED_INFO_STATE;                 // 27
+
+    
+    /**
+     * Get the grammar name
+     * 
+     * @param grammar The grammar code
+     * @return The grammar name
+     */
+    public String getGrammarName( int grammar )
+    {
+        return "KRB_CRED_INFO_GRAMMAR";
+    }
+
+
+    /**
+     * Get the grammar name
+     * 
+     * @param grammar The grammar class
+     * @return The grammar name
+     */
+    public String getGrammarName( Grammar grammar )
+    {
+        if ( grammar instanceof KerberosMessageGrammar )
+        {
+            return "KRB_CRED_INFO_GRAMMAR";
+        }
+        else
+        {
+            return "UNKNOWN GRAMMAR";
+        }
+    }
+
+
+    /**
+     * Get the string representing the state
+     * 
+     * @param state The state number
+     * @return The String representing the state
+     */
+    public String getState( int state )
+    {
+        return ( ( state == LAST_KRB_CRED_INFO_STATE.ordinal() ) ? "LAST_KRB_CRED_INFO_STATE" : name() );
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isEndState()
+    {
+        return this == LAST_KRB_CRED_INFO_STATE;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public KrbCredInfoStatesEnum getStartState()
+    {
+        return START_STATE;
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/KrbCredInfoInit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/KrbCredInfoInit.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/KrbCredInfoInit.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/KrbCredInfoInit.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,83 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.krbCredInfo.actions;
+
+
+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.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.KrbCredInfoContainer;
+import org.apache.directory.shared.kerberos.components.KrbCredInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to initialize the KrbCredInfo object
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class KrbCredInfoInit extends GrammarAction
+{
+    /** The logger */
+    private static final Logger LOG = LoggerFactory.getLogger( KrbCredInfoInit.class );
+
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+    /**
+     * Instantiates a new KrbCredInfoInit action.
+     */
+    public KrbCredInfoInit()
+    {
+        super( "Creates a KrbCredInfo instance" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void action( Asn1Container container ) throws DecoderException
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+
+        TLV tlv = krbCredInfoContainer.getCurrentTLV();
+
+        // The Length should not be null
+        if ( tlv.getLength() == 0 )
+        {
+            LOG.error( I18n.err( I18n.ERR_04066 ) );
+
+            // This will generate a PROTOCOL_ERROR
+            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
+        }
+
+        KrbCredInfo krbCredInfo = new KrbCredInfo();
+        krbCredInfoContainer.setKrbCredInfo( krbCredInfo );
+
+        if ( IS_DEBUG )
+        {
+            LOG.debug( "KrbCredInfo created" );
+        }
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreAuthTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreAuthTime.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreAuthTime.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreAuthTime.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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;
+
+
+/**
+ * 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
+{
+
+    /**
+     * Instantiates a new StoreAuthTime action.
+     */
+    public StoreAuthTime()
+    {
+        super( "KrbCredInfo authtime" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setAuthTime( krbtime );
+        krbCredInfoContainer.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreClientAddresses.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreClientAddresses.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreClientAddresses.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreClientAddresses.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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;
+
+
+/**
+ * The action used to store the caddr of KrbCredInfo
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreClientAddresses extends AbstractReadHostAddresses
+{
+
+    /**
+     * Instantiates a new StoreAddresses action.
+     */
+    public StoreClientAddresses()
+    {
+        super( "KrbCredInfo caddr" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setHostAddresses( HostAddresses hostAddresses, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setClientAddresses( hostAddresses );
+        container.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreEndTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreEndTime.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreEndTime.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreEndTime.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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;
+
+
+/**
+ * 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
+{
+
+    /**
+     * Instantiates a new StoreEndTime action.
+     */
+    public StoreEndTime()
+    {
+        super( "KrbCredInfo endtime" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setEndTime( krbtime );
+        krbCredInfoContainer.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreFlags.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,57 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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.AbstractReadInteger;
+import org.apache.directory.shared.kerberos.codec.krbCredInfo.KrbCredInfoContainer;
+import org.apache.directory.shared.kerberos.flags.TicketFlags;
+
+
+/**
+ * The action used to store the flags
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreFlags extends AbstractReadInteger
+{
+
+    /**
+     * Instantiates a new StoreFlags action.
+     */
+    public StoreFlags()
+    {
+        super( "KrbCredInfo flags" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setIntegerValue( int value, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setTicketFlags( new TicketFlags( value ) );
+        container.setGrammarEndAllowed( true );
+    }
+
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreKey.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreKey.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreKey.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreKey.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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;
+
+
+/**
+ * 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
+{
+
+    /**
+     * Instantiates a new StoreKey action.
+     */
+    public StoreKey()
+    {
+        super( "KrbCredInfo key" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setEncryptionKey( EncryptionKey encryptionKey, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setKey( encryptionKey );
+        krbCredInfoContainer.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePName.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePName.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePName.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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;
+
+
+/**
+ * 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
+{
+
+    /**
+     * Instantiates a new StorePName action.
+     */
+    public StorePName()
+    {
+        super( "KrbCredInfo pname" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setPrincipalName( PrincipalName principalName, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setpName( principalName );
+        container.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StorePRealm.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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
+{
+
+    /**
+     * Instantiates a new StorePRealm action.
+     */
+    public StorePRealm()
+    {
+        super( "KrbCredInfo prealm value" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setRealm( String realm, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setpRealm( realm );
+        container.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreRenewtill.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreRenewtill.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreRenewtill.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreRenewtill.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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;
+
+
+/**
+ * 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
+{
+
+    /**
+     * Instantiates a new StoreRenewtill action.
+     */
+    public StoreRenewtill()
+    {
+        super( "KrbCredInfo renewtill" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setRenewtill( krbtime );
+        krbCredInfoContainer.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSName.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSName.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSName.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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;
+
+
+/**
+ * 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
+{
+
+    /**
+     * Instantiates a new StoreSName action.
+     */
+    public StoreSName()
+    {
+        super( "KrbCredInfo sname" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setPrincipalName( PrincipalName principalName, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setsName( principalName );
+        container.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreSRealm.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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
+{
+
+    /**
+     * Instantiates a new StoreSRealm action.
+     */
+    public StoreSRealm()
+    {
+        super( "KrbCredInfo srealm value" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setRealm( String realm, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setsRealm( realm );
+        container.setGrammarEndAllowed( true );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreStartTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreStartTime.java?rev=1038678&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreStartTime.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/krbCredInfo/actions/StoreStartTime.java Wed Nov 24 16:28:32 2010
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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. 
+ *  
+ */
+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;
+
+
+/**
+ * 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
+{
+
+    /**
+     * Instantiates a new StoreStartTime action.
+     */
+    public StoreStartTime()
+    {
+        super( "KrbCredInfo starttime" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setKerberosTime( KerberosTime krbtime, Asn1Container container )
+    {
+        KrbCredInfoContainer krbCredInfoContainer = ( KrbCredInfoContainer ) container;
+        krbCredInfoContainer.getKrbCredInfo().setStartTime( krbtime );
+        krbCredInfoContainer.setGrammarEndAllowed( true );
+    }
+}



Mime
View raw message