All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.payment.mandate.mandatePurse

java.lang.Object
   |
   +----semper.payment.Purse
           |
           +----semper.payment.AccountBasedPurse
                   |
                   +----semper.payment.ChequePurse
                           |
                           +----semper.payment.mandate.mandatePurse

public class mandatePurse
extends ChequePurse
implements Serializable
Mandate Purse - part of the adapter for the "Mandate" payment module

Version:
$Revision: 1.14 $ $Date: 1998/10/13 12:57:54 $
Author:
K. L¨ders-Jensen ([email protected]), Bjarke Dahl Ebert ([email protected])
See Also:
mandateTransaction

Variable Index

 o DEF_PORT
Default parameters for purse configuration: local communication port for value transfer transactions
 o DEF_PROT
Default parameters for purse configuration: communication protocol

Constructor Index

 o mandatePurse()
Constructor

Method Index

 o disable()
Disable an active purse by killing its listener service point thread, if one exists
  • Pre-conditions: The purse must have been already initiated during PaymentManager.init
  • Post-condition: The purse is disabled and can be safely deleted if necessary
  • Used-by: PurseReference#deactivate
     o doPurseOp(TinguinSession, String)
     o getAccountNumber()
    Get the account number
     o getAmount()
    Get the current amount in the purse Implemented from abstract method defined in Purse
     o getCertificate()
    Retrieve the certificate of the DC
     o getNumberOfCheques()
    Return the number of blank cheques in purse
     o getPasswd()
     o getPaymentSystemName()
    Get the Payment System Name which is represented by this purse Access to the attribute _paymentSystemName.
     o getPrintableStatusInfo()
    Return a hash table containing "attribute-value" pairs describing the status of the purse.
     o getPurseAddress()
    We override getPurseAddress() so that it always contains the current host address.
     o getPurseOpsList()
    Returns a vector containing names of supported special purse operations.
     o getUnlockedAmount()
    Get the unlocked amount Implemented from abstract method defined in Purse
     o getUserID()
     o init()
    Initialise.
     o isCurrencySupported(Currency)
    Check if a given currency is supported Implemented from abstract method defined in Purse
     o isEnabled()
    This adapter is always available for use.
     o isRegistered()
    Has this purse been registered with its "bank"?
     o isSecurityServiceOffered(SecurityOption)
    Check if a specific security service is offered Implemented from abstract method defined in Purse
     o issueCheque(byte[], Amount, int, int, String, String)
     o issueCheque(byte[], Amount, String, String)
    Issue a cheque valid from now and 20 days ahead
     o offeredSecurityServices()
    Get the list of security services offered Implemented from abstract method defined in Purse
     o receiveCheque(Cheque)
     o registerWithBank()
    Register or re-register a purse with the bank.
     o retrieveCheques()
    Return a list of cheques in purse
     o setUnlockedAmount(Amount)
    Set the unlocked amount Implemented from abstract method defined in Purse
     o setup(TinguinSession)
    Setup the purse.
     o startTransaction()
    Starts a new Transaction.
     o startTransaction(PaymentTransactionRecord)
    Resume an existing transaction
     o supportedCurrency()
    Return the list of supported currencies Implemented from abstract method defined in Purse
  • Variables

     o DEF_PROT
     protected static final String DEF_PROT
    
    Default parameters for purse configuration: communication protocol

     o DEF_PORT
     protected static final String DEF_PORT
    
    Default parameters for purse configuration: local communication port for value transfer transactions

    Constructors

     o mandatePurse
     public mandatePurse()
    
    Constructor

    Methods

     o getPasswd
     public String getPasswd() throws mandateModuleException
    
     o getNumberOfCheques
     public int getNumberOfCheques() throws mandateModuleException
    
    Return the number of blank cheques in purse

    Returns:
    number of blank cheques in purse
    Overrides:
    getNumberOfCheques in class ChequePurse
    See Also:
    getNumberOfCheques
     o retrieveCheques
     public Vector retrieveCheques() throws mandateModuleException
    
    Return a list of cheques in purse

    Returns:
    a list of cheques in purse
    Overrides:
    retrieveCheques in class ChequePurse
    See Also:
    retrieveCheques
     o startTransaction
     public PaymentTransaction startTransaction() throws PaymentServiceException
    
    Starts a new Transaction. The invoker of this method should explicitly cast the returned object to mandateTransaction

    Throws: PaymentServiceException
    if a transaction cannot be started.
    Overrides:
    startTransaction in class Purse
    See Also:
    startTransaction
     o startTransaction
     public PaymentTransaction startTransaction(PaymentTransactionRecord pr) throws PaymentServiceException
    
    Resume an existing transaction

    Parameters:
    pr - Existing payment transaction record
    Returns:
    a new PaymentTransaction object
    Throws: PaymentServiceException
    in case of exceptions
    Overrides:
    startTransaction in class Purse
     o issueCheque
     public Cheque issueCheque(byte certificate[],
                               Amount amount,
                               int validStart,
                               int validEnd,
                               String payee,
                               String ext_ref) throws mandateModuleException
    
     o issueCheque
     public Cheque issueCheque(byte certificate[],
                               Amount amount,
                               String payee,
                               String ext_ref) throws mandateModuleException
    
    Issue a cheque valid from now and 20 days ahead

     o getPaymentSystemName
     public String getPaymentSystemName()
    
    Get the Payment System Name which is represented by this purse Access to the attribute _paymentSystemName. Overriding default method defined in Purse.java The first part of the payment system name is a static class-wide constant that is unique to a payment system (MANDATE). The second part is the brand name (e.g. EuroCard).

    Overrides:
    getPaymentSystemName in class Purse
    See Also:
    getPaymentSystemName
     o registerWithBank
     public void registerWithBank() throws PaymentServiceException
    
    Register or re-register a purse with the bank. Implemented from abstract method defined in Purse For MANDATE, this is a no-op, since a MANDATE document carrier is always registered with the bank

    Throws: PaymentServiceException
    if registration failed
    Overrides:
    registerWithBank in class Purse
    See Also:
    registerWithBank
     o getAccountNumber
     public String getAccountNumber()
    
    Get the account number

    Returns:
    string containing the account number for this purse
     o supportedCurrency
     public Vector supportedCurrency()
    
    Return the list of supported currencies Implemented from abstract method defined in Purse

    Overrides:
    supportedCurrency in class Purse
    See Also:
    supportedCurrency
     o getCertificate
     public byte[] getCertificate() throws mandateModuleException
    
    Retrieve the certificate of the DC

     o receiveCheque
     public void receiveCheque(Cheque c) throws mandateModuleException
    
     o isCurrencySupported
     public boolean isCurrencySupported(Currency currency)
    
    Check if a given currency is supported Implemented from abstract method defined in Purse

    Overrides:
    isCurrencySupported in class Purse
    See Also:
    isCurrencySupported
     o offeredSecurityServices
     public Vector offeredSecurityServices()
    
    Get the list of security services offered Implemented from abstract method defined in Purse

    Overrides:
    offeredSecurityServices in class Purse
    See Also:
    offeredSecurityServices
     o isSecurityServiceOffered
     public boolean isSecurityServiceOffered(SecurityOption service)
    
    Check if a specific security service is offered Implemented from abstract method defined in Purse

    Overrides:
    isSecurityServiceOffered in class Purse
    See Also:
    isSecurityServiceOffered
     o getAmount
     public Amount getAmount() throws AmountNotApplicable
    
    Get the current amount in the purse Implemented from abstract method defined in Purse

    Throws: AmountNotApplicable
    always because current amount does not make sense in this system
    Overrides:
    getAmount in class Purse
    See Also:
    getAmount
     o setUnlockedAmount
     public synchronized void setUnlockedAmount(Amount amount)
    
    Set the unlocked amount Implemented from abstract method defined in Purse

    Overrides:
    setUnlockedAmount in class Purse
    See Also:
    setUnlockedAmount
     o getUnlockedAmount
     public Amount getUnlockedAmount()
    
    Get the unlocked amount Implemented from abstract method defined in Purse

    Overrides:
    getUnlockedAmount in class Purse
    See Also:
    getUnlockedAmount
     o getPurseAddress
     public PaymentEntity getPurseAddress()
    
    We override getPurseAddress() so that it always contains the current host address. TODO: Check if this is a reasonable thing to do

    Returns:
    PaymentEntity object indicating the address
    Overrides:
    getPurseAddress in class Purse
     o isEnabled
     public boolean isEnabled()
    
    This adapter is always available for use. Indicate it by always returning true.

    Returns:
    s true
    Overrides:
    isEnabled in class Purse
     o isRegistered
     public boolean isRegistered()
    
    Has this purse been registered with its "bank"?

    Returns:
    s Always returns true, since a DC is already registered.
    Overrides:
    isRegistered in class Purse
     o disable
     protected void disable() throws PaymentServiceException
    
    Disable an active purse by killing its listener service point thread, if one exists
  • Pre-conditions: The purse must have been already initiated during PaymentManager.init
  • Post-condition: The purse is disabled and can be safely deleted if necessary
  • Used-by: PurseReference#deactivate

    Throws: PaymentServiceException
    if service point thread cannot be killed
    Overrides:
    disable in class Purse
  •  o getPrintableStatusInfo
     public Hashtable getPrintableStatusInfo()
    
    Return a hash table containing "attribute-value" pairs describing the status of the purse. Overrides the default implementation in the parent class.

    Returns:
    Hashtable containing attr-value pairs
    Overrides:
    getPrintableStatusInfo in class Purse
    See Also:
    getPrintableStatusInfo
     o getUserID
     public String getUserID()
    
     o init
     public synchronized void init() throws PaymentServiceException
    
    Initialise. The following actions are currently taken: ([bde] the following is from genericPurse:)
  • Register a place to receive payments
  • [tbd] read in preferences (initialise with defaults if needed)

    Throws: PaymentServiceException
    on init failure
    Overrides:
    init in class Purse
  •  o setup
     public void setup(TinguinSession dis) throws PaymentServiceException
    
    Setup the purse.

    Parameters:
    dis - an active Tinguin session
    Returns:
    nothing
    Throws: PaymentServiceException
    on misc. errors
    Overrides:
    setup in class Purse
    See Also:
    setup
     o getPurseOpsList
     public Vector getPurseOpsList()
    
    Returns a vector containing names of supported special purse operations.

    Overrides:
    getPurseOpsList in class AccountBasedPurse
     o doPurseOp
     public boolean doPurseOp(TinguinSession dis,
                              String userchoice) throws PaymentServiceException
    
    Returns:
    s true if user cancelled
    Overrides:
    doPurseOp in class AccountBasedPurse

    All Packages  Class Hierarchy  This Package  Previous  Next  Index