Enum StandardAttributeType

java.lang.Object
java.lang.Enum<StandardAttributeType>
org.cryptacular.x509.dn.StandardAttributeType
All Implemented Interfaces:
Serializable, Comparable<StandardAttributeType>, java.lang.constant.Constable, AttributeType

public enum StandardAttributeType extends Enum<StandardAttributeType> implements 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:

  • RFC 4519 Lightweight Directory Access Protocol (LDAP): Schema for User Applications
  • RFC 4524 COSINE LDAP/X.500 Schema
  • PKCS #9 v2.0: Selected Object Classes and Attribute Types
Version:
$Revision: 2745 $
Author:
Middleware Services
  • Enum Constant Details

  • Method Details

    • values

      public static StandardAttributeType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StandardAttributeType 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()
      Specified by:
      getOid in interface AttributeType
      Returns:
      OID of attribute type.
    • getName

      public String getName()
      Specified by:
      getName in interface AttributeType
      Returns:
      Registered short name of attribute type.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<StandardAttributeType>
      Returns:
      Attribute name.
    • fromOid

      public static StandardAttributeType 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 or none if there is no standard attribute type matching the given 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 or null if there is no standard attribute with the given name.