anon.infoservice
Class PaymentInstanceDBEntry

java.lang.Object
  extended by anon.infoservice.AbstractDatabaseEntry
      extended by anon.infoservice.AbstractDistributableDatabaseEntry
          extended by anon.infoservice.PaymentInstanceDBEntry
All Implemented Interfaces:
IDistributable, IXMLEncodable

public class PaymentInstanceDBEntry
extends AbstractDistributableDatabaseEntry

Holds the information of a payment instance for storing in the InfoService.


Nested Class Summary
 
Nested classes/interfaces inherited from class anon.infoservice.AbstractDistributableDatabaseEntry
AbstractDistributableDatabaseEntry.SerialDBEntry, AbstractDistributableDatabaseEntry.Serials
 
Field Summary
private  JAPCertificate m_cert
           
private  long m_creationTimeStamp
          Stores the time when this payment instance entry was created by the origin payment instance.
private  java.util.Vector m_listenerInterfaces
           
private  java.lang.String m_name
           
private  java.lang.String m_strPaymentInstanceId
          This is the ID of this payment instance.
private  org.w3c.dom.Element m_xmlDescription
          Stores the XML representation of this PaymentInstanceDBEntry.
 
Fields inherited from class anon.infoservice.AbstractDistributableDatabaseEntry
XML_ATTR_LAST_UPDATE, XML_ATTR_SERIAL, XML_ATTR_VALID, XML_ATTR_VERIFIED
 
Fields inherited from class anon.infoservice.AbstractDatabaseEntry
XML_LAST_UPDATE
 
Fields inherited from interface anon.infoservice.IDistributable
FIELD_HTTP_REQUEST_STRING, FIELD_HTTP_SERIALS_REQUEST_STRING
 
Fields inherited from interface anon.util.IXMLEncodable
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_VERSION
 
Constructor Summary
PaymentInstanceDBEntry(org.w3c.dom.Element elemRoot)
          Creates a PaymentInstanceDBEntry which represents a payment instance.
PaymentInstanceDBEntry(java.lang.String id, java.lang.String name, JAPCertificate a_cert, java.util.Enumeration a_listeners, java.lang.String software_version, long creationTime)
           
 
Method Summary
 JAPCertificate getCertificate()
           
 java.lang.String getId()
          Returns a unique ID for a database entry.
 long getLastUpdate()
          Returns the time in milliseconds when this db entry was created from the origin instance.
 java.util.Vector getListenerInterfaces()
           
 java.lang.String getName()
           
 java.lang.String getPostFile()
          This returns the filename (InfoService command), where this PaymentInstanceDBEntry is posted at other InfoServices.
 long getVersionNumber()
          Returns the time when this payment instance entry was created by the origin payment instance.
static java.lang.String getXmlElementName()
          Returns the name of the XML element constructed by this class.
 org.w3c.dom.Element getXmlStructure()
          Returns the XML structure for this db entry.
 
Methods inherited from class anon.infoservice.AbstractDistributableDatabaseEntry
getHttpRequestString, getHttpSerialsRequestString, getPostData, getPostEncoding, toXmlElement
 
Methods inherited from class anon.infoservice.AbstractDatabaseEntry
getCreationTime, getExpireTime, isNewerThan, isUserDefined, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_strPaymentInstanceId

private java.lang.String m_strPaymentInstanceId
This is the ID of this payment instance.


m_xmlDescription

private org.w3c.dom.Element m_xmlDescription
Stores the XML representation of this PaymentInstanceDBEntry.


m_creationTimeStamp

private long m_creationTimeStamp
Stores the time when this payment instance entry was created by the origin payment instance. This value is used to determine the more recent payment instance entry, if two entries are compared (higher version number -> more recent entry).


m_listenerInterfaces

private java.util.Vector m_listenerInterfaces

m_name

private java.lang.String m_name

m_cert

private JAPCertificate m_cert
Constructor Detail

PaymentInstanceDBEntry

public PaymentInstanceDBEntry(org.w3c.dom.Element elemRoot)
                       throws XMLParseException
Creates a PaymentInstanceDBEntry which represents a payment instance.

Throws:
XMLParseException

PaymentInstanceDBEntry

public PaymentInstanceDBEntry(java.lang.String id,
                              java.lang.String name,
                              JAPCertificate a_cert,
                              java.util.Enumeration a_listeners,
                              java.lang.String software_version,
                              long creationTime)
Method Detail

getId

public java.lang.String getId()
Description copied from class: AbstractDatabaseEntry
Returns a unique ID for a database entry.

Specified by:
getId in interface IDistributable
Specified by:
getId in class AbstractDatabaseEntry
Returns:
The ID of this database entry.

getName

public java.lang.String getName()

getListenerInterfaces

public java.util.Vector getListenerInterfaces()

getCertificate

public JAPCertificate getCertificate()

getVersionNumber

public long getVersionNumber()
Returns the time when this payment instance entry was created by the origin payment instance.

Specified by:
getVersionNumber in class AbstractDatabaseEntry
Returns:
A version number which is used to determine the more recent payment instance entry, if two entries are compared (higher version number -> more recent entry).

getLastUpdate

public long getLastUpdate()
Description copied from class: AbstractDatabaseEntry
Returns the time in milliseconds when this db entry was created from the origin instance.

Specified by:
getLastUpdate in class AbstractDatabaseEntry
Returns:
the time in milliseconds when this db entry was created from the origin instance

getPostFile

public java.lang.String getPostFile()
This returns the filename (InfoService command), where this PaymentInstanceDBEntry is posted at other InfoServices. It's always '/paymentinstance'.

Returns:
The filename where the information about this PaymentInstanceDBEntry is posted at other InfoServices when this entry is forwarded.

getXmlElementName

public static java.lang.String getXmlElementName()
Returns the name of the XML element constructed by this class.

Returns:
the name of the XML element constructed by this class

getXmlStructure

public org.w3c.dom.Element getXmlStructure()
Description copied from class: AbstractDistributableDatabaseEntry
Returns the XML structure for this db entry.

Specified by:
getXmlStructure in class AbstractDistributableDatabaseEntry
Returns:
The XML node of this db entry