edu.cmu.mse.vault.client
Class VaultFTBaseClient

java.lang.Object
  extended byedu.cmu.mse.vault.client.VaultFTBaseClient

public class VaultFTBaseClient
extends java.lang.Object

Author:
Jinhee Lee TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
static java.lang.String cfgFn
           
static VaultJNDICacheManager vjc
          Comment for vjc VaultJNDICacheManager is the static member of VaultFTBaseClient, because VaultFTBaseClient need to access to the CacheMap to retrieve the object reference and JNDI name
 
Constructor Summary
VaultFTBaseClient(int refID, MessageKey mk)
           
 
Method Summary
 boolean addAccount(java.lang.String strCustomerId, java.lang.String strBalance)
          Is used to create a new account for an existing customer
 boolean addCustomer(java.lang.String firstName, java.lang.String lastName)
          create new customer information to the customer database
 boolean deposit(java.lang.String accountid, java.lang.String amountOfMoney, boolean deposit)
           
 boolean depositMoney(java.lang.String accountID, java.lang.String amount)
           
 boolean editCustomer(java.lang.String strCustomerId, java.lang.String firstName, java.lang.String lastName)
           
static javax.naming.Context getInitialContext()
           
 boolean isSuccessfulConnection()
           
 boolean showTransactionHistory(java.lang.String accountId)
           
 boolean transfer(java.lang.String sourceaccountid, java.lang.String destaccountid, java.lang.String amountOfMoney)
           
 boolean transferMoney(java.lang.String fromAccountID, java.lang.String toAccountID, java.lang.String amount)
           
 boolean withdrawMoney(java.lang.String accountID, java.lang.String amount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vjc

public static VaultJNDICacheManager vjc
Comment for vjc VaultJNDICacheManager is the static member of VaultFTBaseClient, because VaultFTBaseClient need to access to the CacheMap to retrieve the object reference and JNDI name


cfgFn

public static final java.lang.String cfgFn
See Also:
Constant Field Values
Constructor Detail

VaultFTBaseClient

public VaultFTBaseClient(int refID,
                         MessageKey mk)
Parameters:
refID -
Method Detail

isSuccessfulConnection

public boolean isSuccessfulConnection()
Returns:
Returns the successfulConnection.

showTransactionHistory

public boolean showTransactionHistory(java.lang.String accountId)
Parameters:
accountId -
Returns:
true if the transaction is done successfully

deposit

public boolean deposit(java.lang.String accountid,
                       java.lang.String amountOfMoney,
                       boolean deposit)
Parameters:
accountid -
amountOfMoney -
deposit -
Returns:
true if the transaction is done successfully

addCustomer

public boolean addCustomer(java.lang.String firstName,
                           java.lang.String lastName)
create new customer information to the customer database

Parameters:
firstName -
lastName -
Returns:
true if the transaction is done successfully, false if not

editCustomer

public boolean editCustomer(java.lang.String strCustomerId,
                            java.lang.String firstName,
                            java.lang.String lastName)

getInitialContext

public static javax.naming.Context getInitialContext()
                                              throws javax.naming.NamingException
Returns:
Throws:
javax.naming.NamingException

addAccount

public boolean addAccount(java.lang.String strCustomerId,
                          java.lang.String strBalance)
Is used to create a new account for an existing customer

Parameters:
strCustomerId -
strBalance -
Returns:

transfer

public boolean transfer(java.lang.String sourceaccountid,
                        java.lang.String destaccountid,
                        java.lang.String amountOfMoney)
Parameters:
sourceaccountid -
destaccountid -
amountOfMoney -
Returns:

depositMoney

public boolean depositMoney(java.lang.String accountID,
                            java.lang.String amount)

withdrawMoney

public boolean withdrawMoney(java.lang.String accountID,
                             java.lang.String amount)

transferMoney

public boolean transferMoney(java.lang.String fromAccountID,
                             java.lang.String toAccountID,
                             java.lang.String amount)