public class XMLAccountCertificate extends java.lang.Object implements IXMLEncodable
pubKey
, the
account number accountNumber
and the timestamp validTime
.
Note: This class does not perform any signing or signature
checking! This is done in XMLSignature
, so if you want to
generate a signed XML certificate, utilize this class to sign it! The XML
account certificates have the following format:
<?xml version="1.0"?> <AccountCertificate version="1.0"> <AccountNumber>123456789012</AccountNumber> <BiID>The BI ID<BiID> <JapPublicKey> ... public key xml data (see below) </JapPublicKey> <CreationTime>YYYY-MM-DD</CreationTime> <Signature> ... signature xml data (see below) </Signature> </AccountCertificate>
XMLSignature
format inside the Signature
tags
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
Constructor and Description |
---|
XMLAccountCertificate(byte[] xmldata) |
XMLAccountCertificate(org.w3c.dom.Element xml)
Creates an AccountCertifcate from an existing XML docuemnt
|
XMLAccountCertificate(IMyPublicKey publicKey,
long accountNumber,
java.sql.Timestamp creationTime,
java.lang.String biID)
creates a new XML certificate (NOTE: It will NOT be signed!)
|
XMLAccountCertificate(java.lang.String xml)
parses an existing XML certificate
|
Modifier and Type | Method and Description |
---|---|
long |
getAccountNumber() |
java.sql.Timestamp |
getCreationTime() |
java.lang.String |
getPIID()
Gets the Payment Instance ID of the Payment Instance where this account
is residing.
|
IMyPublicKey |
getPublicKey() |
boolean |
sign(IMyPrivateKey key) |
org.w3c.dom.Element |
toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document.
|
public XMLAccountCertificate(IMyPublicKey publicKey, long accountNumber, java.sql.Timestamp creationTime, java.lang.String biID)
publicKey
- public keyaccountNumber
- account numbercreationTime
- creation timestampbiID
- the signing BI's IDpublic XMLAccountCertificate(java.lang.String xml) throws java.lang.Exception
xml
- the certificate as stringjava.lang.Exception
public XMLAccountCertificate(byte[] xmldata) throws java.lang.Exception
java.lang.Exception
public XMLAccountCertificate(org.w3c.dom.Element xml) throws java.lang.Exception
xml
- the node that represents the AccountCertifcatejava.lang.Exception
public long getAccountNumber()
public java.sql.Timestamp getCreationTime()
public IMyPublicKey getPublicKey()
public boolean sign(IMyPrivateKey key)
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
IXMLEncodable
toXmlElement
in interface IXMLEncodable
a_doc
- a documentpublic java.lang.String getPIID()
Copyright © 2023. All rights reserved.