Class DigitalID

  • All Implemented Interfaces:
    java.io.Serializable

    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@.

    Version:
    1.1, 15/06/2021.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field 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 Summary

      Constructors 
      Constructor Description
      DigitalID​(int digitalIdentityType)
      Constructor method for the class DigitalID.java.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TYPE_X509CERTIFICATE

        public static final int TYPE_X509CERTIFICATE
        Constant attribute that represents a digital identity type: X509 Certificate.
        See Also:
        Constant Field Values
      • TYPE_X509SUBJECTNAME

        public static final int TYPE_X509SUBJECTNAME
        Constant attribute that represents a digital identity type: X509 Subject Name.
        See Also:
        Constant Field Values
      • TYPE_KEYVALUE

        public static final int TYPE_KEYVALUE
        Constant attribute that represents a digital identity type: Key Value.
        See Also:
        Constant Field Values
      • TYPE_X509SKI

        public static final int TYPE_X509SKI
        Constant attribute that represents a digital identity type: X509 SKI.
        See Also:
        Constant Field Values
      • TYPE_OTHER

        public static final int TYPE_OTHER
        Constant attribute that represents a digital identity type: Other.
        See Also:
        Constant Field Values
    • Method Detail

      • getType

        public final int getType()
        Gets the value of the attribute type.
        Returns:
        the value of the attribute type.
      • getX509cert

        public final java.security.cert.X509Certificate getX509cert()
        Gets the value of the attribute x509cert.
        Returns:
        the value of the attribute x509cert.
      • setX509cert

        public final void setX509cert​(java.security.cert.X509Certificate x509certDI)
        Sets the value of the attribute x509cert.
        Parameters:
        x509certDI - The value for the attribute x509cert.
      • setX509cert

        public final void setX509cert​(byte[] x509certBytesDI)
                               throws TSLParsingException
        Sets the value of the attribute x509cert.
        Parameters:
        x509certBytesDI - The value (in bytes) for the attribute x509cert.
        Throws:
        TSLParsingException - In case of some error parsing the X509 certificate.
      • getX509SubjectName

        public final java.lang.String getX509SubjectName()
        Gets the value of the attribute x509SubjectName.
        Returns:
        the value of the attribute x509SubjectName.
      • getKeyValue

        public final org.w3.x2000.x09.xmldsig.KeyValueType getKeyValue()
        Gets the value of the attribute keyValue.
        Returns:
        the value of the attribute keyValue.
      • setKeyValue

        public final void setKeyValue​(org.w3.x2000.x09.xmldsig.KeyValueType keyValueDI)
                               throws TSLParsingException
        Sets the value of the attribute keyValue.
        Parameters:
        keyValueDI - The value for the attribute keyValue.
        Throws:
        TSLParsingException - In case of the input parameter was null, or not is defined RSA or DSA values.
      • getSki

        public final org.bouncycastle.asn1.x509.SubjectKeyIdentifier getSki()
        Gets the value of the attribute ski.
        Returns:
        the value of the attribute ski.
      • setSki

        public final void setSki​(org.bouncycastle.asn1.x509.SubjectKeyIdentifier skiDI)
        Sets the value of the attribute ski.
        Parameters:
        skiDI - The value for the attribute ski.
      • setSki

        public final void setSki​(byte[] skiByteDI)
        Sets the value of the attribute ski.
        Parameters:
        skiByteDI - The value (in bytes) for the attribute ski.
      • getOther

        public final java.lang.String getOther()
        Gets the value of the attribute other.
        Returns:
        the value of the attribute other.
      • setOther

        public final void setOther​(java.lang.String otherDI)
        Sets the value of the attribute other.
        Parameters:
        otherDI - The value for the attribute other.