You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2007/05/17 08:30:44 UTC

svn commit: r538815 - in /directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages: ./ value/

Author: erodriguez
Date: Wed May 16 23:30:43 2007
New Revision: 538815

URL: http://svn.apache.org/viewvc?view=rev&rev=538815
Log:
Javadocs and minor warning clean-up.

Modified:
    directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/MessageType.java
    directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressType.java
    directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/LastRequestType.java
    directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PreAuthenticationDataType.java
    directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameType.java
    directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingType.java

Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/MessageType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/MessageType.java?view=diff&rev=538815&r1=538814&r2=538815
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/MessageType.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/MessageType.java Wed May 16 23:30:43 2007
@@ -32,61 +32,110 @@
 public final class MessageType implements Comparable
 {
     /**
-     * Enumeration elements are constructed once upon class loading.
-     * Order of appearance here determines the order of compareTo.
+     * Constant for the "null" message type.
      */
     public static final MessageType NULL = new MessageType( 0, "null" );
+
+    /**
+     * Constant for the "initial authentication request" message type.
+     */
     public static final MessageType KRB_AS_REQ = new MessageType( 10, "initial authentication request" );
+
+    /**
+     * Constant for the "initial authentication response" message type.
+     */
     public static final MessageType KRB_AS_REP = new MessageType( 11, "initial authentication response" );
+
+    /**
+     * Constant for the "request for authentication based on TGT" message type.
+     */
     public static final MessageType KRB_TGS_REQ = new MessageType( 12, "request for authentication based on TGT" );
+
+    /**
+     * Constant for the "response to authentication based on TGT" message type.
+     */
     public static final MessageType KRB_TGS_REP = new MessageType( 13, "response to authentication based on TGT" );
+
+    /**
+     * Constant for the "application request" message type.
+     */
     public static final MessageType KRB_AP_REQ = new MessageType( 14, "application request" );
+
+    /**
+     * Constant for the "application response" message type.
+     */
     public static final MessageType KRB_AP_REP = new MessageType( 15, "application response" );
+
+    /**
+     * Constant for the "safe (checksummed) application message" message type.
+     */
     public static final MessageType KRB_SAFE = new MessageType( 20, "safe (checksummed) application message" );
+
+    /**
+     * Constant for the "private (encrypted) application message" message type.
+     */
     public static final MessageType KRB_PRIV = new MessageType( 21, "private (encrypted) application message" );
+
+    /**
+     * Constant for the "private (encrypted) message to forward credentials" message type.
+     */
     public static final MessageType KRB_CRED = new MessageType( 22,
         "private (encrypted) message to forward credentials" );
+
+    /**
+     * Constant for the "encrypted application reply part" message type.
+     */
     public static final MessageType ENC_AP_REP_PART = new MessageType( 27, "encrypted application reply part" );
+
+    /**
+     * Constant for the "encrypted private message part" message type.
+     */
     public static final MessageType ENC_PRIV_PART = new MessageType( 28, "encrypted private message part" );
+
+    /**
+     * Constant for the "error response" message type.
+     */
     public static final MessageType KRB_ERROR = new MessageType( 30, "error response" );
 
-    /** Array for building a List of VALUES. */
+    /**
+     * Array for building a List of VALUES.
+     */
     private static final MessageType[] values =
         { NULL, KRB_AS_REQ, KRB_AS_REP, KRB_TGS_REQ, KRB_TGS_REP, KRB_AP_REQ, KRB_AP_REP, KRB_SAFE, KRB_PRIV, KRB_CRED,
             ENC_AP_REP_PART, ENC_PRIV_PART, KRB_ERROR };
 
-    /** A list of all the message type constants. */
+    /**
+     * A list of all the message type constants.
+     */
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
-    /** the name of the message type */
+    /**
+     * The name of the message type.
+     */
     private final String name;
 
-    /** the value/code for the message type */
+    /**
+     * The value/code for the message type.
+     */
     private final int ordinal;
 
 
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private MessageType(int ordinal, String name)
+    private MessageType( int ordinal, String name )
     {
         this.ordinal = ordinal;
         this.name = name;
     }
 
 
-    public String toString()
-    {
-        return name + " (" + ordinal + ")";
-    }
-
-
-    public int compareTo( Object that )
-    {
-        return ordinal - ( ( MessageType ) that ).ordinal;
-    }
-
-
+    /**
+     * Returns the message type when specified by its ordinal.
+     *
+     * @param type
+     * @return The message type.
+     */
     public static MessageType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
@@ -101,8 +150,25 @@
     }
 
 
+    /**
+     * Returns the number associated with this message type.
+     *
+     * @return The message type ordinal.
+     */
     public int getOrdinal()
     {
         return ordinal;
+    }
+
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( ( MessageType ) that ).ordinal;
+    }
+
+
+    public String toString()
+    {
+        return name + " (" + ordinal + ")";
     }
 }

Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressType.java?view=diff&rev=538815&r1=538814&r2=538815
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressType.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddressType.java Wed May 16 23:30:43 2007
@@ -32,36 +32,127 @@
 public final class HostAddressType implements Comparable
 {
     /**
-     * Enumeration elements are constructed once upon class loading.
-     * Order of appearance here determines the order of compareTo.
+     * Constant for the "null" host address type.
      */
     public static final HostAddressType NULL = new HostAddressType( 0, "null" );
+
+    /**
+     * Constant for the "Unix" host address type.
+     */
     public static final HostAddressType ADDRTYPE_UNIX = new HostAddressType( 1, "Unix" );
+
+    /**
+     * Constant for the "Internet" host address type.
+     */
     public static final HostAddressType ADDRTYPE_INET = new HostAddressType( 2, "Internet" );
+
+    /**
+     * Constant for the "Arpanet" host address type.
+     */
     public static final HostAddressType ADDRTYPE_IMPLINK = new HostAddressType( 3, "Arpanet" );
+
+    /**
+     * Constant for the "PUP" host address type.
+     */
     public static final HostAddressType ADDRTYPE_PUP = new HostAddressType( 4, "PUP" );
+
+    /**
+     * Constant for the "CHAOS" host address type.
+     */
     public static final HostAddressType ADDRTYPE_CHAOS = new HostAddressType( 5, "CHAOS" );
+
+    /**
+     * Constant for the "XEROX Network Services" host address type.
+     */
     public static final HostAddressType ADDRTYPE_XNS = new HostAddressType( 6, "XEROX Network Services" );
+
+    /**
+     * Constant for the "IPX" host address type.
+     */
     public static final HostAddressType ADDRTYPE_IPX = new HostAddressType( 6, "IPX" );
+
+    /**
+     * Constant for the "OSI" host address type.
+     */
     public static final HostAddressType ADDRTYPE_OSI = new HostAddressType( 7, "OSI" );
+
+    /**
+     * Constant for the "European Computer Manufacturers" host address type.
+     */
     public static final HostAddressType ADDRTYPE_ECMA = new HostAddressType( 8, "European Computer Manufacturers" );
+
+    /**
+     * Constant for the "Datakit" host address type.
+     */
     public static final HostAddressType ADDRTYPE_DATAKIT = new HostAddressType( 9, "Datakit" );
+
+    /**
+     * Constant for the "CCITT" host address type.
+     */
     public static final HostAddressType ADDRTYPE_CCITT = new HostAddressType( 10, "CCITT" );
+
+    /**
+     * Constant for the "SNA" host address type.
+     */
     public static final HostAddressType ADDRTYPE_SNA = new HostAddressType( 11, "SNA" );
+
+    /**
+     * Constant for the "DECnet" host address type.
+     */
     public static final HostAddressType ADDRTYPE_DECNET = new HostAddressType( 12, "DECnet" );
+
+    /**
+     * Constant for the "Direct Data Link Interface" host address type.
+     */
     public static final HostAddressType ADDRTYPE_DLI = new HostAddressType( 13, "Direct Data Link Interface" );
+
+    /**
+     * Constant for the "LAT" host address type.
+     */
     public static final HostAddressType ADDRTYPE_LAT = new HostAddressType( 14, "LAT" );
+
+    /**
+     * Constant for the "NSC Hyperchannel" host address type.
+     */
     public static final HostAddressType ADDRTYPE_HYLINK = new HostAddressType( 15, "NSC Hyperchannel" );
+
+    /**
+     * Constant for the "AppleTalk" host address type.
+     */
     public static final HostAddressType ADDRTYPE_APPLETALK = new HostAddressType( 16, "AppleTalk" );
+
+    /**
+     * Constant for the "NetBios" host address type.
+     */
     public static final HostAddressType ADDRTYPE_NETBIOS = new HostAddressType( 17, "NetBios" );
+
+    /**
+     * Constant for the "VoiceView" host address type.
+     */
     public static final HostAddressType ADDRTYPE_VOICEVIEW = new HostAddressType( 18, "VoiceView" );
+
+    /**
+     * Constant for the "Firefox" host address type.
+     */
     public static final HostAddressType ADDRTYPE_FIREFOX = new HostAddressType( 19, "Firefox" );
+
+    /**
+     * Constant for the "Banyan" host address type.
+     */
     public static final HostAddressType ADDRTYPE_BAN = new HostAddressType( 21, "Banyan" );
+
+    /**
+     * Constant for the "ATM" host address type.
+     */
     public static final HostAddressType ADDRTYPE_ATM = new HostAddressType( 22, "ATM" );
+
+    /**
+     * Constant for the "Internet Protocol V6" host address type.
+     */
     public static final HostAddressType ADDRTYPE_INET6 = new HostAddressType( 23, "Internet Protocol V6" );
 
     /**
-     * These two lines are all that's necessary to export a List of VALUES.
+     * Array for building a List of VALUES.
      */
     private static final HostAddressType[] values =
         { NULL, ADDRTYPE_UNIX, ADDRTYPE_INET, ADDRTYPE_IMPLINK, ADDRTYPE_PUP, ADDRTYPE_CHAOS, ADDRTYPE_XNS,
@@ -69,34 +160,38 @@
             ADDRTYPE_DLI, ADDRTYPE_LAT, ADDRTYPE_HYLINK, ADDRTYPE_APPLETALK, ADDRTYPE_NETBIOS, ADDRTYPE_VOICEVIEW,
             ADDRTYPE_FIREFOX, ADDRTYPE_BAN, ADDRTYPE_ATM, ADDRTYPE_INET6 };
 
+    /**
+     * A List of all the host address type constants.
+     */
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
+    /**
+     * The name of the host address type.
+     */
     private final String name;
+
+    /**
+     * The value/code for the host address type.
+     */
     private final int ordinal;
 
 
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private HostAddressType(int ordinal, String name)
+    private HostAddressType( int ordinal, String name )
     {
         this.ordinal = ordinal;
         this.name = name;
     }
 
 
-    public String toString()
-    {
-        return name + " (" + ordinal + ")";
-    }
-
-
-    public int compareTo( Object that )
-    {
-        return ordinal - ( ( HostAddressType ) that ).ordinal;
-    }
-
-
+    /**
+     * Returns the host address type when specified by its ordinal.
+     *
+     * @param type
+     * @return The host address type.
+     */
     public static HostAddressType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
@@ -111,8 +206,25 @@
     }
 
 
+    /**
+     * Returns the number associated with this host address type.
+     *
+     * @return The host address type ordinal.
+     */
     public int getOrdinal()
     {
         return ordinal;
+    }
+
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( ( HostAddressType ) that ).ordinal;
+    }
+
+
+    public String toString()
+    {
+        return name + " (" + ordinal + ")";
     }
 }

Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/LastRequestType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/LastRequestType.java?view=diff&rev=538815&r1=538814&r2=538815
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/LastRequestType.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/LastRequestType.java Wed May 16 23:30:43 2007
@@ -32,30 +32,79 @@
 public final class LastRequestType implements Comparable
 {
     /**
-     * Enumeration elements are constructed once upon class loading.
-     * Order of appearance here determines the order of compareTo.
+     * Constant for the "none" last request type.
      */
     public static final LastRequestType NONE = new LastRequestType( 0, "none" );
+
+    /**
+     * Constant for the "time of initial ticket" last request type.
+     */
     public static final LastRequestType TIME_OF_INITIAL_TGT = new LastRequestType( 1, "time of initial ticket" );
+
+    /**
+     * Constant for the "time of initial request" last request type.
+     */
     public static final LastRequestType TIME_OF_INITIAL_REQ = new LastRequestType( 2, "time of initial request" );
+
+    /**
+     * Constant for the "time of newest ticket" last request type.
+     */
     public static final LastRequestType TIME_OF_NEWEST_TGT = new LastRequestType( 3, "time of newest ticket" );
+
+    /**
+     * Constant for the "time of last renewal" last request type.
+     */
     public static final LastRequestType TIME_OF_LAST_RENEWAL = new LastRequestType( 4, "time of last renewal" );
+
+    /**
+     * Constant for the "time of last request" last request type.
+     */
     public static final LastRequestType TIME_OF_LAST_REQ = new LastRequestType( 5, "time of last request" );
+
+    /**
+     * Constant for the "time of password expiration" last request type.
+     */
     public static final LastRequestType TIME_OF_PASSWORD_EXP = new LastRequestType( 6, "time of password expiration" );
 
+    /**
+     * Array for building a List of VALUES.
+     */
+    private static final LastRequestType[] values =
+        { NONE, TIME_OF_INITIAL_TGT, TIME_OF_INITIAL_REQ, TIME_OF_NEWEST_TGT, TIME_OF_LAST_RENEWAL, TIME_OF_LAST_REQ,
+            TIME_OF_PASSWORD_EXP };
 
-    public String toString()
-    {
-        return name + " (" + ordinal + ")";
-    }
+    /**
+     * A List of all the last request type constants.
+     */
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
+    /**
+     * The name of the checksum type.
+     */
+    private final String name;
 
-    public int compareTo( Object that )
+    /**
+     * The value/code for the checksum type.
+     */
+    private final int ordinal;
+
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private LastRequestType( int ordinal, String name )
     {
-        return ordinal - ( ( LastRequestType ) that ).ordinal;
+        this.ordinal = ordinal;
+        this.name = name;
     }
 
 
+    /**
+     * Returns the last request type when specified by its ordinal.
+     *
+     * @param type
+     * @return The last request type.
+     */
     public static LastRequestType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
@@ -70,31 +119,25 @@
     }
 
 
+    /**
+     * Returns the number associated with this last request type.
+     *
+     * @return The last request type ordinal.
+     */
     public int getOrdinal()
     {
         return ordinal;
     }
 
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
 
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private LastRequestType(int ordinal, String name)
+    public int compareTo( Object that )
     {
-        this.ordinal = ordinal;
-        this.name = name;
+        return ordinal - ( ( LastRequestType ) that ).ordinal;
     }
 
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final LastRequestType[] values =
-        { NONE, TIME_OF_INITIAL_TGT, TIME_OF_INITIAL_REQ, TIME_OF_NEWEST_TGT, TIME_OF_LAST_RENEWAL, TIME_OF_LAST_REQ,
-            TIME_OF_PASSWORD_EXP };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
+
+    public String toString()
+    {
+        return name + " (" + ordinal + ")";
+    }
 }

Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PreAuthenticationDataType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PreAuthenticationDataType.java?view=diff&rev=538815&r1=538814&r2=538815
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PreAuthenticationDataType.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PreAuthenticationDataType.java Wed May 16 23:30:43 2007
@@ -32,72 +32,141 @@
 public class PreAuthenticationDataType implements Comparable
 {
     /**
-     * Enumeration elements are constructed once upon class loading.
-     * Order of appearance here determines the order of compareTo.
+     * Constant for the "null" pre-authentication data type.
      */
     public static final PreAuthenticationDataType NULL = new PreAuthenticationDataType( 0, "null" );
-    public static final PreAuthenticationDataType PA_TGS_REQ = new PreAuthenticationDataType( 1, "TGS Request." );
+
+    /**
+     * Constant for the "TGS request" pre-authentication data type.
+     */
+    public static final PreAuthenticationDataType PA_TGS_REQ = new PreAuthenticationDataType( 1, "TGS request." );
+
+    /**
+     * Constant for the "encrypted timestamp" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_ENC_TIMESTAMP = new PreAuthenticationDataType( 2,
         "Encrypted timestamp." );
+
+    /**
+     * Constant for the "password salt" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_PW_SALT = new PreAuthenticationDataType( 3, "password salt" );
+
+    /**
+     * Constant for the "enc unix time" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_ENC_UNIX_TIME = new PreAuthenticationDataType( 5, "enc unix time" );
+
+    /**
+     * Constant for the "sandia secureid" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_SANDIA_SECUREID = new PreAuthenticationDataType( 6,
         "sandia secureid" );
+
+    /**
+     * Constant for the "sesame" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_SESAME = new PreAuthenticationDataType( 7, "sesame" );
+
+    /**
+     * Constant for the "OSF DCE" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_OSF_DCE = new PreAuthenticationDataType( 8, "OSF DCE" );
+
+    /**
+     * Constant for the "cybersafe secureid" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_CYBERSAFE_SECUREID = new PreAuthenticationDataType( 9,
         "cybersafe secureid" );
+
+    /**
+     * Constant for the "ASF3 salt" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_ASF3_SALT = new PreAuthenticationDataType( 10, "ASF3 salt" );
+
+    /**
+     * Constant for the "encryption info" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_ENCTYPE_INFO = new PreAuthenticationDataType( 11,
         "Encryption info." );
+
+    /**
+     * Constant for the "SAM challenge" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType SAM_CHALLENGE = new PreAuthenticationDataType( 12, "SAM challenge." );
+
+    /**
+     * Constant for the "SAM response" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType SAM_RESPONSE = new PreAuthenticationDataType( 13, "SAM response." );
+
+    /**
+     * Constant for the "PK as request" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_PK_AS_REQ = new PreAuthenticationDataType( 14, "PK as request" );
+
+    /**
+     * Constant for the "PK as response" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_PK_AS_REP = new PreAuthenticationDataType( 15, "PK as response" );
+
+    /**
+     * Constant for the "use specified key version" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_USE_SPECIFIED_KVNO = new PreAuthenticationDataType( 20,
         "use specified key version" );
+
+    /**
+     * Constant for the "SAM redirect" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType SAM_REDIRECT = new PreAuthenticationDataType( 21, "SAM redirect." );
+
+    /**
+     * Constant for the "get from typed data" pre-authentication data type.
+     */
     public static final PreAuthenticationDataType PA_GET_FROM_TYPED_DATA = new PreAuthenticationDataType( 22,
         "Get from typed data" );
 
-    /** Array for building a List of VALUES. */
+    /**
+     * Array for building a List of VALUES.
+     */
     private static final PreAuthenticationDataType[] values =
         { NULL, PA_TGS_REQ, PA_ENC_TIMESTAMP, PA_PW_SALT, PA_ENC_UNIX_TIME, PA_SANDIA_SECUREID, PA_SESAME, PA_OSF_DCE,
             PA_CYBERSAFE_SECUREID, PA_ASF3_SALT, PA_ENCTYPE_INFO, SAM_CHALLENGE, SAM_RESPONSE, PA_PK_AS_REQ,
             PA_PK_AS_REP, PA_USE_SPECIFIED_KVNO, SAM_REDIRECT, PA_GET_FROM_TYPED_DATA };
 
-    /** A list of all the pre-authentication type constants. */
+    /**
+     * A list of all the pre-authentication type constants.
+     */
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
-    /** The name of the pre-authentication type. */
+    /**
+     * The name of the pre-authentication type.
+     */
     private final String name;
 
-    /** The value/code for the pre-authentication type. */
+    /**
+     * The value/code for the pre-authentication type.
+     */
     private final int ordinal;
 
 
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private PreAuthenticationDataType(int ordinal, String name)
+    private PreAuthenticationDataType( int ordinal, String name )
     {
         this.ordinal = ordinal;
         this.name = name;
     }
 
 
-    public String toString()
-    {
-        return name + " (" + ordinal + ")";
-    }
-
-
-    public int compareTo( Object that )
-    {
-        return ordinal - ( ( PreAuthenticationDataType ) that ).ordinal;
-    }
-
-
+    /**
+     * Returns the pre-authentication type when specified by its ordinal.
+     *
+     * @param type
+     * @return The pre-authentication type.
+     */
     public static PreAuthenticationDataType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
@@ -112,8 +181,25 @@
     }
 
 
+    /**
+     * Returns the number associated with this pre-authentication type.
+     *
+     * @return The pre-authentication type ordinal.
+     */
     public int getOrdinal()
     {
         return ordinal;
+    }
+
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( ( PreAuthenticationDataType ) that ).ordinal;
+    }
+
+
+    public String toString()
+    {
+        return name + " (" + ordinal + ")";
     }
 }

Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameType.java?view=diff&rev=538815&r1=538814&r2=538815
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameType.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalNameType.java Wed May 16 23:30:43 2007
@@ -32,34 +32,83 @@
 public final class PrincipalNameType implements Comparable
 {
     /**
-     * Enumeration elements are constructed once upon class loading.
-     * Order of appearance here determines the order of compareTo.
+     * Constant for the "unknown name type" principal name type.
      */
     public static final PrincipalNameType KRB_NT_UNKNOWN = new PrincipalNameType( 0, "unknown name type" );
+
+    /**
+     * Constant for the "user principal name type" principal name type.
+     */
     public static final PrincipalNameType KRB_NT_PRINCIPAL = new PrincipalNameType( 1, "user principal name type" );
+
+    /**
+     * Constant for the "service and other unique instance (krbtgt) name type" principal name type.
+     */
     public static final PrincipalNameType KRB_NT_SRV_INST = new PrincipalNameType( 2,
         "service and other unique instance (krbtgt) name type" );
+
+    /**
+     * Constant for the "service with host name as instance (telnet, rcommands)" principal name type.
+     */
     public static final PrincipalNameType KRB_NT_SRV_HST = new PrincipalNameType( 3,
         "service with host name as instance (telnet, rcommands)" );
+
+    /**
+     * Constant for the "service with host name as instance (telnet, rcommands) name type" principal name type.
+     */
     public static final PrincipalNameType KRB_NT_SRV_XHST = new PrincipalNameType( 4,
         "service with host name as instance (telnet, rcommands) name type" );
+
+    /**
+     * Constant for the "unique ID name type" principal name type.
+     */
     public static final PrincipalNameType KRB_NT_UID = new PrincipalNameType( 5, "unique ID name type" );
+
+    /**
+     * Constant for the "nt x500 principal; encoded X.509 Distinguished name [RFC 2253]" principal name type.
+     */
     public static final PrincipalNameType KRB_NT_X500_PRINCIPAL = new PrincipalNameType( 6,
         "nt x500 principal; encoded X.509 Distinguished name [RFC 2253]" );
 
+    /**
+     * Array for building a List of VALUES.
+     */
+    private static final PrincipalNameType[] values =
+        { KRB_NT_UNKNOWN, KRB_NT_PRINCIPAL, KRB_NT_SRV_INST, KRB_NT_SRV_HST, KRB_NT_SRV_XHST, KRB_NT_UID,
+            KRB_NT_X500_PRINCIPAL };
 
-    public String toString()
-    {
-        return name + " (" + ordinal + ")";
-    }
+    /**
+     * A List of all the principal name type constants.
+     */
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
+    /**
+     * The name of the principal name type.
+     */
+    private final String name;
 
-    public int compareTo( Object that )
+    /**
+     * The value/code for the principal name type.
+     */
+    private final int ordinal;
+
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private PrincipalNameType( int ordinal, String name )
     {
-        return ordinal - ( ( PrincipalNameType ) that ).ordinal;
+        this.ordinal = ordinal;
+        this.name = name;
     }
 
 
+    /**
+     * Returns the principal name type when specified by its ordinal.
+     *
+     * @param type
+     * @return The principal name type.
+     */
     public static PrincipalNameType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
@@ -74,31 +123,25 @@
     }
 
 
+    /**
+     * Returns the number associated with this principal name type.
+     *
+     * @return The principal name type ordinal.
+     */
     public int getOrdinal()
     {
         return ordinal;
     }
 
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
 
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private PrincipalNameType(int ordinal, String name)
+    public int compareTo( Object that )
     {
-        this.ordinal = ordinal;
-        this.name = name;
+        return ordinal - ( ( PrincipalNameType ) that ).ordinal;
     }
 
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final PrincipalNameType[] values =
-        { KRB_NT_UNKNOWN, KRB_NT_PRINCIPAL, KRB_NT_SRV_INST, KRB_NT_SRV_HST, KRB_NT_SRV_XHST, KRB_NT_UID,
-            KRB_NT_X500_PRINCIPAL };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
+
+    public String toString()
+    {
+        return name + " (" + ordinal + ")";
+    }
 }

Modified: directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingType.java?view=diff&rev=538815&r1=538814&r2=538815
==============================================================================
--- directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingType.java (original)
+++ directory/apacheds/branches/kerberos-encryption-types/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncodingType.java Wed May 16 23:30:43 2007
@@ -32,26 +32,54 @@
 public final class TransitedEncodingType implements Comparable
 {
     /**
-     * Enumeration elements are constructed once upon class loading.
-     * Order of appearance here determines the order of compareTo.
+     * Constant for the "null" transited encoding type.
      */
     public static final TransitedEncodingType NULL = new TransitedEncodingType( 0, "null" );
+
+    /**
+     * Constant for the "Domain X500 compress" transited encoding type.
+     */
     public static final TransitedEncodingType DOMAIN_X500_COMPRESS = new TransitedEncodingType( 1,
         "Domain X500 compress" );
 
+    /**
+     * Array for building a List of VALUES.
+     */
+    private static final TransitedEncodingType[] values =
+        { NULL, DOMAIN_X500_COMPRESS };
 
-    public String toString()
-    {
-        return name + " (" + ordinal + ")";
-    }
+    /**
+     * A List of all the transited encoding type constants.
+     */
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
+    /**
+     * The name of the transited encoding type.
+     */
+    private final String name;
 
-    public int compareTo( Object that )
+    /**
+     * The value/code for the transited encoding type.
+     */
+    private final int ordinal;
+
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private TransitedEncodingType( int ordinal, String name )
     {
-        return ordinal - ( ( TransitedEncodingType ) that ).ordinal;
+        this.ordinal = ordinal;
+        this.name = name;
     }
 
 
+    /**
+     * Returns the transited encoding type when specified by its ordinal.
+     *
+     * @param type
+     * @return The transited encoding type.
+     */
     public static TransitedEncodingType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
@@ -66,30 +94,25 @@
     }
 
 
+    /**
+     * Returns the number associated with this transited encoding type.
+     *
+     * @return The transited encoding type ordinal.
+     */
     public int getOrdinal()
     {
         return ordinal;
     }
 
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
-
 
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private TransitedEncodingType(int ordinal, String name)
+    public int compareTo( Object that )
     {
-        this.ordinal = ordinal;
-        this.name = name;
+        return ordinal - ( ( TransitedEncodingType ) that ).ordinal;
     }
 
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final TransitedEncodingType[] values =
-        { NULL, DOMAIN_X500_COMPRESS };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
+
+    public String toString()
+    {
+        return name + " (" + ordinal + ")";
+    }
 }