|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.pay.xml.XMLBalance
public class XMLBalance
This class holds a balance certificate. Can be converted to and from XML
Field Summary | |
---|---|
private static java.lang.String |
DEFAULT_RATE_ENDDATE
|
private org.w3c.dom.Document |
m_docTheBalance
|
private java.sql.Timestamp |
m_flatEnddate
|
private long |
m_lAccountNumber
the number of the account that this balance object belongs to |
private long |
m_lDeposit
the amount of money which the user has paid for the corresponding volume plan |
private long |
m_lSpent
the amount of byte which are already consumed for the corresponding account |
private java.lang.String |
m_message
|
private java.net.URL |
m_messageLink
|
private java.lang.String |
m_messageText
|
private java.sql.Timestamp |
m_Timestamp
|
private java.sql.Timestamp |
m_ValidTime
bytes that are not consumed if there are any will expire after that date |
private long |
m_volumeKBytesleft
the kbytes that are still left to spend for the corresponding account |
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 | |
---|---|
XMLBalance(org.w3c.dom.Document doc)
|
|
XMLBalance(org.w3c.dom.Element elemBalance)
|
|
XMLBalance(long accountNumber,
long deposit,
long spent,
java.sql.Timestamp timestamp,
java.sql.Timestamp validTime,
long volumeBytesleft,
java.sql.Timestamp flatEnddate,
IMyPrivateKey signKey)
|
|
XMLBalance(java.lang.String xmlDoc)
|
Method Summary | |
---|---|
long |
getAccountNumber()
Returns the number the number of the account to which this balance belongs to |
long |
getDeposit()
Returns the total amount of money spent by the user to buy the corresponding volume plan. |
java.sql.Timestamp |
getFlatEnddate()
|
PayMessage |
getMessage()
|
long |
getSpent()
Returns the overall spent bytes for the corresponding account |
java.sql.Timestamp |
getTimestamp()
|
java.sql.Timestamp |
getValidTime()
Returns the Date after that unspent byte volume will expire |
long |
getVolumeKBytesLeft()
getVolumeKBytesLeft: returns the current credit of the user Implementation depends on the payment system used formerly returned the difference between cumulative spent and deposit bytes now returns volume_bytesleft return value will be compared to jap.pay.PaymentMainPanel WARNING_AMOUNT |
private org.w3c.dom.Element |
internal_toXmlElement(org.w3c.dom.Document a_doc)
|
void |
setMessage(PayMessage a_message)
|
private void |
setValues(org.w3c.dom.Element elemRoot)
|
void |
sign(IMyPrivateKey signKey)
|
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 static final java.lang.String DEFAULT_RATE_ENDDATE
private long m_lAccountNumber
private java.sql.Timestamp m_Timestamp
private java.sql.Timestamp m_ValidTime
private long m_lDeposit
private long m_lSpent
private java.sql.Timestamp m_flatEnddate
private long m_volumeKBytesleft
private java.lang.String m_message
private java.lang.String m_messageText
private java.net.URL m_messageLink
private org.w3c.dom.Document m_docTheBalance
Constructor Detail |
---|
public XMLBalance(long accountNumber, long deposit, long spent, java.sql.Timestamp timestamp, java.sql.Timestamp validTime, long volumeBytesleft, java.sql.Timestamp flatEnddate, IMyPrivateKey signKey)
public XMLBalance(org.w3c.dom.Document doc) throws java.lang.Exception
java.lang.Exception
public XMLBalance(java.lang.String xmlDoc) throws java.lang.Exception
java.lang.Exception
public XMLBalance(org.w3c.dom.Element elemBalance) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void sign(IMyPrivateKey signKey)
public void setMessage(PayMessage a_message)
private void setValues(org.w3c.dom.Element elemRoot) throws java.lang.Exception
java.lang.Exception
private org.w3c.dom.Element internal_toXmlElement(org.w3c.dom.Document a_doc)
public long getAccountNumber()
public long getDeposit()
public long getSpent()
public long getVolumeKBytesLeft()
public java.sql.Timestamp getFlatEnddate()
public java.sql.Timestamp getTimestamp()
public java.sql.Timestamp getValidTime()
public PayMessage getMessage()
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
IXMLEncodable
toXmlElement
in interface IXMLEncodable
a_doc
- a document
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |