Class PrincipalData
java.lang.Object
com.mulesoft.connectors.mcp.api.certificate.PrincipalData
- All Implemented Interfaces:
Serializable
A custom Data Transfer Object (DTO) to replace the
Principal class.
This class is a simple representation of a principal with a single attribute, the name. It implements Serializable to
allow its instances to be serialized.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPrincipalData(String name) Constructs a newPrincipalDatainstance with the specified name. -
Method Summary
-
Constructor Details
-
PrincipalData
Constructs a newPrincipalDatainstance with the specified name.- Parameters:
name- the name of the principal
-
-
Method Details
-
getName
Returns the name of the principal.- Returns:
- the name of the principal
-
getCommonName
Extracts and returns the common name (CN) from the principal's name.This method assumes that the name is a distinguished name (DN) string, and attempts to find and return the value of the CN attribute. If the CN attribute is not found, the method returns an empty string.
- Returns:
- the common name (CN) if found, otherwise an empty string
-
toString
-
equals
-
hashCode
public int hashCode()
-