org.apache.directory.server.kerberos.shared.messages.value.types
Enum PrincipalNameType

java.lang.Object
  extended by java.lang.Enum<PrincipalNameType>
      extended by org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PrincipalNameType>

public enum PrincipalNameType
extends java.lang.Enum<PrincipalNameType>

An enum describing the differnet types of Principal. Here is the list, taken from RFC 4120 : NT-UNKNOWN 0 Name type not known NT-PRINCIPAL 1 Just the name of the principal as in DCE, or for users NT-SRV-INST 2 Service and other unique instance (krbtgt) NT-SRV-HST 3 Service with host name as instance (telnet, rcommands) NT-SRV-XHST 4 Service with host as remaining components NT-UID 5 Unique ID NT-X500-PRINCIPAL 6 Encoded X.509 Distinguished name [RFC2253] NT-SMTP-NAME 7 Name in form of SMTP email name (e.g., user@example.com) NT-ENTERPRISE 10 Enterprise name - may be mapped to principal name

Version:
$Rev: 540371 $, $Date: 2007-05-22 02:00:43 +0200 (Tue, 22 May 2007) $
Author:
Apache Directory Project

Enum Constant Summary
KRB_NT_ENTERPRISE
          Constant for the "Enterprise name; may be mapped to principal name" principal name type.
KRB_NT_PRINCIPAL
          Constant for the "Just the name of the principal as in DCE, or for users" principal name type.
KRB_NT_SMTP_NAME
          Constant for the "Name in form of SMTP email name (e.g., user@example.com)" principal name type.
KRB_NT_SRV_HST
          Constant for the "Service with host name as instance (telnet, rcommands)" principal name type.
KRB_NT_SRV_INST
          Constant for the "Service and other unique instance (krbtgt)" principal name type.
KRB_NT_SRV_XHST
          Constant for the "Service with host as remaining components" principal name type.
KRB_NT_UID
          Constant for the "Unique ID" principal name type.
KRB_NT_UNKNOWN
          Constant for the "Name type not known" principal name type.
KRB_NT_X500_PRINCIPAL
          Constant for the "Encoded X.509 Distinguished name [RFC2253]" principal name type.
 
Method Summary
 int getOrdinal()
          Returns the number associated with this principal name type.
static PrincipalNameType getTypeByOrdinal(int type)
          Returns the principal name type when specified by its ordinal.
 java.lang.String toString()
           
static PrincipalNameType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PrincipalNameType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

KRB_NT_UNKNOWN

public static final PrincipalNameType KRB_NT_UNKNOWN
Constant for the "Name type not known" principal name type.


KRB_NT_PRINCIPAL

public static final PrincipalNameType KRB_NT_PRINCIPAL
Constant for the "Just the name of the principal as in DCE, or for users" principal name type.


KRB_NT_SRV_INST

public static final PrincipalNameType KRB_NT_SRV_INST
Constant for the "Service and other unique instance (krbtgt)" principal name type.


KRB_NT_SRV_HST

public static final PrincipalNameType KRB_NT_SRV_HST
Constant for the "Service with host name as instance (telnet, rcommands)" principal name type.


KRB_NT_SRV_XHST

public static final PrincipalNameType KRB_NT_SRV_XHST
Constant for the "Service with host as remaining components" principal name type.


KRB_NT_UID

public static final PrincipalNameType KRB_NT_UID
Constant for the "Unique ID" principal name type.


KRB_NT_X500_PRINCIPAL

public static final PrincipalNameType KRB_NT_X500_PRINCIPAL
Constant for the "Encoded X.509 Distinguished name [RFC2253]" principal name type.


KRB_NT_SMTP_NAME

public static final PrincipalNameType KRB_NT_SMTP_NAME
Constant for the "Name in form of SMTP email name (e.g., user@example.com)" principal name type.


KRB_NT_ENTERPRISE

public static final PrincipalNameType KRB_NT_ENTERPRISE
Constant for the "Enterprise name; may be mapped to principal name" principal name type.

Method Detail

values

public static final PrincipalNameType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(PrincipalNameType c : PrincipalNameType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static PrincipalNameType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getTypeByOrdinal

public static PrincipalNameType getTypeByOrdinal(int type)
Returns the principal name type when specified by its ordinal.

Parameters:
type -
Returns:
The principal name type.

getOrdinal

public int getOrdinal()
Returns the number associated with this principal name type.

Returns:
The principal name type ordinal.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<PrincipalNameType>
See Also:
Object.toString()


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.