|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.pay.xml.XMLAccountCertificate
public class XMLAccountCertificate
This class contains the functionality for creating and parsing XML account
certificates. It provides access to the public key 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 Summary | |
---|---|
private long |
m_accountNumber
|
private java.lang.String |
m_biID
|
private java.sql.Timestamp |
m_creationTime
|
private org.w3c.dom.Document |
m_docTheAccountCert
|
private IMyPublicKey |
m_publicKey
|
Fields inherited from interface anon.util.IXMLEncodable |
---|
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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()
|
private org.w3c.dom.Element |
internal_toXmlElement(org.w3c.dom.Document a_doc)
Returns an XML represenation |
private void |
setValues(org.w3c.dom.Element xml)
Parses the XML representation and sets the internal values |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private IMyPublicKey m_publicKey
private java.sql.Timestamp m_creationTime
private long m_accountNumber
private java.lang.String m_biID
private org.w3c.dom.Document m_docTheAccountCert
Constructor Detail |
---|
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 string
java.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 AccountCertifcate
java.lang.Exception
Method Detail |
---|
private void setValues(org.w3c.dom.Element xml) throws java.lang.Exception
xml
- Node
java.lang.Exception
private org.w3c.dom.Element internal_toXmlElement(org.w3c.dom.Document a_doc)
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 document
public java.lang.String getPIID()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |