public class CordaX500Name
X.500 distinguished name data type customised to how Corda uses names. This restricts the attributes to those Corda supports, and requires that organisation, locality and country attributes are specified. See also RFC 4519 for the underlying attribute type definitions
public static int LENGTH_COUNTRY
public static int MAX_LENGTH_ORGANISATION
public static int MAX_LENGTH_LOCALITY
public static int MAX_LENGTH_STATE
public static int MAX_LENGTH_ORGANISATION_UNIT
public static int MAX_LENGTH_COMMON_NAME
public static net.corda.core.identity.CordaX500Name.Companion Companion
public CordaX500Name(@Nullable java.lang.String commonName, @Nullable java.lang.String organisationUnit, @NotNull java.lang.String organisation, @NotNull java.lang.String locality, @Nullable java.lang.String state, @NotNull java.lang.String country)
X.500 distinguished name data type customised to how Corda uses names. This restricts the attributes to those Corda supports, and requires that organisation, locality and country attributes are specified. See also RFC 4519 for the underlying attribute type definitions
commonName
- optional name by the which the entity is usually known. Used only for services (fororganisations, the organisation property is the name). Corresponds to the "CN" attribute type.organisationUnit
- optional name of a unit within the organisation. Corresponds to the "OU" attribute type.organisation
- name of the organisation. Corresponds to the "O" attribute type.locality
- locality of the organisation, typically nearest major city. For distributed services this would bewhere one of the organisations is based. Corresponds to the "L" attribute type.state
- the full name of the state or province the organisation is based in. Corresponds to the "ST"attribute type.country
- country the organisation is in, as an ISO 3166-1 2-letter country code. Corresponds to the "C"attribute type.public CordaX500Name(@NotNull java.lang.String commonName, @NotNull java.lang.String organisation, @NotNull java.lang.String locality, @NotNull java.lang.String country)
public CordaX500Name(@NotNull java.lang.String organisation, @NotNull java.lang.String locality, @NotNull java.lang.String country)
organisation
- name of the organisation.locality
- locality of the organisation, typically nearest major city.country
- country the organisation is in, as an ISO 3166-1 2-letter country code.@NotNull public javax.security.auth.x500.X500Principal getX500Principal()
Return the X500Principal equivalent of this name.
@NotNull public java.lang.String toString()
@Nullable public java.lang.String getCommonName()
optional name by the which the entity is usually known.
Used only for services (fororganisations, the organisation property is the name). Corresponds to the "CN" attribute type.
@Nullable public java.lang.String getOrganisationUnit()
optional name of a unit within the
organisation. Corresponds to the "OU" attribute type.
@NotNull public java.lang.String getOrganisation()
name of the organisation.
Corresponds to the "O" attribute type.
@NotNull public java.lang.String getLocality()
locality of the organisation,
typically nearest major city. For distributed services this would bewhere one of the organisations is based. Corresponds to the "L" attribute type.
@Nullable public java.lang.String getState()
the full name of the state or province the organisation is based in.
Corresponds to the "ST"attribute type.
@NotNull public java.lang.String getCountry()
country the organisation is in,
as an ISO 3166-1 2-letter country code. Corresponds to the "C"attribute type.
@Nullable public java.lang.String component1()
optional name by the which the entity is usually known.
Used only for services (fororganisations, the organisation property is the name). Corresponds to the "CN" attribute type.
@Nullable public java.lang.String component2()
optional name of a unit within the
organisation. Corresponds to the "OU" attribute type.
@NotNull public java.lang.String component3()
name of the organisation.
Corresponds to the "O" attribute type.
@NotNull public java.lang.String component4()
locality of the organisation,
typically nearest major city. For distributed services this would bewhere one of the organisations is based. Corresponds to the "L" attribute type.
@Nullable public java.lang.String component5()
the full name of the state or province the organisation is based in.
Corresponds to the "ST"attribute type.
@NotNull public java.lang.String component6()
country the organisation is in,
as an ISO 3166-1 2-letter country code. Corresponds to the "C"attribute type.
@NotNull public CordaX500Name copy(@Nullable java.lang.String commonName, @Nullable java.lang.String organisationUnit, @NotNull java.lang.String organisation, @NotNull java.lang.String locality, @Nullable java.lang.String state, @NotNull java.lang.String country)
X.500 distinguished name data type customised to how Corda uses names. This restricts the attributes to those Corda supports, and requires that organisation, locality and country attributes are specified. See also RFC 4519 for the underlying attribute type definitions
public int hashCode()
X.500 distinguished name data type customised to how Corda uses names. This restricts the attributes to those Corda supports, and requires that organisation, locality and country attributes are specified. See also RFC 4519 for the underlying attribute type definitions
public boolean equals(@Nullable java.lang.Object p)
X.500 distinguished name data type customised to how Corda uses names. This restricts the attributes to those Corda supports, and requires that organisation, locality and country attributes are specified. See also RFC 4519 for the underlying attribute type definitions
@JvmStatic @NotNull public static CordaX500Name build(@NotNull javax.security.auth.x500.X500Principal principal)
@JvmStatic @NotNull public static CordaX500Name parse(@NotNull java.lang.String name)