directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r1028638 [6/7] - in /directory/shared/trunk: dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/re...
Date Fri, 29 Oct 2010 08:12:07 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapStatesEnum.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapStatesEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapStatesEnum.java Fri Oct 29 08:12:05 2010
@@ -34,160 +34,128 @@ public enum LdapStatesEnum implements St
 {
     // ~ Static fields/initializers
     // -----------------------------------------------------------------
-    /** The initial state of every grammar */
-    INIT_GRAMMAR_STATE(0),
-
-    /** The ending state for every grammars */
-    GRAMMAR_END(-1),
 
     /** The END_STATE */
-    END_STATE(-1),
+    END_STATE,
 
-    START_STATE(                      0),
-    LDAP_MESSAGE_STATE(               1),
-    MESSAGE_ID_STATE(                 2),
-    BIND_REQUEST_STATE(               3),
-    BIND_RESPONSE_STATE(              4),
-    UNBIND_REQUEST_STATE(             5),
-    SEARCH_REQUEST_STATE(             6),
-    SEARCH_RESULT_ENTRY_STATE(        7),
-    SEARCH_RESULT_DONE_STATE(         8),
-    SEARCH_RESULT_REFERENCE_STATE(    9),
-    MODIFY_REQUEST_STATE(             10),
-    MODIFY_RESPONSE_STATE(            11),
-    ADD_REQUEST_STATE(                12),
-    ADD_RESPONSE_STATE(               13),
-    DEL_REQUEST_STATE(                14),
-    DEL_RESPONSE_STATE(               15),
-    MODIFY_DN_REQUEST_STATE(          16),
-    MODIFY_DN_RESPONSE_STATE(         17),
-    COMPARE_REQUEST_STATE(            18),
-    COMPARE_RESPONSE_STATE(           19),
-    ABANDON_REQUEST_STATE(            20),
-    EXTENDED_REQUEST_STATE(           21),
-    EXTENDED_RESPONSE_STATE(          22),
-    VERSION_STATE(                    23),
-    NAME_STATE(                       24),
-    SIMPLE_STATE(                     25),
-    SASL_STATE(                       26),
-    MECHANISM_STATE(                  27),
-    CREDENTIALS_STATE(                28),
-    RESULT_CODE_BR_STATE(             29),
-    MATCHED_DN_BR_STATE(              30),
-    ERROR_MESSAGE_BR_STATE(           31),
-    REFERRALS_BR_STATE(               32),
-    REFERRAL_BR_STATE(                33),
-    SERVER_SASL_CREDENTIALS_STATE(    34),
-    RESULT_CODE_STATE(                35),
-    MATCHED_DN_STATE(                 36),
-    ERROR_MESSAGE_STATE(              37),
-    REFERRALS_STATE(                  38),
-    REFERRAL_STATE(                   39),
-    REQUEST_NAME_STATE(               40),
-    REQUEST_VALUE_STATE(              41),
-    RESPONSE_NAME_STATE(              42),
-    RESPONSE_STATE(                   43),
-    RESULT_CODE_ER_STATE(             44),
-    MATCHED_DN_ER_STATE(              45),
-    ERROR_MESSAGE_ER_STATE(           46),
-    REFERRALS_ER_STATE(               47),
-    REFERRAL_ER_STATE(                48),
-    ENTRY_STATE(                      49),
-    ATTRIBUTES_STATE(                 50),
-    ATTRIBUTE_STATE(                  51),
-    TYPE_STATE(                       52),
-    VALUES_STATE(                     53),
-    VALUE_STATE(                      54),
-    OBJECT_STATE(                     55),
-    MODIFICATIONS_STATE(              56),
-    MODIFICATIONS_SEQ_STATE(          57),
-    OPERATION_STATE(                  58),
-    MODIFICATION_STATE(               59),
-    TYPE_MOD_STATE(                   60),
-    VALS_STATE(                       61),
-    ATTRIBUTE_VALUE_STATE(            62),
-    ENTRY_MOD_DN_STATE(               63),
-    NEW_RDN_STATE(                    64),
-    DELETE_OLD_RDN_STATE(             65),
-    NEW_SUPERIOR_STATE(               66),
-    ENTRY_COMP_STATE(                 67),
-    AVA_STATE(                        68),
-    ATTRIBUTE_DESC_STATE(             69),
-    ASSERTION_VALUE_STATE(            70),
-    BASE_OBJECT_STATE(                71),
-    SCOPE_STATE(                      72),
-    DEREF_ALIAS_STATE(                73),
-    SIZE_LIMIT_STATE(                 74),
-    TIME_LIMIT_STATE(                 75),
-    TYPES_ONLY_STATE(                 76),
-    AND_STATE(                        77),
-    OR_STATE(                         78),
-    NOT_STATE(                        79),
-    EQUALITY_MATCH_STATE(             80),
-    SUBSTRING_FILTER_STATE(           81),
-    GREATER_OR_EQUAL_STATE(           82),
-    LESS_OR_EQUAL_STATE(              83),
-    PRESENT_STATE(                    84),
-    APPROX_MATCH_STATE(               85),
-    EXTENSIBLE_MATCH_STATE(           86),
-    ATTRIBUTE_DESC_FILTER_STATE(      87),
-    ASSERTION_VALUE_FILTER_STATE(     88),
-    ATTRIBUTE_DESCRIPTION_LIST_STATE( 89),
-    ATTRIBUTE_DESCRIPTION_STATE(      90),
-    TYPE_SUBSTRING_STATE(             91),
-    SUBSTRINGS_STATE(                 92),
-    INITIAL_STATE(                    93),
-    ANY_STATE(                        94),
-    FINAL_STATE(                      95),
-    MATCHING_RULE_STATE(              96),
-    TYPE_MATCHING_RULE_STATE(         97),
-    MATCH_VALUE_STATE(                98),
-    DN_ATTRIBUTES_STATE(              99),
-    OBJECT_NAME_STATE(                100),
-    ATTRIBUTES_SR_STATE(              101),
-    PARTIAL_ATTRIBUTES_LIST_STATE(    102),
-    TYPE_SR_STATE(                    103),
-    VALS_SR_STATE(                    104),
-    ATTRIBUTE_VALUE_SR_STATE(         105),
-    REFERENCE_STATE(                  106),
-    CONTROLS_STATE(                   107),
-    CONTROL_STATE(                    108),
-    CONTROL_TYPE_STATE(               109),
-    CRITICALITY_STATE(                110),
-    CONTROL_VALUE_STATE(              111),
-    INTERMEDIATE_RESPONSE_STATE(      112),
-    INTERMEDIATE_RESPONSE_NAME_STATE( 113),
-    INTERMEDIATE_RESPONSE_VALUE_STATE(114),
-    
-    
-    LAST_LDAP_STATE(115);
+    START_STATE,
+    LDAP_MESSAGE_STATE,
+    MESSAGE_ID_STATE,
+    BIND_REQUEST_STATE,
+    BIND_RESPONSE_STATE,
+    UNBIND_REQUEST_STATE,
+    SEARCH_REQUEST_STATE,
+    SEARCH_RESULT_ENTRY_STATE,
+    SEARCH_RESULT_DONE_STATE,
+    SEARCH_RESULT_REFERENCE_STATE,
+    MODIFY_REQUEST_STATE,
+    MODIFY_RESPONSE_STATE,
+    ADD_REQUEST_STATE,
+    ADD_RESPONSE_STATE,
+    DEL_REQUEST_STATE,
+    DEL_RESPONSE_STATE,
+    MODIFY_DN_REQUEST_STATE,
+    MODIFY_DN_RESPONSE_STATE,
+    COMPARE_REQUEST_STATE,
+    COMPARE_RESPONSE_STATE,
+    ABANDON_REQUEST_STATE,
+    EXTENDED_REQUEST_STATE,
+    EXTENDED_RESPONSE_STATE,
+    VERSION_STATE,
+    NAME_STATE,
+    SIMPLE_STATE,
+    SASL_STATE,
+    MECHANISM_STATE,
+    CREDENTIALS_STATE,
+    RESULT_CODE_BR_STATE,
+    MATCHED_DN_BR_STATE,
+    ERROR_MESSAGE_BR_STATE,
+    REFERRALS_BR_STATE,
+    REFERRAL_BR_STATE,
+    SERVER_SASL_CREDENTIALS_STATE,
+    RESULT_CODE_STATE,
+    MATCHED_DN_STATE,
+    ERROR_MESSAGE_STATE,
+    REFERRALS_STATE,
+    REFERRAL_STATE,
+    REQUEST_NAME_STATE,
+    REQUEST_VALUE_STATE,
+    RESPONSE_NAME_STATE,
+    RESPONSE_STATE,
+    RESULT_CODE_ER_STATE,
+    MATCHED_DN_ER_STATE,
+    ERROR_MESSAGE_ER_STATE,
+    REFERRALS_ER_STATE,
+    REFERRAL_ER_STATE,
+    ENTRY_STATE,
+    ATTRIBUTES_STATE,
+    ATTRIBUTE_STATE,
+    TYPE_STATE,
+    VALUES_STATE,
+    VALUE_STATE,
+    OBJECT_STATE,
+    MODIFICATIONS_STATE,
+    MODIFICATIONS_SEQ_STATE,
+    OPERATION_STATE,
+    MODIFICATION_STATE,
+    TYPE_MOD_STATE,
+    VALS_STATE,
+    ATTRIBUTE_VALUE_STATE,
+    ENTRY_MOD_DN_STATE,
+    NEW_RDN_STATE,
+    DELETE_OLD_RDN_STATE,
+    NEW_SUPERIOR_STATE,
+    ENTRY_COMP_STATE,
+    AVA_STATE,
+    ATTRIBUTE_DESC_STATE,
+    ASSERTION_VALUE_STATE,
+    BASE_OBJECT_STATE,
+    SCOPE_STATE,
+    DEREF_ALIAS_STATE,
+    SIZE_LIMIT_STATE,
+    TIME_LIMIT_STATE,
+    TYPES_ONLY_STATE,
+    AND_STATE,
+    OR_STATE,
+    NOT_STATE,
+    EQUALITY_MATCH_STATE,
+    SUBSTRING_FILTER_STATE,
+    GREATER_OR_EQUAL_STATE,
+    LESS_OR_EQUAL_STATE,
+    PRESENT_STATE,
+    APPROX_MATCH_STATE,
+    EXTENSIBLE_MATCH_STATE,
+    ATTRIBUTE_DESC_FILTER_STATE,
+    ASSERTION_VALUE_FILTER_STATE,
+    ATTRIBUTE_DESCRIPTION_LIST_STATE,
+    ATTRIBUTE_DESCRIPTION_STATE,
+    TYPE_SUBSTRING_STATE,
+    SUBSTRINGS_STATE,
+    INITIAL_STATE,
+    ANY_STATE,
+    FINAL_STATE,
+    MATCHING_RULE_STATE,
+    TYPE_MATCHING_RULE_STATE,
+    MATCH_VALUE_STATE,
+    DN_ATTRIBUTES_STATE,
+    OBJECT_NAME_STATE,
+    ATTRIBUTES_SR_STATE,
+    PARTIAL_ATTRIBUTES_LIST_STATE,
+    TYPE_SR_STATE,
+    VALS_SR_STATE,
+    ATTRIBUTE_VALUE_SR_STATE,
+    REFERENCE_STATE,
+    CONTROLS_STATE,
+    CONTROL_STATE,
+    CONTROL_TYPE_STATE,
+    CRITICALITY_STATE,
+    CONTROL_VALUE_STATE,
+    INTERMEDIATE_RESPONSE_STATE,
+    INTERMEDIATE_RESPONSE_NAME_STATE,
+    INTERMEDIATE_RESPONSE_VALUE_STATE,
+    LAST_LDAP_STATE;
 
     
-    private int state;
-    
-    /**
-     * 
-     * Creates a new instance of LdapStatesEnum.
-     *
-     * @param state
-     */
-    LdapStatesEnum(int state)
-    {
-        this.state = state;
-    }
-
-    /**
-     * 
-     * Get the state.
-     *
-     * @return State as integer value
-     */
-    public int getState()
-    {
-        return state;
-    }
-    
-
     /**
      * Get the grammar name
      * 
@@ -229,7 +197,7 @@ public enum LdapStatesEnum implements St
      */
     public String getState( int state )
     {
-        return ( ( state == GRAMMAR_END.getState() ) ? "LDAP_MESSAGE_END_STATE" : name() );
+        return ( ( state == END_STATE.ordinal() ) ? "LDAP_MESSAGE_END_STATE" : name() );
     }
 
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlContainer.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlContainer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlContainer.java Fri Oct 29 08:12:05 2010
@@ -39,7 +39,7 @@ public class PasswordPolicyResponseContr
         super();
         stateStack = new int[1];
         grammar = PasswordPolicyResponseControlGrammar.getInstance();
-        setTransition( PasswordPolicyResponseControlStates.INIT_GRAMMAR_STATE );
+        setTransition( PasswordPolicyResponseControlStates.START_STATE );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlGrammar.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlGrammar.java Fri Oct 29 08:12:05 2010
@@ -57,10 +57,10 @@ public class PasswordPolicyResponseContr
     {
         setName( PasswordPolicyResponseControlGrammar.class.getName() );
 
-        super.transitions = new GrammarTransition[PasswordPolicyResponseControlStates.END_STATE.getState()][256];
+        super.transitions = new GrammarTransition[PasswordPolicyResponseControlStates.END_STATE.ordinal()][256];
         
-        super.transitions[PasswordPolicyResponseControlStates.INIT_GRAMMAR_STATE.getState()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            PasswordPolicyResponseControlStates.INIT_GRAMMAR_STATE, PasswordPolicyResponseControlStates.START_STATE, UniversalTag.SEQUENCE.getValue(),
+        super.transitions[PasswordPolicyResponseControlStates.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
+            PasswordPolicyResponseControlStates.START_STATE, PasswordPolicyResponseControlStates.START_STATE, UniversalTag.SEQUENCE.getValue(),
             new GrammarAction( "Initialization" )
             {
                 public void action( Asn1Container container ) throws DecoderException
@@ -72,7 +72,7 @@ public class PasswordPolicyResponseContr
                 }
             } );
 
-        super.transitions[PasswordPolicyResponseControlStates.START_STATE.getState()][PasswordPolicyResponseControlTags.TIME_BEFORE_EXPIRATION_TAG
+        super.transitions[PasswordPolicyResponseControlStates.START_STATE.ordinal()][PasswordPolicyResponseControlTags.TIME_BEFORE_EXPIRATION_TAG
             .getValue()] = new GrammarTransition( PasswordPolicyResponseControlStates.START_STATE,
             PasswordPolicyResponseControlStates.PPOLICY_ERROR_STATE,
             PasswordPolicyResponseControlTags.TIME_BEFORE_EXPIRATION_TAG.getValue(), new GrammarAction(
@@ -104,7 +104,7 @@ public class PasswordPolicyResponseContr
                 }
             } );
 
-        super.transitions[PasswordPolicyResponseControlStates.PPOLICY_ERROR_STATE.getState()][UniversalTag.ENUMERATED.getValue()] = new GrammarTransition(
+        super.transitions[PasswordPolicyResponseControlStates.PPOLICY_ERROR_STATE.ordinal()][UniversalTag.ENUMERATED.getValue()] = new GrammarTransition(
             PasswordPolicyResponseControlStates.PPOLICY_ERROR_STATE, PasswordPolicyResponseControlStates.END_STATE,
             UniversalTag.ENUMERATED.getValue(), new GrammarAction( "set ppolicy error value" )
             {
@@ -118,7 +118,7 @@ public class PasswordPolicyResponseContr
                 }
             } );
 
-        super.transitions[PasswordPolicyResponseControlStates.START_STATE.getState()][PasswordPolicyResponseControlTags.GRACE_AUTHNS_REMAINING_TAG
+        super.transitions[PasswordPolicyResponseControlStates.START_STATE.ordinal()][PasswordPolicyResponseControlTags.GRACE_AUTHNS_REMAINING_TAG
             .getValue()] = new GrammarTransition( PasswordPolicyResponseControlStates.START_STATE,
             PasswordPolicyResponseControlStates.PPOLICY_ERROR_STATE,
             PasswordPolicyResponseControlTags.GRACE_AUTHNS_REMAINING_TAG.getValue(), new GrammarAction(
@@ -150,7 +150,7 @@ public class PasswordPolicyResponseContr
                 }
             } );
 
-        super.transitions[PasswordPolicyResponseControlStates.START_STATE.getState()][UniversalTag.ENUMERATED.getValue()] = new GrammarTransition(
+        super.transitions[PasswordPolicyResponseControlStates.START_STATE.ordinal()][UniversalTag.ENUMERATED.getValue()] = new GrammarTransition(
             PasswordPolicyResponseControlStates.START_STATE, PasswordPolicyResponseControlStates.PPOLICY_ERROR_STATE,
             UniversalTag.ENUMERATED.getValue(), new GrammarAction( "set ppolicy error value" )
             {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlStates.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlStates.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlStates.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlStates.java Fri Oct 29 08:12:05 2010
@@ -33,47 +33,20 @@ import org.apache.directory.shared.asn1.
 public enum PasswordPolicyResponseControlStates implements States
 {
 
-    /** The initial state of every grammar */
-    INIT_GRAMMAR_STATE(0),
-
     /** The ending state for every grammars */
-    GRAMMAR_END(-1),
-
-    START_STATE(0),
+    GRAMMAR_END,
 
-    PPOLICY_TIME_BEFORE_EXPIRATION_STATE(1),
+    START_STATE,
 
-    PPOLICY_GRACE_AUTHNS_REMAINING_STATE(2),
+    PPOLICY_TIME_BEFORE_EXPIRATION_STATE,
 
-    PPOLICY_ERROR_STATE(3),
+    PPOLICY_GRACE_AUTHNS_REMAINING_STATE,
 
-    END_STATE(4);
+    PPOLICY_ERROR_STATE,
 
-    private int state;
-    
-    /**
-     * 
-     * Creates a new instance of PasswordPolicyResponseControlStates.
-     *
-     * @param state
-     */
-    private PasswordPolicyResponseControlStates(int state)
-    {
-        this.state = state;
-    }
+    END_STATE;
 
     /**
-     * 
-     * Get the state.
-     *
-     * @return State as integer value
-     */
-    public int getState()
-    {
-        return state;
-    }
-    
-    /**
      * {@inheritDoc}
      */
     public String getGrammarName( Grammar grammar )
@@ -100,7 +73,7 @@ public enum PasswordPolicyResponseContro
      */
     public String getState( int state )
     {
-        return ( ( state == GRAMMAR_END.getState() ) ? "PASSWORD_POLICY_RESPONSE_CONTROL_GRAMMAR" : name() );
+        return ( ( state == GRAMMAR_END.ordinal() ) ? "PASSWORD_POLICY_RESPONSE_CONTROL_GRAMMAR" : name() );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlContainer.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlContainer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlContainer.java Fri Oct 29 08:12:05 2010
@@ -45,7 +45,7 @@ public class SyncDoneValueControlContain
         super();
         stateStack = new int[1];
         grammar = SyncDoneValueControlGrammar.getInstance();
-        setTransition( SyncDoneValueControlStatesEnum.INIT_GRAMMAR_STATE );
+        setTransition( SyncDoneValueControlStatesEnum.START_STATE );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlGrammar.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlGrammar.java Fri Oct 29 08:12:05 2010
@@ -73,7 +73,7 @@ public final class SyncDoneValueControlG
     {
         setName( SyncDoneValueControlGrammar.class.getName() );
 
-        super.transitions = new GrammarTransition[SyncDoneValueControlStatesEnum.LAST_SYNC_DONE_VALUE_STATE.getState()][256];
+        super.transitions = new GrammarTransition[SyncDoneValueControlStatesEnum.LAST_SYNC_DONE_VALUE_STATE.ordinal()][256];
 
         /** 
          * Transition from initial state to SyncDoneValue sequence
@@ -82,8 +82,8 @@ public final class SyncDoneValueControlG
          *     
          * Initialize the syncDoneValue object
          */
-        super.transitions[SyncDoneValueControlStatesEnum.INIT_GRAMMAR_STATE.getState()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            SyncDoneValueControlStatesEnum.INIT_GRAMMAR_STATE, SyncDoneValueControlStatesEnum.SYNC_DONE_VALUE_SEQUENCE_STATE, UniversalTag.SEQUENCE.getValue(),
+        super.transitions[SyncDoneValueControlStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
+            SyncDoneValueControlStatesEnum.START_STATE, SyncDoneValueControlStatesEnum.SYNC_DONE_VALUE_SEQUENCE_STATE, UniversalTag.SEQUENCE.getValue(),
             new GrammarAction( "Initialization" )
             {
                 public void action( Asn1Container container ) throws DecoderException
@@ -102,7 +102,7 @@ public final class SyncDoneValueControlG
          *    ....
          * }
          */
-        super.transitions[SyncDoneValueControlStatesEnum.SYNC_DONE_VALUE_SEQUENCE_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[SyncDoneValueControlStatesEnum.SYNC_DONE_VALUE_SEQUENCE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             SyncDoneValueControlStatesEnum.SYNC_DONE_VALUE_SEQUENCE_STATE, SyncDoneValueControlStatesEnum.COOKIE_STATE,
             UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set SyncDoneValueControl cookie" )
             {
@@ -161,7 +161,7 @@ public final class SyncDoneValueControlG
          *    refreshDeletes BOOLEAN DEFAULT FALSE
          * }
          */
-        super.transitions[SyncDoneValueControlStatesEnum.COOKIE_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = new GrammarTransition(
+        super.transitions[SyncDoneValueControlStatesEnum.COOKIE_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = new GrammarTransition(
             SyncDoneValueControlStatesEnum.COOKIE_STATE, SyncDoneValueControlStatesEnum.REFRESH_DELETES_STATE,
             UniversalTag.BOOLEAN.getValue(), refreshDeletesTagAction );
         
@@ -172,7 +172,7 @@ public final class SyncDoneValueControlG
          *    refreshDeletes BOOLEAN DEFAULT FALSE
          * }
          */
-        super.transitions[SyncDoneValueControlStatesEnum.SYNC_DONE_VALUE_SEQUENCE_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = new GrammarTransition(
+        super.transitions[SyncDoneValueControlStatesEnum.SYNC_DONE_VALUE_SEQUENCE_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = new GrammarTransition(
             SyncDoneValueControlStatesEnum.SYNC_DONE_VALUE_SEQUENCE_STATE, SyncDoneValueControlStatesEnum.REFRESH_DELETES_STATE,
             UniversalTag.BOOLEAN.getValue(), refreshDeletesTagAction );
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlStatesEnum.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlStatesEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlStatesEnum.java Fri Oct 29 08:12:05 2010
@@ -27,61 +27,29 @@ import org.apache.directory.shared.asn1.
 /**
  * ASN.1 grammer constants of SyncDoneValueControl.
  * 
- * TODO: should this be an enum?
- *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum SyncDoneValueControlStatesEnum implements States
 {
-    /** The initial state of every grammar */
-    INIT_GRAMMAR_STATE(0),
-
-    /** The ending state for every grammars */
-    GRAMMAR_END(-1),
 
     /** The END_STATE */
-    END_STATE(-1),
-
+    END_STATE,
     
     /***/
-    START_STATE(0),
+    START_STATE,
 
     /** sequence start state */
-    SYNC_DONE_VALUE_SEQUENCE_STATE(1),
+    SYNC_DONE_VALUE_SEQUENCE_STATE,
 
     /** cookie value state */
-    COOKIE_STATE(2),
+    COOKIE_STATE,
 
     /** refreshDeletes value state */
-    REFRESH_DELETES_STATE(3),
+    REFRESH_DELETES_STATE,
 
     /** terminal state */
-    LAST_SYNC_DONE_VALUE_STATE(4);
+    LAST_SYNC_DONE_VALUE_STATE;
 
-    private int state;
-    
-    /**
-     * 
-     * Creates a new instance of SyncDoneValueControlStatesEnum.
-     *
-     * @param state
-     */
-    private SyncDoneValueControlStatesEnum(int state)
-    {
-        this.state = state;
-    }
-
-    /**
-     * 
-     * Get the state.
-     *
-     * @return State as integer value
-     */
-    public int getState()
-    {
-        return state;
-    }
-    
     /**
      * Get the grammar name
      * 
@@ -119,7 +87,7 @@ public enum SyncDoneValueControlStatesEn
      */
     public String getState( int state )
     {
-        return ( ( state == GRAMMAR_END.getState() ) ? "SYNC_DONE_VALUE_GRAMMAR" : this.name() );
+        return ( ( state == END_STATE.ordinal() ) ? "SYNC_DONE_VALUE_GRAMMAR" : this.name() );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlContainer.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlContainer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlContainer.java Fri Oct 29 08:12:05 2010
@@ -43,7 +43,7 @@ public class SyncInfoValueControlContain
         super();
         stateStack = new int[1];
         grammar = SyncInfoValueControlGrammar.getInstance();
-        setTransition( SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE );
+        setTransition( SyncInfoValueControlStatesEnum.START_STATE );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlGrammar.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlGrammar.java Fri Oct 29 08:12:05 2010
@@ -82,7 +82,7 @@ public final class SyncInfoValueControlG
         setName( SyncInfoValueControlGrammar.class.getName() );
 
         // Create the transitions table
-        super.transitions = new GrammarTransition[SyncInfoValueControlStatesEnum.LAST_SYNC_INFO_VALUE_STATE.getState()][256];
+        super.transitions = new GrammarTransition[SyncInfoValueControlStatesEnum.LAST_SYNC_INFO_VALUE_STATE.ordinal()][256];
 
         /** 
          * Transition from initial state to SyncInfoValue newCookie choice
@@ -92,8 +92,8 @@ public final class SyncInfoValueControlG
          *     
          * Initialize the syncInfoValue object
          */
-        super.transitions[SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE.getState()][SyncInfoValueTags.NEW_COOKIE_TAG.getValue()] = 
-            new GrammarTransition( SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE, 
+        super.transitions[SyncInfoValueControlStatesEnum.START_STATE.ordinal()][SyncInfoValueTags.NEW_COOKIE_TAG.getValue()] = 
+            new GrammarTransition( SyncInfoValueControlStatesEnum.START_STATE, 
                                     SyncInfoValueControlStatesEnum.NEW_COOKIE_STATE, 
                                     SyncInfoValueTags.NEW_COOKIE_TAG.getValue(), 
                 new GrammarAction( "NewCookie choice for SyncInfoValueControl" )
@@ -133,8 +133,8 @@ public final class SyncInfoValueControlG
          *     
          * Initialize the syncInfoValue object
          */
-        super.transitions[SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE.getState()][SyncInfoValueTags.REFRESH_DELETE_TAG.getValue()] = 
-            new GrammarTransition( SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE, 
+        super.transitions[SyncInfoValueControlStatesEnum.START_STATE.ordinal()][SyncInfoValueTags.REFRESH_DELETE_TAG.getValue()] = 
+            new GrammarTransition( SyncInfoValueControlStatesEnum.START_STATE, 
                                     SyncInfoValueControlStatesEnum.REFRESH_DELETE_STATE, 
                                     SyncInfoValueTags.REFRESH_DELETE_TAG.getValue(), 
                 new GrammarAction( "RefreshDelete choice for SyncInfoValueControl" )
@@ -162,7 +162,7 @@ public final class SyncInfoValueControlG
          *     
          * Load the cookie object
          */
-        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_DELETE_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_DELETE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.REFRESH_DELETE_STATE, 
                                     SyncInfoValueControlStatesEnum.REFRESH_DELETE_COOKIE_STATE, 
                                     UniversalTag.OCTET_STRING.getValue(), 
@@ -201,7 +201,7 @@ public final class SyncInfoValueControlG
          *     
          * Load the refreshDone flag
          */
-        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_DELETE_COOKIE_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_DELETE_COOKIE_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.REFRESH_DELETE_COOKIE_STATE, 
                                     SyncInfoValueControlStatesEnum.LAST_SYNC_INFO_VALUE_STATE, 
                                     UniversalTag.BOOLEAN.getValue(), 
@@ -254,7 +254,7 @@ public final class SyncInfoValueControlG
          *     
          * Load the refreshDone flag
          */
-        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_DELETE_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_DELETE_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.REFRESH_DELETE_STATE, 
                                     SyncInfoValueControlStatesEnum.LAST_SYNC_INFO_VALUE_STATE, 
                                     UniversalTag.BOOLEAN.getValue(), 
@@ -307,8 +307,8 @@ public final class SyncInfoValueControlG
          *     
          * Initialize the syncInfoValue object
          */
-        super.transitions[SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE.getState()][SyncInfoValueTags.REFRESH_PRESENT_TAG.getValue()] = 
-            new GrammarTransition( SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE, 
+        super.transitions[SyncInfoValueControlStatesEnum.START_STATE.ordinal()][SyncInfoValueTags.REFRESH_PRESENT_TAG.getValue()] = 
+            new GrammarTransition( SyncInfoValueControlStatesEnum.START_STATE, 
                                     SyncInfoValueControlStatesEnum.REFRESH_PRESENT_STATE, 
                                     SyncInfoValueTags.REFRESH_PRESENT_TAG.getValue(), 
                 new GrammarAction( "RefreshDelete choice for SyncInfoValueControl" )
@@ -336,7 +336,7 @@ public final class SyncInfoValueControlG
          *     
          * Load the cookie object
          */
-        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_PRESENT_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_PRESENT_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.REFRESH_PRESENT_STATE, 
                                     SyncInfoValueControlStatesEnum.REFRESH_PRESENT_COOKIE_STATE, 
                                     UniversalTag.OCTET_STRING.getValue(), 
@@ -377,7 +377,7 @@ public final class SyncInfoValueControlG
          *     
          * Load the refreshDone flag
          */
-        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_PRESENT_COOKIE_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_PRESENT_COOKIE_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.REFRESH_PRESENT_COOKIE_STATE, 
                                     SyncInfoValueControlStatesEnum.LAST_SYNC_INFO_VALUE_STATE, 
                                     UniversalTag.BOOLEAN.getValue(), 
@@ -430,7 +430,7 @@ public final class SyncInfoValueControlG
          *     
          * Load the refreshDone flag
          */
-        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_PRESENT_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.REFRESH_PRESENT_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.REFRESH_PRESENT_STATE, 
                                     SyncInfoValueControlStatesEnum.LAST_SYNC_INFO_VALUE_STATE, 
                                     UniversalTag.BOOLEAN.getValue(), 
@@ -482,8 +482,8 @@ public final class SyncInfoValueControlG
          *     
          * Initialize the syncInfoValue object
          */
-        super.transitions[SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE.getState()][SyncInfoValueTags.SYNC_ID_SET_TAG.getValue()] = 
-            new GrammarTransition( SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE, 
+        super.transitions[SyncInfoValueControlStatesEnum.START_STATE.ordinal()][SyncInfoValueTags.SYNC_ID_SET_TAG.getValue()] = 
+            new GrammarTransition( SyncInfoValueControlStatesEnum.START_STATE, 
                                     SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE, 
                                     SyncInfoValueTags.SYNC_ID_SET_TAG.getValue(), 
                 new GrammarAction( "SyncIdSet choice for SyncInfoValueControl" )
@@ -508,7 +508,7 @@ public final class SyncInfoValueControlG
          *     
          * Load the cookie object
          */
-        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE, 
                                     SyncInfoValueControlStatesEnum.SYNC_ID_SET_COOKIE_STATE, 
                                     UniversalTag.OCTET_STRING.getValue(), 
@@ -544,7 +544,7 @@ public final class SyncInfoValueControlG
          *     
          * Load the refreshDeletes flag
          */
-        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE, 
                                     SyncInfoValueControlStatesEnum.SYNC_ID_SET_REFRESH_DELETES_STATE, 
                                     UniversalTag.BOOLEAN.getValue(), 
@@ -590,7 +590,7 @@ public final class SyncInfoValueControlG
          *     
          * Load the refreshDeletes flag
          */
-        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_COOKIE_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_COOKIE_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.SYNC_ID_SET_COOKIE_STATE, 
                                     SyncInfoValueControlStatesEnum.SYNC_ID_SET_REFRESH_DELETES_STATE, 
                                     UniversalTag.BOOLEAN.getValue(), 
@@ -636,7 +636,7 @@ public final class SyncInfoValueControlG
          *     
          * Initialize the UUID set : no action associated, except allowing a grammar end
          */
-        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE.getState()][UniversalTag.SET.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE.ordinal()][UniversalTag.SET.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.SYNC_ID_SET_STATE, 
                                     SyncInfoValueControlStatesEnum.SYNC_ID_SET_SET_OF_UUIDS_STATE, 
                                     UniversalTag.SET.getValue(), 
@@ -662,7 +662,7 @@ public final class SyncInfoValueControlG
          *     
          * Initialize the UUID set : no action associated
          */
-        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_COOKIE_STATE.getState()][UniversalTag.SET.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_COOKIE_STATE.ordinal()][UniversalTag.SET.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.SYNC_ID_SET_COOKIE_STATE, 
                                     SyncInfoValueControlStatesEnum.SYNC_ID_SET_SET_OF_UUIDS_STATE, 
                                     UniversalTag.SET.getValue(),
@@ -688,7 +688,7 @@ public final class SyncInfoValueControlG
          *     
          * Initialize the UUID set : no action associated
          */
-        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_REFRESH_DELETES_STATE.getState()][UniversalTag.SET.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_REFRESH_DELETES_STATE.ordinal()][UniversalTag.SET.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.SYNC_ID_SET_REFRESH_DELETES_STATE, 
                                     SyncInfoValueControlStatesEnum.SYNC_ID_SET_SET_OF_UUIDS_STATE, 
                                     UniversalTag.SET.getValue(), 
@@ -714,7 +714,7 @@ public final class SyncInfoValueControlG
          *     
          * Add the first UUID in the UUIDs list
          */
-        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_SET_OF_UUIDS_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_SET_OF_UUIDS_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.SYNC_ID_SET_SET_OF_UUIDS_STATE, 
                                     SyncInfoValueControlStatesEnum.SYNC_ID_SET_UUID_STATE, 
                                     UniversalTag.OCTET_STRING.getValue(), 
@@ -761,7 +761,7 @@ public final class SyncInfoValueControlG
          *     
          * Add a new UUID in the UUIDs list
          */
-        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_UUID_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = 
+        super.transitions[SyncInfoValueControlStatesEnum.SYNC_ID_SET_UUID_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
             new GrammarTransition( SyncInfoValueControlStatesEnum.SYNC_ID_SET_UUID_STATE, 
                                     SyncInfoValueControlStatesEnum.SYNC_ID_SET_UUID_STATE, 
                                     UniversalTag.OCTET_STRING.getValue(), 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlStatesEnum.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlStatesEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlStatesEnum.java Fri Oct 29 08:12:05 2010
@@ -22,15 +22,12 @@ package org.apache.directory.shared.ldap
 
 import org.apache.directory.shared.asn1.ber.grammar.Grammar;
 import org.apache.directory.shared.asn1.ber.grammar.States;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControlStatesEnum;
 
 
 /**
  * This class store the SyncInfoValueControl's grammar constants. It is also used for
  * debugging purposes.
  * 
- * TODO: should this be an enum?
- * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum SyncInfoValueControlStatesEnum implements States
@@ -38,85 +35,56 @@ public enum SyncInfoValueControlStatesEn
     // ~ Static fields/initializers
     // -----------------------------------------------------------------
 
-    /** The initial state of every grammar */
-    INIT_GRAMMAR_STATE(0),
-
-    /** The ending state for every grammars */
-    GRAMMAR_END(-1),
-
     /** The END_STATE */
-    END_STATE(-1),
+    END_STATE,
 
     // =========================================================================
     // SyncRequestValue control grammar states
     // =========================================================================
     /** Initial state */
-    START_STATE(0),
+    START_STATE,
 
     /** NewCookie state */
-    NEW_COOKIE_STATE(1),
+    NEW_COOKIE_STATE,
 
     /** RefreshDelete state */
-    REFRESH_DELETE_STATE(2),
+    REFRESH_DELETE_STATE,
     
     /** RefreshDelete cookie state */
-    REFRESH_DELETE_COOKIE_STATE(3),
+    REFRESH_DELETE_COOKIE_STATE,
     
     /** RefreshDelete refreshDone state */
-    REFRESH_DELETE_REFRESH_DONE_STATE(4),
+    REFRESH_DELETE_REFRESH_DONE_STATE,
     
     /** RefreshPresent state */
-    REFRESH_PRESENT_STATE(5),
+    REFRESH_PRESENT_STATE,
     
     /** RefreshPresent cookie state */
-    REFRESH_PRESENT_COOKIE_STATE(6),
+    REFRESH_PRESENT_COOKIE_STATE,
     
     /** RefreshPresent refreshDone state */
-    REFRESH_PRESENT_REFRESH_DONE_STATE(7),
+    REFRESH_PRESENT_REFRESH_DONE_STATE,
     
     /** SyncIdSet state */
-    SYNC_ID_SET_STATE(8),
+    SYNC_ID_SET_STATE,
     
     /** SyncIdSet cookie state */
-    SYNC_ID_SET_COOKIE_STATE(9),
+    SYNC_ID_SET_COOKIE_STATE,
     
     /** SyncIdSet refreshDone state */
-    SYNC_ID_SET_REFRESH_DELETES_STATE(10),
+    SYNC_ID_SET_REFRESH_DELETES_STATE,
     
     /** SyncIdSet SET OF UUIDs state */
-    SYNC_ID_SET_SET_OF_UUIDS_STATE(11),
+    SYNC_ID_SET_SET_OF_UUIDS_STATE,
     
     /** SyncIdSet UUID state */
-    SYNC_ID_SET_UUID_STATE(12),
+    SYNC_ID_SET_UUID_STATE,
 
     /** terminal state */
-    LAST_SYNC_INFO_VALUE_STATE(13);
+    LAST_SYNC_INFO_VALUE_STATE;
 
-    private int state;
-    
-    /**
-     * 
-     * Creates a new instance of SyncInfoValueControlStatesEnum.
-     *
-     * @param state
-     */
-    SyncInfoValueControlStatesEnum(int state)
-    {
-        this.state = state;
-    }
 
     /**
-     * 
-     * Get the state.
-     *
-     * @return State as integer value
-     */
-    public int getState()
-    {
-        return state;
-    }
-    
-    /**
      * Get the grammar name
      * 
      * @param grammar The grammar code
@@ -153,7 +121,7 @@ public enum SyncInfoValueControlStatesEn
      */
     public String getState( int state )
     {
-        return ( ( state == GRAMMAR_END.getState() ) ? "SYNC_INFO_VALUE_END_STATE" : this.name() );
+        return ( ( state == END_STATE.ordinal() ) ? "SYNC_INFO_VALUE_END_STATE" : this.name() );
     }
 
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlContainer.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlContainer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlContainer.java Fri Oct 29 08:12:05 2010
@@ -43,7 +43,7 @@ public class SyncRequestValueControlCont
         super();
         stateStack = new int[1];
         grammar = SyncRequestValueControlGrammar.getInstance();
-        setTransition( SyncRequestValueControlStatesEnum.INIT_GRAMMAR_STATE );
+        setTransition( SyncRequestValueControlStatesEnum.START_STATE );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java Fri Oct 29 08:12:05 2010
@@ -33,7 +33,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueControlStatesEnum;
 import org.apache.directory.shared.ldap.message.control.replication.SynchronizationModeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -79,7 +78,7 @@ public final class SyncRequestValueContr
         setName( SyncRequestValueControlGrammar.class.getName() );
 
         // Create the transitions table
-        super.transitions = new GrammarTransition[SyncRequestValueControlStatesEnum.LAST_SYNC_REQUEST_VALUE_STATE.getState()][256];
+        super.transitions = new GrammarTransition[SyncRequestValueControlStatesEnum.LAST_SYNC_REQUEST_VALUE_STATE.ordinal()][256];
 
         /** 
          * Transition from initial state to SyncRequestValue sequence
@@ -88,8 +87,8 @@ public final class SyncRequestValueContr
          *     
          * Initialize the syncRequestValue object
          */
-        super.transitions[SyncRequestValueControlStatesEnum.INIT_GRAMMAR_STATE.getState()][UniversalTag.SEQUENCE.getValue()] = 
-            new GrammarTransition( SyncInfoValueControlStatesEnum.INIT_GRAMMAR_STATE, 
+        super.transitions[SyncRequestValueControlStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = 
+            new GrammarTransition( SyncRequestValueControlStatesEnum.START_STATE, 
                                     SyncRequestValueControlStatesEnum.SYNC_REQUEST_VALUE_SEQUENCE_STATE, 
                                     UniversalTag.SEQUENCE.getValue(), 
                 null );
@@ -108,7 +107,7 @@ public final class SyncRequestValueContr
          *     
          * Stores the mode value
          */
-        super.transitions[SyncRequestValueControlStatesEnum.SYNC_REQUEST_VALUE_SEQUENCE_STATE.getState()][UniversalTag.ENUMERATED.getValue()] = 
+        super.transitions[SyncRequestValueControlStatesEnum.SYNC_REQUEST_VALUE_SEQUENCE_STATE.ordinal()][UniversalTag.ENUMERATED.getValue()] = 
             new GrammarTransition( SyncRequestValueControlStatesEnum.SYNC_REQUEST_VALUE_SEQUENCE_STATE, 
                 SyncRequestValueControlStatesEnum.MODE_STATE, 
                 UniversalTag.ENUMERATED.getValue(),
@@ -157,7 +156,7 @@ public final class SyncRequestValueContr
          *     
          * Stores the cookie
          */
-        super.transitions[SyncRequestValueControlStatesEnum.MODE_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = 
+        super.transitions[SyncRequestValueControlStatesEnum.MODE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = 
             new GrammarTransition( SyncRequestValueControlStatesEnum.MODE_STATE,
                                     SyncRequestValueControlStatesEnum.COOKIE_STATE, UniversalTag.OCTET_STRING.getValue(),
                 new GrammarAction( "Set SyncRequestValueControl cookie" )
@@ -191,7 +190,7 @@ public final class SyncRequestValueContr
          *     
          * Stores the reloadHint flag
          */
-        super.transitions[SyncRequestValueControlStatesEnum.MODE_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = 
+        super.transitions[SyncRequestValueControlStatesEnum.MODE_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = 
             new GrammarTransition( SyncRequestValueControlStatesEnum.MODE_STATE,
                                     SyncRequestValueControlStatesEnum.RELOAD_HINT_STATE, UniversalTag.BOOLEAN.getValue(),
                 new GrammarAction( "Set SyncRequestValueControl reloadHint flag" )
@@ -234,7 +233,7 @@ public final class SyncRequestValueContr
          *     
          * Stores the reloadHint flag
          */
-        super.transitions[SyncRequestValueControlStatesEnum.COOKIE_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = 
+        super.transitions[SyncRequestValueControlStatesEnum.COOKIE_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = 
             new GrammarTransition( SyncRequestValueControlStatesEnum.COOKIE_STATE,
                                     SyncRequestValueControlStatesEnum.RELOAD_HINT_STATE, UniversalTag.BOOLEAN.getValue(),
                 new GrammarAction( "Set SyncRequestValueControl reloadHint flag" )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlStatesEnum.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlStatesEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlStatesEnum.java Fri Oct 29 08:12:05 2010
@@ -28,8 +28,6 @@ import org.apache.directory.shared.asn1.
  * This class store the SyncRequestValueControl's grammar constants. It is also used for
  * debugging purposes.
  * 
- * TODO: should this be an enum?
- * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum SyncRequestValueControlStatesEnum implements States
@@ -37,61 +35,31 @@ public enum SyncRequestValueControlState
     // ~ Static fields/initializers
     // -----------------------------------------------------------------
 
-    /** The initial state of every grammar */
-    INIT_GRAMMAR_STATE(0),
-
-    /** The ending state for every grammars */
-    GRAMMAR_END(-1),
-
     /** The END_STATE */
-    END_STATE(-1),
+    END_STATE,
 
     // =========================================================================
     // SyncRequestValue control grammar states
     // =========================================================================
     /** Initial state */
-    START_STATE(0),
+    START_STATE,
 
     /** Sequence Value */
-    SYNC_REQUEST_VALUE_SEQUENCE_STATE(1),
+    SYNC_REQUEST_VALUE_SEQUENCE_STATE,
 
     /** mode Value */
-    MODE_STATE(2),
+    MODE_STATE,
     
     /** cookie Value */
-    COOKIE_STATE(3),
+    COOKIE_STATE,
 
     /** reloadHint Value */
-    RELOAD_HINT_STATE(4),
+    RELOAD_HINT_STATE,
 
     /** terminal state */
-    LAST_SYNC_REQUEST_VALUE_STATE(5);
-
-    private int state;
-    
-    /**
-     * 
-     * Creates a new instance of SyncRequestValueControlStatesEnum.
-     *
-     * @param state
-     */
-    SyncRequestValueControlStatesEnum(int state)
-    {
-        this.state = state;
-    }
+    LAST_SYNC_REQUEST_VALUE_STATE;
 
     /**
-     * 
-     * Get the state.
-     *
-     * @return State as integer value
-     */
-    public int getState()
-    {
-        return state;
-    }
-    
-    /**
      * Get the grammar name
      * 
      * @param grammar The grammar code
@@ -128,7 +96,7 @@ public enum SyncRequestValueControlState
      */
     public String getState( int state )
     {
-        return ( ( state == GRAMMAR_END.getState() ) ? "SYNC_REQUEST_VALUE_END_STATE" : this.name() );
+        return ( ( state == END_STATE.ordinal() ) ? "SYNC_REQUEST_VALUE_END_STATE" : this.name() );
     }
 
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlContainer.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlContainer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlContainer.java Fri Oct 29 08:12:05 2010
@@ -43,7 +43,7 @@ public class SyncStateValueControlContai
         super();
         stateStack = new int[1];
         grammar = SyncStateValueControlGrammar.getInstance();
-        setTransition( SyncStateValueControlStatesEnum.INIT_GRAMMAR_STATE );
+        setTransition( SyncStateValueControlStatesEnum.START_STATE );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java Fri Oct 29 08:12:05 2010
@@ -76,7 +76,7 @@ public final class SyncStateValueControl
         setName( SyncStateValueControlGrammar.class.getName() );
 
         // Create the transitions table
-        super.transitions = new GrammarTransition[SyncStateValueControlStatesEnum.LAST_SYNC_STATE_VALUE_STATE.getState()][256];
+        super.transitions = new GrammarTransition[SyncStateValueControlStatesEnum.LAST_SYNC_STATE_VALUE_STATE.ordinal()][256];
 
         /** 
          * Transition from initial state to SyncStateValue sequence
@@ -85,8 +85,8 @@ public final class SyncStateValueControl
          *     
          * Initialize the syncStateValue object
          */
-        super.transitions[SyncStateValueControlStatesEnum.INIT_GRAMMAR_STATE.getState()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            SyncStateValueControlStatesEnum.INIT_GRAMMAR_STATE, SyncStateValueControlStatesEnum.SYNC_STATE_VALUE_SEQUENCE_STATE,
+        super.transitions[SyncStateValueControlStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
+            SyncStateValueControlStatesEnum.START_STATE, SyncStateValueControlStatesEnum.SYNC_STATE_VALUE_SEQUENCE_STATE,
             UniversalTag.SEQUENCE.getValue(), null );
 
         /** 
@@ -102,7 +102,7 @@ public final class SyncStateValueControl
          *     
          * Stores the sync state type value
          */
-        super.transitions[SyncStateValueControlStatesEnum.SYNC_STATE_VALUE_SEQUENCE_STATE.getState()][UniversalTag.ENUMERATED.getValue()] = new GrammarTransition(
+        super.transitions[SyncStateValueControlStatesEnum.SYNC_STATE_VALUE_SEQUENCE_STATE.ordinal()][UniversalTag.ENUMERATED.getValue()] = new GrammarTransition(
             SyncStateValueControlStatesEnum.SYNC_STATE_VALUE_SEQUENCE_STATE,
             SyncStateValueControlStatesEnum.SYNC_TYPE_STATE, UniversalTag.ENUMERATED.getValue(), new GrammarAction(
                 "Set SyncStateValueControl state type" )
@@ -148,7 +148,7 @@ public final class SyncStateValueControl
          *     
          * Stores the entryUUID
          */
-        super.transitions[SyncStateValueControlStatesEnum.SYNC_TYPE_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[SyncStateValueControlStatesEnum.SYNC_TYPE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             SyncStateValueControlStatesEnum.SYNC_TYPE_STATE, SyncStateValueControlStatesEnum.SYNC_UUID_STATE,
             UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set SyncStateValueControl entryUUID" )
             {
@@ -180,7 +180,7 @@ public final class SyncStateValueControl
          *     
          * Stores the reloadHint flag
          */
-        super.transitions[SyncStateValueControlStatesEnum.SYNC_UUID_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[SyncStateValueControlStatesEnum.SYNC_UUID_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             SyncStateValueControlStatesEnum.SYNC_UUID_STATE, SyncStateValueControlStatesEnum.COOKIE_STATE,
             UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set SyncStateValueControl cookie value" )
             {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlStatesEnum.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlStatesEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlStatesEnum.java Fri Oct 29 08:12:05 2010
@@ -28,8 +28,6 @@ import org.apache.directory.shared.asn1.
  * This class store the SyncStateValueControl's grammar constants. It is also used for
  * debugging purposes.
  * 
- * TODO: should this be an enum?
- * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum SyncStateValueControlStatesEnum implements States
@@ -37,61 +35,31 @@ public enum SyncStateValueControlStatesE
     // ~ Static fields/initializers
     // -----------------------------------------------------------------
 
-    /** The initial state of every grammar */
-    INIT_GRAMMAR_STATE(0),
-
-    /** The ending state for every grammars */
-    GRAMMAR_END(-1),
-
     /** The END_STATE */
-    END_STATE(-1),
+    END_STATE,
 
     // =========================================================================
     // SyncStateValue control grammar states
     // =========================================================================
     /** Initial state */
-    START_STATE(0),
+    START_STATE,
 
     /** Sequence Value */
-    SYNC_STATE_VALUE_SEQUENCE_STATE(1),
+    SYNC_STATE_VALUE_SEQUENCE_STATE,
 
     /** sync state type Value */
-    SYNC_TYPE_STATE(2),
+    SYNC_TYPE_STATE,
     
     /** syncUUID Value */
-    SYNC_UUID_STATE(3),
+    SYNC_UUID_STATE,
 
     /** cookie Value */
-    COOKIE_STATE(4),
+    COOKIE_STATE,
 
     /** terminal state */
-    LAST_SYNC_STATE_VALUE_STATE(5);
-
-    private int state;
-    
-    /**
-     * 
-     * Creates a new instance of SyncStateValueControlStatesEnum.
-     *
-     * @param state
-     */
-    private SyncStateValueControlStatesEnum(int state)
-    {
-        this.state = state;
-    }
+    LAST_SYNC_STATE_VALUE_STATE;
 
     /**
-     * 
-     * Get the state.
-     *
-     * @return State as integer value
-     */
-    public int getState()
-    {
-        return state;
-    }
-    
-    /**
      * Get the grammar name
      * 
      * @param grammar The grammar code
@@ -128,7 +96,7 @@ public enum SyncStateValueControlStatesE
      */
     public String getState( int state )
     {
-        return ( ( state == GRAMMAR_END.getState() ) ? "SYNC_STATE_VALUE_END_STATE" : this.name() );
+        return ( ( state == END_STATE.ordinal() ) ? "SYNC_STATE_VALUE_END_STATE" : this.name() );
     }
 
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlContainer.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlContainer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlContainer.java Fri Oct 29 08:12:05 2010
@@ -43,7 +43,7 @@ public class SyncModifyDnControlContaine
         super();
         stateStack = new int[1];
         grammar = SyncModifyDnControlGrammar.getInstance();
-        setTransition( SyncModifyDnControlStatesEnum.INIT_GRAMMAR_STATE );
+        setTransition( SyncModifyDnControlStatesEnum.START_SYNC_MODDN );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlGrammar.java Fri Oct 29 08:12:05 2010
@@ -84,7 +84,7 @@ public final class SyncModifyDnControlGr
         setName( SyncModifyDnControlGrammar.class.getName() );
 
         // Create the transitions table
-        super.transitions = new GrammarTransition[SyncModifyDnControlStatesEnum.LAST_SYNC_MODDN_VALUE_STATE.getState()][256];
+        super.transitions = new GrammarTransition[SyncModifyDnControlStatesEnum.LAST_SYNC_MODDN_VALUE_STATE.ordinal()][256];
 
         /** 
          * Transition from initial state to SyncModifyDnControl sequence
@@ -93,8 +93,8 @@ public final class SyncModifyDnControlGr
          *     
          * Initialize the SyncModifyDnControl object
          */
-        super.transitions[SyncModifyDnControlStatesEnum.INIT_GRAMMAR_STATE.getState()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            SyncModifyDnControlStatesEnum.INIT_GRAMMAR_STATE, SyncModifyDnControlStatesEnum.SYNC_MODDN_VALUE_SEQUENCE_STATE,
+        super.transitions[SyncModifyDnControlStatesEnum.START_SYNC_MODDN.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
+            SyncModifyDnControlStatesEnum.START_SYNC_MODDN, SyncModifyDnControlStatesEnum.SYNC_MODDN_VALUE_SEQUENCE_STATE,
             UniversalTag.SEQUENCE.getValue(), null );
 
         /** 
@@ -105,7 +105,7 @@ public final class SyncModifyDnControlGr
          *     
          * Stores the entryDn value
          */
-        super.transitions[SyncModifyDnControlStatesEnum.SYNC_MODDN_VALUE_SEQUENCE_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[SyncModifyDnControlStatesEnum.SYNC_MODDN_VALUE_SEQUENCE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             SyncModifyDnControlStatesEnum.SYNC_MODDN_VALUE_SEQUENCE_STATE,
             SyncModifyDnControlStatesEnum.ENTRY_DN_STATE, UniversalTag.OCTET_STRING.getValue(), new GrammarAction(
                 "Set SyncModifyDnControl entryDn value" )
@@ -139,7 +139,7 @@ public final class SyncModifyDnControlGr
          * Stores the newSuperiorDn value
          */
 
-        super.transitions[SyncModifyDnControlStatesEnum.ENTRY_DN_STATE.getState()][SyncModifyDnControlTags.MOVE_TAG.getValue()] = new GrammarTransition(
+        super.transitions[SyncModifyDnControlStatesEnum.ENTRY_DN_STATE.ordinal()][SyncModifyDnControlTags.MOVE_TAG.getValue()] = new GrammarTransition(
             SyncModifyDnControlStatesEnum.ENTRY_DN_STATE, SyncModifyDnControlStatesEnum.MOVE_STATE,
             SyncModifyDnControlTags.MOVE_TAG.getValue(), new GrammarAction( "Set SyncModifyDnControl newSuperiorDn" )
             {
@@ -171,7 +171,7 @@ public final class SyncModifyDnControlGr
          * read the newSuperiorDn
          * move-name       [0] LDAPDN
          */
-        super.transitions[SyncModifyDnControlStatesEnum.ENTRY_DN_STATE.getState()][SyncModifyDnControlTags.RENAME_TAG.getValue()] = new GrammarTransition(
+        super.transitions[SyncModifyDnControlStatesEnum.ENTRY_DN_STATE.ordinal()][SyncModifyDnControlTags.RENAME_TAG.getValue()] = new GrammarTransition(
             SyncModifyDnControlStatesEnum.ENTRY_DN_STATE, SyncModifyDnControlStatesEnum.RENAME_STATE,
             SyncModifyDnControlTags.RENAME_TAG.getValue(), new GrammarAction( "enter SyncModifyDnControl rename choice" )
             {
@@ -193,7 +193,7 @@ public final class SyncModifyDnControlGr
          *            
          * Stores the newRdn value
          */
-        super.transitions[SyncModifyDnControlStatesEnum.RENAME_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[SyncModifyDnControlStatesEnum.RENAME_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             SyncModifyDnControlStatesEnum.RENAME_STATE, SyncModifyDnControlStatesEnum.RENAME_NEW_RDN_STATE,
             UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set SyncModifyDnControl newRdn value" )
             {
@@ -227,7 +227,7 @@ public final class SyncModifyDnControlGr
          *            
          * Stores the deleteOldRdn value
          */
-        super.transitions[SyncModifyDnControlStatesEnum.RENAME_NEW_RDN_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = new GrammarTransition(
+        super.transitions[SyncModifyDnControlStatesEnum.RENAME_NEW_RDN_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = new GrammarTransition(
             SyncModifyDnControlStatesEnum.RENAME_NEW_RDN_STATE, SyncModifyDnControlStatesEnum.RENAME_DEL_OLD_RDN_STATE,
             UniversalTag.BOOLEAN.getValue(), new GrammarAction( "Set SyncModifyDnControl deleteOldRdn value" )
             {
@@ -260,7 +260,7 @@ public final class SyncModifyDnControlGr
          *     
          * Stores the deleteOldRdn flag
          */
-        super.transitions[SyncModifyDnControlStatesEnum.ENTRY_DN_STATE.getState()][SyncModifyDnControlTags.MOVEANDRENAME_TAG.getValue()] = new GrammarTransition(
+        super.transitions[SyncModifyDnControlStatesEnum.ENTRY_DN_STATE.ordinal()][SyncModifyDnControlTags.MOVEANDRENAME_TAG.getValue()] = new GrammarTransition(
             SyncModifyDnControlStatesEnum.ENTRY_DN_STATE, SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_STATE,
             SyncModifyDnControlTags.MOVEANDRENAME_TAG.getValue(), new GrammarAction( "enter SyncModifyDnControl moveAndRename choice" )
             {
@@ -282,7 +282,7 @@ public final class SyncModifyDnControlGr
          *            
          * Stores the newRdn value
          */
-        super.transitions[SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_STATE, SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_NEW_SUPERIOR_DN_STATE,
             UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set SyncModifyDnControl moveAndRename state's newSuperirorDN value" )
             {
@@ -314,7 +314,7 @@ public final class SyncModifyDnControlGr
          *            
          * Stores the newRdn value
          */
-        super.transitions[SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_NEW_SUPERIOR_DN_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_NEW_SUPERIOR_DN_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_NEW_SUPERIOR_DN_STATE, SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_NEW_RDN_STATE,
             UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set SyncModifyDnControl moveAndRename state's newRdn value" )
             {
@@ -346,7 +346,7 @@ public final class SyncModifyDnControlGr
          *     
          * Stores the deleteOldRdn flag
          */
-        super.transitions[SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_NEW_RDN_STATE.getState()][UniversalTag.BOOLEAN.getValue()] = new GrammarTransition(
+        super.transitions[SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_NEW_RDN_STATE.ordinal()][UniversalTag.BOOLEAN.getValue()] = new GrammarTransition(
             SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_NEW_RDN_STATE, SyncModifyDnControlStatesEnum.MOVE_AND_RENAME_DEL_OLD_RDN_STATE,
             UniversalTag.BOOLEAN.getValue(), new GrammarAction( "Set SyncModifyDnControl deleteOldRdn value" )
             {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlStatesEnum.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlStatesEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncmodifydn/SyncModifyDnControlStatesEnum.java Fri Oct 29 08:12:05 2010
@@ -28,8 +28,6 @@ import org.apache.directory.shared.asn1.
  * This class store the SyncModifyDnControl's grammar constants. It is also used for
  * debugging purposes.
  * 
- * TODO: should this be an enum?
- * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum SyncModifyDnControlStatesEnum implements States
@@ -37,77 +35,47 @@ public enum SyncModifyDnControlStatesEnu
     // ~ Static fields/initializers
     // -----------------------------------------------------------------
 
-    /** The initial state of every grammar */
-    INIT_GRAMMAR_STATE(0),
-
-    /** The ending state for every grammars */
-    GRAMMAR_END(-1),
-
     /** The END_STATE */
-    END_STATE(-1),
+    END_STATE,
 
     // =========================================================================
     // SyncModifyDnControl's control grammar states
     // =========================================================================
     /** Initial state */
-    START_SYNC_MODDN(0),
+    START_SYNC_MODDN,
 
     /** Sequence Value */
-    SYNC_MODDN_VALUE_SEQUENCE_STATE(1),
+    SYNC_MODDN_VALUE_SEQUENCE_STATE,
 
     /** modDn control's entryDN */
-    ENTRY_DN_STATE(2),
+    ENTRY_DN_STATE,
     
     /** modDn control's move operation state */
-    MOVE_STATE(3),
+    MOVE_STATE,
     
     /** modDn rename sequence */
-    RENAME_STATE(4),
+    RENAME_STATE,
 
     /** modDn rename sequence */
-    MOVE_AND_RENAME_STATE(5),
+    MOVE_AND_RENAME_STATE,
 
     /** modDn control's rename newRDN */
-    RENAME_NEW_RDN_STATE(6),
+    RENAME_NEW_RDN_STATE,
 
     /** modDn control's rename deleteOldRdn flag */
-    RENAME_DEL_OLD_RDN_STATE(7),
+    RENAME_DEL_OLD_RDN_STATE,
     
     /** modDn control's move and rename newSuperiorDN */
-    MOVE_AND_RENAME_NEW_SUPERIOR_DN_STATE(8),
+    MOVE_AND_RENAME_NEW_SUPERIOR_DN_STATE,
 
     /** modDn control's move and rename newRDN */
-    MOVE_AND_RENAME_NEW_RDN_STATE(9),
+    MOVE_AND_RENAME_NEW_RDN_STATE,
 
     /** modDn control's move and rename deleteOldRdn flag */
-    MOVE_AND_RENAME_DEL_OLD_RDN_STATE(10),
+    MOVE_AND_RENAME_DEL_OLD_RDN_STATE,
 
     /** terminal state */
-    LAST_SYNC_MODDN_VALUE_STATE(11);
-    
-    private int state;
-    
-    /**
-     * 
-     * Creates a new instance of SyncModifyDnControlStatesEnum.
-     *
-     * @param state
-     */
-    SyncModifyDnControlStatesEnum(int state)
-    {
-        this.state = state;
-    }
-
-    /**
-     * 
-     * Get the state.
-     *
-     * @return State as integer value
-     */
-    public int getState()
-    {
-        return state;
-    }
+    LAST_SYNC_MODDN_VALUE_STATE;
     
     /**
      * Get the grammar name
@@ -146,7 +114,7 @@ public enum SyncModifyDnControlStatesEnu
      */
     public String getState( int state )
     {
-        return ( ( state == GRAMMAR_END.getState() ) ? "SYNC_MODDN_VALUE_END_STATE" : this.name() );
+        return ( ( state == END_STATE.ordinal() ) ? "SYNC_MODDN_VALUE_END_STATE" : this.name() );
     }
 
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelContainer.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelContainer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelContainer.java Fri Oct 29 08:12:05 2010
@@ -43,7 +43,7 @@ public class CancelContainer extends Abs
         super();
         stateStack = new int[1];
         grammar = CancelGrammar.getInstance();
-        setTransition( CancelStatesEnum.INIT_GRAMMAR_STATE );
+        setTransition( CancelStatesEnum.START_STATE );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelGrammar.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelGrammar.java Fri Oct 29 08:12:05 2010
@@ -70,7 +70,7 @@ public final class CancelGrammar extends
         setName( CancelGrammar.class.getName() );
 
         // Create the transitions table
-        super.transitions = new GrammarTransition[CancelStatesEnum.LAST_CANCEL_STATE.getState()][256];
+        super.transitions = new GrammarTransition[CancelStatesEnum.LAST_CANCEL_STATE.ordinal()][256];
 
         /**
          * Transition from init state to cancel sequence
@@ -79,8 +79,8 @@ public final class CancelGrammar extends
          * 
          * Creates the Cancel object
          */
-        super.transitions[CancelStatesEnum.INIT_GRAMMAR_STATE.getState()][UniversalTag.SEQUENCE.getValue()] = 
-            new GrammarTransition( CancelStatesEnum.INIT_GRAMMAR_STATE,
+        super.transitions[CancelStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = 
+            new GrammarTransition( CancelStatesEnum.START_STATE,
                                     CancelStatesEnum.CANCEL_SEQUENCE_STATE, 
                                     UniversalTag.SEQUENCE.getValue(),
                 new GrammarAction(
@@ -103,7 +103,7 @@ public final class CancelGrammar extends
          *     
          * Set the cancelId value into the Cancel object.    
          */
-        super.transitions[CancelStatesEnum.CANCEL_SEQUENCE_STATE.getState()][UniversalTag.INTEGER.getValue()] = 
+        super.transitions[CancelStatesEnum.CANCEL_SEQUENCE_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = 
             new GrammarTransition( CancelStatesEnum.CANCEL_SEQUENCE_STATE,
                                     CancelStatesEnum.CANCEL_ID_STATE, 
                                     UniversalTag.INTEGER.getValue(), 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelStatesEnum.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelStatesEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelStatesEnum.java Fri Oct 29 08:12:05 2010
@@ -28,8 +28,6 @@ import org.apache.directory.shared.asn1.
  * This class store the Cancel's grammar constants. It is also used
  * for debugging purposes.
  * 
- * TODO: should this be an enum?
- * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public enum CancelStatesEnum implements States
@@ -37,55 +35,25 @@ public enum CancelStatesEnum implements 
     // ~ Static fields/initializers
     // -----------------------------------------------------------------
 
-    /** The initial state of every grammar */
-    INIT_GRAMMAR_STATE(0),
-
-    /** The ending state for every grammars */
-    GRAMMAR_END(-1),
-
     /** The END_STATE */
-    END_STATE(-1),
+    END_STATE,
 
     // =========================================================================
     // Cancel grammar states
     // =========================================================================
     /** Initial state */
-    START_STATE(0),
+    START_STATE,
 
     /** Sequence */
-    CANCEL_SEQUENCE_STATE(1),
+    CANCEL_SEQUENCE_STATE,
 
     /** cancelId */
-    CANCEL_ID_STATE(2),
+    CANCEL_ID_STATE,
 
     /** terminal state */
-    LAST_CANCEL_STATE(3);
-
-    private int state;
-    
-    /**
-     * 
-     * Creates a new instance of CancelStatesEnum.
-     *
-     * @param state
-     */
-    CancelStatesEnum(int state)
-    {
-        this.state = state;
-    }
+    LAST_CANCEL_STATE;
 
     /**
-     * 
-     * Get the state.
-     *
-     * @return State as integer value
-     */
-    public int getState()
-    {
-        return state;
-    }
-    
-    /**
      * Get the grammar name
      * 
      * @param grammar The grammar code
@@ -122,7 +90,7 @@ public enum CancelStatesEnum implements 
      */
     public String getState( int state )
     {
-        return ( ( state == GRAMMAR_END.getState() ) ? "CANCEL_END_STATE" : this.name() );
+        return ( ( state == END_STATE.ordinal() ) ? "CANCEL_END_STATE" : this.name() );
     }
 
     

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationContainer.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationContainer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationContainer.java Fri Oct 29 08:12:05 2010
@@ -42,7 +42,7 @@ public class CertGenerationContainer ext
         super();
         stateStack = new int[1];
         grammar = CertGenerationGrammar.getInstance();
-        setTransition( CertGenerationStatesEnum.INIT_GRAMMAR_STATE );
+        setTransition( CertGenerationStatesEnum.START_STATE );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java?rev=1028638&r1=1028637&r2=1028638&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java Fri Oct 29 08:12:05 2010
@@ -71,7 +71,7 @@ public class CertGenerationGrammar exten
         setName( CertGenerationGrammar.class.getName() );
 
         // Create the transitions table
-        super.transitions = new GrammarTransition[CertGenerationStatesEnum.LAST_CERT_GENERATION_STATE.getState()][256];
+        super.transitions = new GrammarTransition[CertGenerationStatesEnum.LAST_CERT_GENERATION_STATE.ordinal()][256];
 
         /**
          * Transition from init state to certificate generation
@@ -81,8 +81,8 @@ public class CertGenerationGrammar exten
          *     
          * Creates the CertGenerationObject object
          */
-        super.transitions[CertGenerationStatesEnum.INIT_GRAMMAR_STATE.getState()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
-            CertGenerationStatesEnum.INIT_GRAMMAR_STATE, CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE,
+        super.transitions[CertGenerationStatesEnum.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
+            CertGenerationStatesEnum.START_STATE, CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE,
             UniversalTag.SEQUENCE.getValue(), new GrammarAction( "Init CertGenerationObject" )
             {
                 public void action( Asn1Container container )
@@ -102,7 +102,7 @@ public class CertGenerationGrammar exten
          *     
          * Set the targetDN value into the CertGenerationObject instance.
          */
-        super.transitions[CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             CertGenerationStatesEnum.CERT_GENERATION_REQUEST_SEQUENCE_STATE, CertGenerationStatesEnum.TARGETDN_STATE,
             UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set Cert Generation target DN value" )
             {
@@ -148,7 +148,7 @@ public class CertGenerationGrammar exten
          *     
          * Set the issuerDN value into the CertGenerationObject instance.
          */
-        super.transitions[CertGenerationStatesEnum.TARGETDN_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[CertGenerationStatesEnum.TARGETDN_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             CertGenerationStatesEnum.TARGETDN_STATE, CertGenerationStatesEnum.ISSUER_STATE, UniversalTag.OCTET_STRING.getValue(),
             new GrammarAction( "Set Cert Generation issuer DN value" )
             {
@@ -188,7 +188,7 @@ public class CertGenerationGrammar exten
          *     
          * Set the subjectDN value into the CertGenerationObject instance.
          */
-        super.transitions[CertGenerationStatesEnum.ISSUER_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[CertGenerationStatesEnum.ISSUER_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             CertGenerationStatesEnum.ISSUER_STATE, CertGenerationStatesEnum.SUBJECT_STATE, UniversalTag.OCTET_STRING.getValue(),
             new GrammarAction( "Set Cert Generation subject DN value" )
             {
@@ -233,7 +233,7 @@ public class CertGenerationGrammar exten
          *     
          * Set the key algorithm value into the CertGenerationObject instance.
          */
-        super.transitions[CertGenerationStatesEnum.SUBJECT_STATE.getState()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
+        super.transitions[CertGenerationStatesEnum.SUBJECT_STATE.ordinal()][UniversalTag.OCTET_STRING.getValue()] = new GrammarTransition(
             CertGenerationStatesEnum.SUBJECT_STATE, CertGenerationStatesEnum.KEY_ALGORITHM_STATE,
             UniversalTag.OCTET_STRING.getValue(), new GrammarAction( "Set Cert Generation key algorithm value" )
             {



Mime
View raw message