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

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

public enum AttributeType
extends Enum<AttributeType>

Describes the registered values of AttributeType that may appear in a RelativeDistinguishedName (RDN) as defined in section 2 of RFC 2253.

Enumeration values include attributes likely to appear in an X.509 RDN, which were obtained from the following sources:

Version:
$Revision: 578 $
Author:
Middleware Services

Enum Constant Summary
CommonName
          CN - RFC 4519 section 2.3.
CountryName
          C - RFC 4519 section 2.2.
DnQualifier
          DNQUALIFIER - RFC 4519 section 2.8.
DomainComponent
          DC - RFC 4519 section 2.4.
EmailAddress
          Email address - PKCS#9 v2.0 section B.3.5.
GenerationQualifier
          GenerationQualifier - RFC 4519 section 2.11.
GivenName
          GIVENNAME - RFC 4519 section 2.12.
Initials
          INITIALS - RFC 4519 section 2.14.
LocalityName
          L - RFC 4519 section 2.16.
Mail
          MAIL - RFC 4524 section 2.16.
Name
          NAME - RFC 4519 section 2.18.
OrganizationalUnitName
          OU - RFC 4519 section 2.20.
OrganizationName
          O - RFC 4519 section 2.19.
PostalAddress
          POSTALADDRESS - RFC 4519 section 2.23.
PostalCode
          POSTALCODE - RFC 4519 section 2.24.
PostOfficeBox
          POSTOFFICEBOX - RFC 4519 section 2.25.
SerialNumber
          SERIALNUMBER - RFC 4519 section 2.31.
StateOrProvinceName
          ST - RFC 4519 section 2.33.
StreetAddress
          STREET - RFC 4519 section 2.34.
Surname
          SN - RFC 4519 section 2.32.
Title
          TITLE - RFC 4519 section 2.38.
UniqueIdentifier
          UNIQUEIDENTIFIER - RFC 4524 section 2.24.
UserId
          UID - RFC 4519 section 2.39.
 
Method Summary
static AttributeType fromName(String name)
          Gets the attribute type whose name is the given string.
static AttributeType fromOid(String oid)
          Gets the attribute type whose OID is the given string.
 String getName()
           
 String getOid()
           
static AttributeType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AttributeType[] 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

CommonName

public static final AttributeType CommonName
CN - RFC 4519 section 2.3.


CountryName

public static final AttributeType CountryName
C - RFC 4519 section 2.2.


DnQualifier

public static final AttributeType DnQualifier
DNQUALIFIER - RFC 4519 section 2.8.


DomainComponent

public static final AttributeType DomainComponent
DC - RFC 4519 section 2.4.


EmailAddress

public static final AttributeType EmailAddress
Email address - PKCS#9 v2.0 section B.3.5.


GenerationQualifier

public static final AttributeType GenerationQualifier
GenerationQualifier - RFC 4519 section 2.11.


GivenName

public static final AttributeType GivenName
GIVENNAME - RFC 4519 section 2.12.


Initials

public static final AttributeType Initials
INITIALS - RFC 4519 section 2.14.


LocalityName

public static final AttributeType LocalityName
L - RFC 4519 section 2.16.


Mail

public static final AttributeType Mail
MAIL - RFC 4524 section 2.16.


Name

public static final AttributeType Name
NAME - RFC 4519 section 2.18.


OrganizationName

public static final AttributeType OrganizationName
O - RFC 4519 section 2.19.


OrganizationalUnitName

public static final AttributeType OrganizationalUnitName
OU - RFC 4519 section 2.20.


PostalAddress

public static final AttributeType PostalAddress
POSTALADDRESS - RFC 4519 section 2.23.


PostalCode

public static final AttributeType PostalCode
POSTALCODE - RFC 4519 section 2.24.


PostOfficeBox

public static final AttributeType PostOfficeBox
POSTOFFICEBOX - RFC 4519 section 2.25.


SerialNumber

public static final AttributeType SerialNumber
SERIALNUMBER - RFC 4519 section 2.31.


StateOrProvinceName

public static final AttributeType StateOrProvinceName
ST - RFC 4519 section 2.33.


StreetAddress

public static final AttributeType StreetAddress
STREET - RFC 4519 section 2.34.


Surname

public static final AttributeType Surname
SN - RFC 4519 section 2.32.


Title

public static final AttributeType Title
TITLE - RFC 4519 section 2.38.


UniqueIdentifier

public static final AttributeType UniqueIdentifier
UNIQUEIDENTIFIER - RFC 4524 section 2.24.


UserId

public static final AttributeType UserId
UID - RFC 4519 section 2.39.

Method Detail

values

public static AttributeType[] 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 (AttributeType c : AttributeType.values())
    System.out.println(c);

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

valueOf

public static AttributeType 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

getOid

public String getOid()
Returns:
OID of attribute type.

getName

public String getName()
Returns:
Registered short name of attribute type.

fromOid

public static AttributeType fromOid(String oid)
Gets the attribute type whose OID is the given string.

Parameters:
oid - OID of attribute type to get.
Returns:
Attribute type whose OID matches given value.
Throws:
IllegalArgumentException - On unknown OID.

fromName

public static AttributeType fromName(String name)
Gets the attribute type whose name is the given string.

Parameters:
name - Name of attribute to get, where the name is the all-caps RFC/standard name that would be returned by getName() for the desired attribute.
Returns:
Attribute type whose getName() property matches the given value.
Throws:
IllegalArgumentException - On unknown name.


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