public class DigitalID
extends java.lang.Object
implements java.io.Serializable
Class that defines a Digital Identity with all its information not dependent of the specification or TSL version.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_KEYVALUE
Constant attribute that represents a digital identity type: Key Value.
|
static int |
TYPE_OTHER
Constant attribute that represents a digital identity type: Other.
|
static int |
TYPE_X509CERTIFICATE
Constant attribute that represents a digital identity type: X509 Certificate.
|
static int |
TYPE_X509SKI
Constant attribute that represents a digital identity type: X509 SKI.
|
static int |
TYPE_X509SUBJECTNAME
Constant attribute that represents a digital identity type: X509 Subject Name.
|
| Constructor and Description |
|---|
DigitalID(int digitalIdentityType)
Constructor method for the class DigitalID.java.
|
| Modifier and Type | Method and Description |
|---|---|
org.w3.x2000.x09.xmldsig.KeyValueType |
getKeyValue()
Gets the value of the attribute
keyValue. |
java.lang.String |
getOther()
Gets the value of the attribute
other. |
org.bouncycastle.asn1.x509.SubjectKeyIdentifier |
getSki()
Gets the value of the attribute
ski. |
int |
getType()
Gets the value of the attribute
type. |
java.security.cert.X509Certificate |
getX509cert()
Gets the value of the attribute
x509cert. |
java.lang.String |
getX509SubjectName()
Gets the value of the attribute
x509SubjectName. |
void |
setKeyValue(org.w3.x2000.x09.xmldsig.KeyValueType keyValueDI)
Sets the value of the attribute
keyValue. |
void |
setOther(java.lang.String otherDI)
Sets the value of the attribute
other. |
void |
setSki(byte[] skiByteDI)
Sets the value of the attribute
ski. |
void |
setSki(org.bouncycastle.asn1.x509.SubjectKeyIdentifier skiDI)
Sets the value of the attribute
ski. |
void |
setX509cert(byte[] x509certBytesDI)
Sets the value of the attribute
x509cert. |
void |
setX509cert(java.security.cert.X509Certificate x509certDI)
Sets the value of the attribute
x509cert. |
void |
setX509SubjectName(java.lang.String x509SubjectNameDI)
Sets the value of the attribute
x509SubjectName. |
public static final int TYPE_X509CERTIFICATE
public static final int TYPE_X509SUBJECTNAME
public static final int TYPE_KEYVALUE
public static final int TYPE_X509SKI
public static final int TYPE_OTHER
public DigitalID(int digitalIdentityType)
digitalIdentityType - Digital identity type.
It must be one of the following:
- TYPE_X509CERTIFICATE.
- TYPE_X509SUBJECTNAME.
- TYPE_KEYVALUE.
- TYPE_X509SKI.
- TYPE_OTHER.public final int getType()
type.type.public final java.security.cert.X509Certificate getX509cert()
x509cert.x509cert.public final void setX509cert(java.security.cert.X509Certificate x509certDI)
x509cert.x509certDI - The value for the attribute x509cert.public final void setX509cert(byte[] x509certBytesDI)
throws TSLParsingException
x509cert.x509certBytesDI - The value (in bytes) for the attribute x509cert.TSLParsingException - In case of some error parsing the X509 certificate.public final java.lang.String getX509SubjectName()
x509SubjectName.x509SubjectName.public final void setX509SubjectName(java.lang.String x509SubjectNameDI)
throws TSLParsingException
x509SubjectName.x509SubjectNameDI - The value for the attribute x509SubjectName.TSLParsingException - In case of the input string was null or empty.public final org.w3.x2000.x09.xmldsig.KeyValueType getKeyValue()
keyValue.keyValue.public final void setKeyValue(org.w3.x2000.x09.xmldsig.KeyValueType keyValueDI)
throws TSLParsingException
keyValue.keyValueDI - The value for the attribute keyValue.TSLParsingException - In case of the input parameter was null, or not is defined RSA or DSA values.public final org.bouncycastle.asn1.x509.SubjectKeyIdentifier getSki()
ski.ski.public final void setSki(org.bouncycastle.asn1.x509.SubjectKeyIdentifier skiDI)
ski.skiDI - The value for the attribute ski.public final void setSki(byte[] skiByteDI)
ski.skiByteDI - The value (in bytes) for the attribute ski.public final java.lang.String getOther()
other.other.