Enum Class SubjectAlternativeNameType
java.lang.Object
java.lang.Enum<SubjectAlternativeNameType>
se.idsec.signservice.integration.certificate.SubjectAlternativeNameType
- All Implemented Interfaces:
Serializable
,Comparable<SubjectAlternativeNameType>
,Constable
An enum that represents the different name types that can be stored in an X.509 subject alternative name certificate
extension.
The following ASN.1 structure is mapped (excluding otherName
):
GeneralName ::= CHOICE { otherName [0] INSTANCE OF OTHER-NAME, rfc822Name [1] IA5String, dNSName [2] IA5String, x400Address [3] ORAddress, directoryName [4] Name, ediPartyName [5] EDIPartyName, uniformResourceIdentifier [6] IA5String, IPAddress [7] OCTET STRING, registeredID [8] OBJECT IDENTIFIER }
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDirectory nameDNS name, for example a host name.EDI party name.An IP address.Registered ID.An RFC 822 name, typically an email address.An URI.X.400 address, see X.400. -
Method Summary
Modifier and TypeMethodDescriptionstatic SubjectAlternativeNameType
fromIndex
(int index) Finds the enum constant based on its index number.static SubjectAlternativeNameType
fromTypeName
(String typeName) If the supplied name matchesgetTypeName()
orEnum.name()
the corresponding enum constant is returned.int
getIndex()
Returns the index (mapping to the ASN.1GeneralName
choice).Returns the name.static SubjectAlternativeNameType
Returns the enum constant of this class with the specified name.static SubjectAlternativeNameType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RFC822_NAME
An RFC 822 name, typically an email address. -
DNS_NAME
DNS name, for example a host name. -
X400_ADDRESS
X.400 address, see X.400. -
DIRECTORY_NAME
Directory name -
EDI_PARTY_NAME
EDI party name. Probably never used. -
UNIFORM_RESOURCE_IDENTIFIER
An URI. -
IP_ADDRESS
An IP address. -
REGISTERED_ID
Registered ID.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getTypeName
Returns the name.- Returns:
- the name
-
getIndex
public int getIndex()Returns the index (mapping to the ASN.1GeneralName
choice).- Returns:
- the index
-
fromTypeName
public static SubjectAlternativeNameType fromTypeName(String typeName) throws IllegalArgumentException If the supplied name matchesgetTypeName()
orEnum.name()
the corresponding enum constant is returned.- Parameters:
typeName
- the type name- Returns:
- the enum constant
- Throws:
IllegalArgumentException
- if no matching constant is found
-
fromIndex
Finds the enum constant based on its index number.- Parameters:
index
- the index- Returns:
- the enum constant
- Throws:
IllegalArgumentException
- if no matching constant is found
-