Package de.xima.fc.model.naming
Class X501DistinguishedName
- java.lang.Object
-
- de.xima.fc.model.naming.X501DistinguishedName
-
- All Implemented Interfaces:
Serializable
public class X501DistinguishedName extends Object implements Serializable
Model for distinguished names (DN) of certificates as defined in RFC 4514.- Since:
- 8.5.0
- Author:
- XIMA Media GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classX501DistinguishedName.Builder
-
Method Summary
-
-
-
Method Detail
-
builder
public static X501DistinguishedName.Builder builder()
-
fromDnsName
public static X501DistinguishedName fromDnsName(String dnsName)
Creates a distinguished name model from a DNS name.- Parameters:
dnsName- The DNS name.- Returns:
- The distinguished name model.
- Throws:
IllegalArgumentException- if the DNS name is blank or invalid.
-
fromEmailAddress
public static X501DistinguishedName fromEmailAddress(String value)
Creates a distinguished name model from an email address.- Parameters:
value- The email address.- Returns:
- The distinguished name model.
- Throws:
IllegalArgumentException- if the email address is blank.
-
fromX500Principal
public static X501DistinguishedName fromX500Principal(X500Principal principal)
-
parse
public static X501DistinguishedName parse(String strDn)
Creates a distinguished name model from a distinguished name (DN) string.- Parameters:
strDn- The distinguished name string.- Returns:
- The distinguished name model.
- Throws:
IllegalArgumentException- if the DN string is invalid or null.
-
getCommonName
public String getCommonName()
-
getCountry
public String getCountry()
-
getDomainComponent
public String getDomainComponent()
-
getDomainComponents
public String[] getDomainComponents()
-
getEmail
public String getEmail()
-
getLocality
public String getLocality()
-
getOrganization
public String getOrganization()
-
getOrganizationalUnit
public String getOrganizationalUnit()
-
getState
public String getState()
-
getStreet
public String getStreet()
-
getUid
public String getUid()
-
toDisplayString
public String toDisplayString()
-
toStringNormalized
public String toStringNormalized()
-
toX500Principal
public X500Principal toX500Principal()
-
getLdapName
public LdapName getLdapName()
-
-