edu.vt.middleware.crypt.x509.types
Enum GeneralNameType

java.lang.Object
  extended by java.lang.Enum<GeneralNameType>
      extended by edu.vt.middleware.crypt.x509.types.GeneralNameType
All Implemented Interfaces:
Serializable, Comparable<GeneralNameType>

public enum GeneralNameType
extends Enum<GeneralNameType>

Representation of the options in the CHOICE element describing various categories of the GeneralName type defined in section 4.2.1.7 of RFC 2459.

Version:
$Revision: 422 $
Author:
Middleware Services

Enum Constant Summary
DirectoryName
          directoryName choice element.
DNSName
          dNSName choice element.
EdiPartyName
          ediPartyName choice element.
IPAddress
          iPAddress choice element.
OtherName
          otherName choice element.
RegisteredID
          registeredID choice element.
RFC822Name
          rfc822Name choice element.
UniformResourceIdentifier
          uniformResourceIdentifier choice element.
X400Address
          x400Address choice element.
 
Field Summary
static int MAX_TAG_NUMBER
          Maximum tag number for items in CHOICE definition.
static int MIN_TAG_NUMBER
          Minimum tag number for items in CHOICE definition.
 
Method Summary
static GeneralNameType fromTagNumber(int tagNo)
          Gets a name type from the value of the tag in the CHOICE element definition.
static GeneralNameType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GeneralNameType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OtherName

public static final GeneralNameType OtherName
otherName choice element.


RFC822Name

public static final GeneralNameType RFC822Name
rfc822Name choice element.


DNSName

public static final GeneralNameType DNSName
dNSName choice element.


X400Address

public static final GeneralNameType X400Address
x400Address choice element.


DirectoryName

public static final GeneralNameType DirectoryName
directoryName choice element.


EdiPartyName

public static final GeneralNameType EdiPartyName
ediPartyName choice element.


UniformResourceIdentifier

public static final GeneralNameType UniformResourceIdentifier
uniformResourceIdentifier choice element.


IPAddress

public static final GeneralNameType IPAddress
iPAddress choice element.


RegisteredID

public static final GeneralNameType RegisteredID
registeredID choice element.

Field Detail

MIN_TAG_NUMBER

public static final int MIN_TAG_NUMBER
Minimum tag number for items in CHOICE definition.

See Also:
Constant Field Values

MAX_TAG_NUMBER

public static final int MAX_TAG_NUMBER
Maximum tag number for items in CHOICE definition.

See Also:
Constant Field Values
Method Detail

values

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

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

valueOf

public static GeneralNameType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromTagNumber

public static GeneralNameType fromTagNumber(int tagNo)
Gets a name type from the value of the tag in the CHOICE element definition.

Parameters:
tagNo - Ordinal position of type in CHOICE definition in RFC 2459.
Returns:
Type corresponding to given tag number.
Throws:
IllegalArgumentException - If there is not general name type corresponding to the given tag number.


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.