org.apache.geronimo.samples.daytrader
Class TradeWSAction

java.lang.Object
  extended by org.apache.geronimo.samples.daytrader.TradeWSAction

public class TradeWSAction
extends Object

Author:
aspyker This is a TradeAction wrapper to handle web service handling of collections. Instead this class uses typed arrays.

Constructor Summary
TradeWSAction()
           
 
Method Summary
 OrderDataBean buy(String userID, String symbol, double quantity, int orderProcessingMode)
           
 void cancelOrder(Integer orderID, boolean twoPhase)
           
 OrderDataBean completeOrder(Integer orderID, boolean twoPhase)
           
 QuoteDataBean createQuote(String symbol, String companyName, BigDecimal price)
           
 AccountDataBean getAccountData(String userID)
           
 AccountProfileDataBean getAccountProfileData(String userID)
           
 QuoteDataBean[] getAllQuotes()
           
 OrderDataBean[] getClosedOrders(String userID)
           
 HoldingDataBean getHolding(Integer holdingID)
           
 HoldingDataBean[] getHoldings(String userID)
           
 MarketSummaryDataBeanWS getMarketSummary()
           
 OrderDataBean[] getOrders(String userID)
           
 QuoteDataBean getQuote(String symbol)
           
 AccountDataBean login(String userID, String password)
           
 void logout(String userID)
           
 void orderCompleted(String userID, Integer orderID)
           
 void queueOrder(Integer orderID, boolean twoPhase)
           
 AccountDataBean register(String userID, String password, String fullname, String address, String email, String creditcard, BigDecimal openBalance)
           
 RunStatsDataBean resetTrade(boolean deleteAll)
           
 OrderDataBean sell(String userID, Integer holdingID, int orderProcessingMode)
           
 AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
           
 QuoteDataBean updateQuotePriceVolume(String symbol, BigDecimal newPrice, double sharesTraded)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TradeWSAction

public TradeWSAction()
Method Detail

getMarketSummary

public MarketSummaryDataBeanWS getMarketSummary()
                                         throws Exception,
                                                RemoteException
Throws:
Exception
RemoteException

buy

public OrderDataBean buy(String userID,
                         String symbol,
                         double quantity,
                         int orderProcessingMode)
                  throws Exception,
                         RemoteException
Throws:
Exception
RemoteException

sell

public OrderDataBean sell(String userID,
                          Integer holdingID,
                          int orderProcessingMode)
                   throws Exception,
                          RemoteException
Throws:
Exception
RemoteException

queueOrder

public void queueOrder(Integer orderID,
                       boolean twoPhase)
                throws Exception,
                       RemoteException
Throws:
Exception
RemoteException

completeOrder

public OrderDataBean completeOrder(Integer orderID,
                                   boolean twoPhase)
                            throws Exception,
                                   RemoteException
Throws:
Exception
RemoteException

cancelOrder

public void cancelOrder(Integer orderID,
                        boolean twoPhase)
                 throws Exception,
                        RemoteException
Throws:
Exception
RemoteException

orderCompleted

public void orderCompleted(String userID,
                           Integer orderID)
                    throws Exception,
                           RemoteException
Throws:
Exception
RemoteException

getOrders

public OrderDataBean[] getOrders(String userID)
                          throws Exception,
                                 RemoteException
Throws:
Exception
RemoteException

getClosedOrders

public OrderDataBean[] getClosedOrders(String userID)
                                throws Exception,
                                       RemoteException
Throws:
Exception
RemoteException

createQuote

public QuoteDataBean createQuote(String symbol,
                                 String companyName,
                                 BigDecimal price)
                          throws Exception,
                                 RemoteException
Throws:
Exception
RemoteException

getQuote

public QuoteDataBean getQuote(String symbol)
                       throws Exception,
                              RemoteException
Throws:
Exception
RemoteException

getAllQuotes

public QuoteDataBean[] getAllQuotes()
                             throws Exception,
                                    RemoteException
Throws:
Exception
RemoteException

updateQuotePriceVolume

public QuoteDataBean updateQuotePriceVolume(String symbol,
                                            BigDecimal newPrice,
                                            double sharesTraded)
                                     throws Exception,
                                            RemoteException
Throws:
Exception
RemoteException

getHoldings

public HoldingDataBean[] getHoldings(String userID)
                              throws Exception,
                                     RemoteException
Throws:
Exception
RemoteException

getHolding

public HoldingDataBean getHolding(Integer holdingID)
                           throws Exception,
                                  RemoteException
Throws:
Exception
RemoteException

getAccountData

public AccountDataBean getAccountData(String userID)
                               throws Exception,
                                      RemoteException
Throws:
Exception
RemoteException

getAccountProfileData

public AccountProfileDataBean getAccountProfileData(String userID)
                                             throws Exception,
                                                    RemoteException
Throws:
Exception
RemoteException

updateAccountProfile

public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
                                            throws Exception,
                                                   RemoteException
Throws:
Exception
RemoteException

login

public AccountDataBean login(String userID,
                             String password)
                      throws Exception,
                             RemoteException
Throws:
Exception
RemoteException

logout

public void logout(String userID)
            throws Exception,
                   RemoteException
Throws:
Exception
RemoteException

register

public AccountDataBean register(String userID,
                                String password,
                                String fullname,
                                String address,
                                String email,
                                String creditcard,
                                BigDecimal openBalance)
                         throws Exception,
                                RemoteException
Throws:
Exception
RemoteException

resetTrade

public RunStatsDataBean resetTrade(boolean deleteAll)
                            throws Exception,
                                   RemoteException
Throws:
Exception
RemoteException


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.