All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.payment.PaymentTransactionRecord

java.lang.Object
   |
   +----semper.payment.PaymentTransactionRecord

public class PaymentTransactionRecord
extends Object
implements Serializable, Browseable
Repository of information related to a PaymentTransaction A PaymentTransactionRecord is the record of a transaction. This class provides the minimum functionality for transaction records. Adapter writers can extend this class. For example, any evidence accumulated during the transaction should be stored in adapter-specific attribute in the extended subclass. Eventually, we will define a dispute handling interface which purses and transaction records will be required to implement. These implementations will require access to evidence objects.

The various setter methods of this class should be used by the service implementations in the PaymentTransaction subclasses to keep the record up to date as a transaction progresses.

Version:
$Revision: 1.26 $ $Date: 1998/06/22 15:18:31 $
Author:
N. Asokan ([email protected])
See Also:
PaymentTransaction

Variable Index

 o NUMBER_OF_KEYS
 o serialVersionUID
To prevent frequent "loss" of Archive contents, due to irrelevant changes to the API of this class.

Constructor Index

 o PaymentTransactionRecord()
Constructor with no arguments; this should be used only by the internalizer
 o PaymentTransactionRecord(AccessName)
Create an transaction record with a given archive handle.

Method Index

 o compareTo(Browseable, int, boolean)
Compare with given object.
 o endTransaction()
Indicate end of transaction; updates various fields and writes the transaction record to stable storage.
 o exportToLineOfASCII()
One line of ASCII.
 o exportToLineOfHTML()
One line of HTML.
 o exportToLinesOfHTML()
Several lines of HTML.
 o getActions()
Dummy implementation of Browseable method.
 o getAmount()
Retrieve the amount involved in this transaction
 o getEndTime()
Get the end time of the Transaction (or the last update)
 o getFirstPurseRef()
Get the purse associated with this transaction.
 o getKeys()
Obtain the names of the keys which can be used to sort.
 o getMethodName(int)
Dummy implementation of Browseable method.
 o getName()
Returns the formal name of the Browseable.
 o getPaymentSystemName()
Get the name of the payment system associated with this transaction
 o getPeer()
Retrieve the identity of the peer in this transaction
 o getPurseName()
Get the name of the purse associated with this transaction
 o getPurseRef()
Get a reference to the purse involved in this transaction.
 o getStartTime()
Get the start time of the Transaction.
 o getState()
Get the current state of the transaction.
 o getType()
Retrieve the type of the service involved in this transaction
 o isActive()
Check if there is a transaction associated with this transaction record
 o isCompleted()
Check if this transaction record corresponds to a completed transaction
 o resumeTransaction()
Resume the transaction
 o setAmount(Amount)
Set the amount involved in this transaction TODO: This shouldn't be a public method; but how to arrange it so that Transaction subclasses in the adapters have access to this method? (TODO: check to see if we need to support multiple peers amounts)
 o setPeer(PaymentEntity)
Set the identity of the peer entity in this transaction TODO: This shouldn't be a public method; but how to arrange it so that Transaction subclasses in the adapters have access to this method? (TODO: check to see if we need to support multiple peers)
 o setPurseName(String)
Set the purse name corresponding to this transaction.
 o setState(PaymentTransactionState)
Set the state of the transaction.
 o setType(ServiceType)
Set the service type TODO: This shouldn't be a public method; but how to arrange it so that Transaction subclasses in the adapters have access to this method?
 o store()
Store the status of the transaction record
 o suspendTransaction()
Suspend the transaction.
 o toString()
Redefine toString() for pretty printing

Variables

 o serialVersionUID
 public static final long serialVersionUID
To prevent frequent "loss" of Archive contents, due to irrelevant changes to the API of this class.

 o NUMBER_OF_KEYS
 protected static int NUMBER_OF_KEYS

Constructors

 o PaymentTransactionRecord
 public PaymentTransactionRecord()
Constructor with no arguments; this should be used only by the internalizer

 o PaymentTransactionRecord
 public PaymentTransactionRecord(AccessName handle)
Create an transaction record with a given archive handle.

Parameters:
handle - unique archive handle (generated by the purse)
See Also:
PurseReference

Methods

 o setPurseName
 public synchronized void setPurseName(String purse_name) throws PaymentServiceException
Set the purse name corresponding to this transaction.

Parameters:
purse_name - distinguished name of purse
Returns:
nothing
Throws: PaymentServiceException
if the list of purses was already set.
See Also:
Purse
 o getStartTime
 public Date getStartTime()
Get the start time of the Transaction.

Returns:
start time of the transaction
See Also:
Date
 o setType
 protected synchronized void setType(ServiceType type)
Set the service type TODO: This shouldn't be a public method; but how to arrange it so that Transaction subclasses in the adapters have access to this method?

Parameters:
type - type of the service being offered in this transaction
Returns:
nothing
 o setPeer
 protected synchronized void setPeer(PaymentEntity peer)
Set the identity of the peer entity in this transaction TODO: This shouldn't be a public method; but how to arrange it so that Transaction subclasses in the adapters have access to this method? (TODO: check to see if we need to support multiple peers)

Parameters:
peer - PaymentEntity object representing peer
Returns:
nothing
 o setAmount
 protected synchronized void setAmount(Amount amount)
Set the amount involved in this transaction TODO: This shouldn't be a public method; but how to arrange it so that Transaction subclasses in the adapters have access to this method? (TODO: check to see if we need to support multiple peers amounts)

Parameters:
amount - Amount object representing the amount
Returns:
nothing
 o getPeer
 public PaymentEntity getPeer()
Retrieve the identity of the peer in this transaction

Returns:
PaymentEntity object representing peer
 o getAmount
 public Amount getAmount()
Retrieve the amount involved in this transaction

Returns:
Amount object
 o getType
 public ServiceType getType()
Retrieve the type of the service involved in this transaction

Returns:
ServiceType object
 o resumeTransaction
 public synchronized PaymentTransaction resumeTransaction() throws PaymentServiceException
Resume the transaction

Returns:
a PaymentTransaction object
Throws: PaymentServiceException
if the transaction cannot be resumed
See Also:
startTransaction
 o endTransaction
 public synchronized void endTransaction() throws PaymentServiceException
Indicate end of transaction; updates various fields and writes the transaction record to stable storage.

Throws: PaymentServiceException
when the transaction cannot be completed cleanly.
 o suspendTransaction
 public synchronized void suspendTransaction() throws PaymentServiceException
Suspend the transaction.

Throws: PaymentServiceException
if the transaction record cannot be saved to archive.
 o isActive
 public boolean isActive()
Check if there is a transaction associated with this transaction record

Returns:
boolean flag with value true if the transaction is active
 o isCompleted
 public boolean isCompleted()
Check if this transaction record corresponds to a completed transaction

Returns:
true if the transaction is completed
 o getEndTime
 public Date getEndTime()
Get the end time of the Transaction (or the last update)

Returns:
end time of the transaction
 o setState
 protected synchronized void setState(PaymentTransactionState state)
Set the state of the transaction.

Parameters:
state - new state value
Returns:
none
 o getState
 public PaymentTransactionState getState()
Get the current state of the transaction.

Returns:
state value
 o getPurseRef
 public PurseReference getPurseRef()
Get a reference to the purse involved in this transaction.

Returns:
a PurseReference object
 o getPurseName
 public String getPurseName()
Get the name of the purse associated with this transaction

Returns:
String name of purse
 o getPaymentSystemName
 public String getPaymentSystemName()
Get the name of the payment system associated with this transaction

Returns:
String name of purse
 o store
 public final synchronized void store() throws PaymentServiceException, ArchiveManException
Store the status of the transaction record

Returns:
nothing
Throws: ArchiveManException
when writing to archive failes
Throws: PaymentServiceException
when archive handle attribute of this object has not been initialised yet.
 o getFirstPurseRef
 public PurseReference getFirstPurseRef() throws PaymentServiceException
Get the purse associated with this transaction. This method is deprecated. Use the getPurseRef method instead.

Throws: PaymentServiceException
if the Purse reference could not be extracted.
See Also:
getPurseRef
 o toString
 public String toString()
Redefine toString() for pretty printing

Returns:
String describing this record
Overrides:
toString in class Object
 o getName
 public String getName()
Returns the formal name of the Browseable.

Returns:
the formal name which is Transaction.
See Also:
Browseable
 o exportToLineOfHTML
 public String exportToLineOfHTML()
One line of HTML.

See Also:
Browseable
 o exportToLinesOfHTML
 public String exportToLinesOfHTML()
Several lines of HTML.

See Also:
Browseable
 o exportToLineOfASCII
 public String exportToLineOfASCII()
One line of ASCII.

See Also:
Browseable
 o compareTo
 public int compareTo(Browseable other,
                      int keyno,
                      boolean reverse)
Compare with given object.

See Also:
compareTo
 o getKeys
 public String[] getKeys()
Obtain the names of the keys which can be used to sort.

See Also:
getKeys
 o getActions
 public String[] getActions()
Dummy implementation of Browseable method.

 o getMethodName
 public String getMethodName(int n)
Dummy implementation of Browseable method.


All Packages  Class Hierarchy  This Package  Previous  Next  Index