public class XMLPriceCertificate extends java.lang.Object implements IXMLEncodable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
m_biID |
private org.w3c.dom.Document |
m_docThePriceCert |
private java.lang.String |
m_hashValue |
private double |
m_rate |
private java.sql.Timestamp |
m_signatureTime |
private java.lang.String |
m_subjectKeyIdentifier |
private static java.lang.String |
XML_ELEM_BIID |
private static java.lang.String |
XML_ELEM_RATE |
private static java.lang.String |
XML_ELEM_SIG_TIME |
private static java.lang.String |
XML_ELEM_SUBJECT_KEY_IDENTIFIER |
static java.lang.String |
XML_ELEMENT_NAME |
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
Constructor and Description |
---|
XMLPriceCertificate(byte[] xmldata) |
XMLPriceCertificate(char[] xmldata) |
XMLPriceCertificate(org.w3c.dom.Document xml) |
XMLPriceCertificate(org.w3c.dom.Element xml) |
XMLPriceCertificate(java.lang.String xml) |
XMLPriceCertificate(java.lang.String subjectKeyIdentifier,
double rate,
java.lang.String biID)
XMLPriceCertificate: new price cert that has not been signed yet, and therefore has no signature-node and signatureTime
|
XMLPriceCertificate(java.lang.String subjectKeyIdentifier,
double rate,
java.sql.Timestamp signatureTime,
java.lang.String biID) |
XMLPriceCertificate(java.lang.String subjectKeyIdentifier,
double rate,
java.sql.Timestamp signatureTime,
java.lang.String biID,
java.lang.String signatureXml) |
XMLPriceCertificate(java.lang.String xml,
java.lang.String hashValue,
double rate) |
Modifier and Type | Method and Description |
---|---|
void |
addSignature(java.lang.String signatureXml) |
private void |
addSignatureNode(org.w3c.dom.Document a_doc,
java.lang.String signatureXml) |
private static java.lang.String |
formatEuroCentValue(double centvalue) |
java.lang.String |
getBiID() |
org.w3c.dom.Document |
getDocument() |
java.lang.String |
getHashValue() |
double |
getRate() |
java.sql.Timestamp |
getSignatureTime() |
java.lang.String |
getSubjectKeyIdentifier() |
private org.w3c.dom.Node |
internal_toXmlElement(org.w3c.dom.Document a_doc)
internal_toXmlElement
|
private void |
setValues(org.w3c.dom.Element xml)
Parses the XML representation and sets the internal values
|
boolean |
sign(IMyPrivateKey key) |
java.lang.String |
toString()
toString: responsible for the representation of a price cert in a GUI component
|
org.w3c.dom.Element |
toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document.
|
boolean |
verify(PaymentInstanceDBEntry a_bi) |
public static final java.lang.String XML_ELEMENT_NAME
private java.lang.String m_subjectKeyIdentifier
private double m_rate
private java.sql.Timestamp m_signatureTime
private java.lang.String m_biID
private java.lang.String m_hashValue
private org.w3c.dom.Document m_docThePriceCert
private static final java.lang.String XML_ELEM_SUBJECT_KEY_IDENTIFIER
private static final java.lang.String XML_ELEM_RATE
private static final java.lang.String XML_ELEM_SIG_TIME
private static final java.lang.String XML_ELEM_BIID
public XMLPriceCertificate(java.lang.String subjectKeyIdentifier, double rate, java.sql.Timestamp signatureTime, java.lang.String biID)
rate
- intcreationTime
- TimestampbiID
- Stringpublic XMLPriceCertificate(java.lang.String subjectKeyIdentifier, double rate, java.lang.String biID)
subjectKeyIdentifier
- Stringrate
- doublebiID
- Stringpublic XMLPriceCertificate(java.lang.String subjectKeyIdentifier, double rate, java.sql.Timestamp signatureTime, java.lang.String biID, java.lang.String signatureXml)
public XMLPriceCertificate(java.lang.String xml) throws java.lang.Exception
java.lang.Exception
public XMLPriceCertificate(java.lang.String xml, java.lang.String hashValue, double rate) throws java.lang.Exception
java.lang.Exception
public XMLPriceCertificate(char[] xmldata) throws java.lang.Exception
java.lang.Exception
public XMLPriceCertificate(byte[] xmldata) throws java.lang.Exception
java.lang.Exception
public XMLPriceCertificate(org.w3c.dom.Element xml) throws XMLParseException
XMLParseException
public XMLPriceCertificate(org.w3c.dom.Document xml) throws java.lang.Exception
java.lang.Exception
public void addSignature(java.lang.String signatureXml)
private void addSignatureNode(org.w3c.dom.Document a_doc, java.lang.String signatureXml)
private org.w3c.dom.Node internal_toXmlElement(org.w3c.dom.Document a_doc)
m_docThePriceCert
- Documentpublic boolean sign(IMyPrivateKey key)
public boolean verify(PaymentInstanceDBEntry a_bi)
private void setValues(org.w3c.dom.Element xml) throws XMLParseException
xml
- Nodejava.lang.Exception
XMLParseException
public java.sql.Timestamp getSignatureTime()
public double getRate()
public java.lang.String getSubjectKeyIdentifier()
public java.lang.String getBiID()
public java.lang.String getHashValue()
public org.w3c.dom.Document getDocument()
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
toXmlElement
in interface IXMLEncodable
a_doc
- a documentpublic java.lang.String toString()
toString
in class java.lang.Object
private static java.lang.String formatEuroCentValue(double centvalue)
Copyright © 2023. All rights reserved.