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
-
NUMBER_OF_KEYS
-
-
serialVersionUID
-
To prevent frequent "loss" of Archive contents, due to irrelevant
changes to the API of this class.
-
PaymentTransactionRecord()
- Constructor with no arguments; this should be used only by the
internalizer
-
PaymentTransactionRecord(AccessName)
- Create an transaction record with a given archive handle.
-
compareTo(Browseable, int, boolean)
-
Compare with given object.
-
endTransaction()
- Indicate end of transaction; updates various fields and writes
the transaction record to stable storage.
-
exportToLineOfASCII()
-
One line of ASCII.
-
exportToLineOfHTML()
-
One line of HTML.
-
exportToLinesOfHTML()
-
Several lines of HTML.
-
getActions()
- Dummy implementation of Browseable method.
-
getAmount()
- Retrieve the amount involved in this transaction
-
getEndTime()
- Get the end time of the Transaction (or the last update)
-
getFirstPurseRef()
- Get the purse associated with this transaction.
-
getKeys()
-
Obtain the names of the keys which can be used to sort.
-
getMethodName(int)
- Dummy implementation of Browseable method.
-
getName()
- Returns the formal name of the Browseable.
-
getPaymentSystemName()
- Get the name of the payment system associated with this transaction
-
getPeer()
- Retrieve the identity of the peer in this transaction
-
getPurseName()
- Get the name of the purse associated with this transaction
-
getPurseRef()
- Get a reference to the purse involved in this transaction.
-
getStartTime()
- Get the start time of the Transaction.
-
getState()
- Get the current state of the transaction.
-
getType()
- Retrieve the type of the service involved in this transaction
-
isActive()
- Check if there is a transaction associated with this transaction
record
-
isCompleted()
- Check if this transaction record corresponds to a completed
transaction
-
resumeTransaction()
- Resume the transaction
-
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)
-
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)
-
setPurseName(String)
- Set the purse name corresponding to this transaction.
-
setState(PaymentTransactionState)
- Set the state of the transaction.
-
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?
-
store()
- Store the status of the transaction record
-
suspendTransaction()
- Suspend the transaction.
-
toString()
- Redefine toString() for pretty printing
serialVersionUID
public static final long serialVersionUID
- To prevent frequent "loss" of Archive contents, due to irrelevant
changes to the API of this class.
NUMBER_OF_KEYS
protected static int NUMBER_OF_KEYS
PaymentTransactionRecord
public PaymentTransactionRecord()
- Constructor with no arguments; this should be used only by the
internalizer
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
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
getStartTime
public Date getStartTime()
- Get the start time of the Transaction.
- Returns:
- start time of the transaction
- See Also:
- Date
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
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
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
getPeer
public PaymentEntity getPeer()
- Retrieve the identity of the peer in this transaction
- Returns:
- PaymentEntity object representing peer
getAmount
public Amount getAmount()
- Retrieve the amount involved in this transaction
- Returns:
- Amount object
getType
public ServiceType getType()
- Retrieve the type of the service involved in this transaction
- Returns:
- ServiceType object
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
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.
suspendTransaction
public synchronized void suspendTransaction() throws PaymentServiceException
- Suspend the transaction.
- Throws: PaymentServiceException
- if the transaction record
cannot be saved to archive.
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
isCompleted
public boolean isCompleted()
- Check if this transaction record corresponds to a completed
transaction
- Returns:
- true if the transaction is completed
getEndTime
public Date getEndTime()
- Get the end time of the Transaction (or the last update)
- Returns:
- end time of the transaction
setState
protected synchronized void setState(PaymentTransactionState state)
- Set the state of the transaction.
- Parameters:
- state - new state value
- Returns:
- none
getState
public PaymentTransactionState getState()
- Get the current state of the transaction.
- Returns:
- state value
getPurseRef
public PurseReference getPurseRef()
- Get a reference to the purse involved in this transaction.
- Returns:
- a PurseReference object
getPurseName
public String getPurseName()
- Get the name of the purse associated with this transaction
- Returns:
- String name of purse
getPaymentSystemName
public String getPaymentSystemName()
- Get the name of the payment system associated with this transaction
- Returns:
- String name of purse
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.
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
toString
public String toString()
- Redefine toString() for pretty printing
- Returns:
- String describing this record
- Overrides:
- toString in class Object
getName
public String getName()
- Returns the formal name of the Browseable.
- Returns:
- the formal name which is Transaction.
- See Also:
- Browseable
exportToLineOfHTML
public String exportToLineOfHTML()
- One line of HTML.
- See Also:
- Browseable
exportToLinesOfHTML
public String exportToLinesOfHTML()
- Several lines of HTML.
- See Also:
- Browseable
exportToLineOfASCII
public String exportToLineOfASCII()
- One line of ASCII.
- See Also:
- Browseable
compareTo
public int compareTo(Browseable other,
int keyno,
boolean reverse)
- Compare with given object.
- See Also:
- compareTo
getKeys
public String[] getKeys()
- Obtain the names of the keys which can be used to sort.
- See Also:
- getKeys
getActions
public String[] getActions()
- Dummy implementation of Browseable method.
getMethodName
public String getMethodName(int n)
- Dummy implementation of Browseable method.
All Packages Class Hierarchy This Package Previous Next Index