org.apache.geronimo.samples.daytrader
Class TradeWSAction

java.lang.Object
  extended byorg.apache.geronimo.samples.daytrader.TradeWSAction

public class TradeWSAction
extends java.lang.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(java.lang.String userID, java.lang.String symbol, double quantity, int orderProcessingMode)
           
 void cancelOrder(java.lang.Integer orderID, boolean twoPhase)
           
 OrderDataBean completeOrder(java.lang.Integer orderID, boolean twoPhase)
           
 QuoteDataBean createQuote(java.lang.String symbol, java.lang.String companyName, java.math.BigDecimal price)
           
 AccountDataBean getAccountData(java.lang.String userID)
           
 AccountProfileDataBean getAccountProfileData(java.lang.String userID)
           
 QuoteDataBean[] getAllQuotes()
           
 OrderDataBean[] getClosedOrders(java.lang.String userID)
           
 HoldingDataBean getHolding(java.lang.Integer holdingID)
           
 HoldingDataBean[] getHoldings(java.lang.String userID)
           
 MarketSummaryDataBeanWS getMarketSummary()
           
 OrderDataBean[] getOrders(java.lang.String userID)
           
 QuoteDataBean getQuote(java.lang.String symbol)
           
 AccountDataBean login(java.lang.String userID, java.lang.String password)
           
 void logout(java.lang.String userID)
           
 void orderCompleted(java.lang.String userID, java.lang.Integer orderID)
           
 void queueOrder(java.lang.Integer orderID, boolean twoPhase)
           
 AccountDataBean register(java.lang.String userID, java.lang.String password, java.lang.String fullname, java.lang.String address, java.lang.String email, java.lang.String creditcard, java.math.BigDecimal openBalance)
           
 RunStatsDataBean resetTrade(boolean deleteAll)
           
 OrderDataBean sell(java.lang.String userID, java.lang.Integer holdingID, int orderProcessingMode)
           
 AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
           
 QuoteDataBean updateQuotePriceVolume(java.lang.String symbol, java.math.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 java.lang.Exception,
                                                java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

buy

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

sell

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

queueOrder

public void queueOrder(java.lang.Integer orderID,
                       boolean twoPhase)
                throws java.lang.Exception,
                       java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

completeOrder

public OrderDataBean completeOrder(java.lang.Integer orderID,
                                   boolean twoPhase)
                            throws java.lang.Exception,
                                   java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

cancelOrder

public void cancelOrder(java.lang.Integer orderID,
                        boolean twoPhase)
                 throws java.lang.Exception,
                        java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

orderCompleted

public void orderCompleted(java.lang.String userID,
                           java.lang.Integer orderID)
                    throws java.lang.Exception,
                           java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

getOrders

public OrderDataBean[] getOrders(java.lang.String userID)
                          throws java.lang.Exception,
                                 java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

getClosedOrders

public OrderDataBean[] getClosedOrders(java.lang.String userID)
                                throws java.lang.Exception,
                                       java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

createQuote

public QuoteDataBean createQuote(java.lang.String symbol,
                                 java.lang.String companyName,
                                 java.math.BigDecimal price)
                          throws java.lang.Exception,
                                 java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

getQuote

public QuoteDataBean getQuote(java.lang.String symbol)
                       throws java.lang.Exception,
                              java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

getAllQuotes

public QuoteDataBean[] getAllQuotes()
                             throws java.lang.Exception,
                                    java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

updateQuotePriceVolume

public QuoteDataBean updateQuotePriceVolume(java.lang.String symbol,
                                            java.math.BigDecimal newPrice,
                                            double sharesTraded)
                                     throws java.lang.Exception,
                                            java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

getHoldings

public HoldingDataBean[] getHoldings(java.lang.String userID)
                              throws java.lang.Exception,
                                     java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

getHolding

public HoldingDataBean getHolding(java.lang.Integer holdingID)
                           throws java.lang.Exception,
                                  java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

getAccountData

public AccountDataBean getAccountData(java.lang.String userID)
                               throws java.lang.Exception,
                                      java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

getAccountProfileData

public AccountProfileDataBean getAccountProfileData(java.lang.String userID)
                                             throws java.lang.Exception,
                                                    java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

updateAccountProfile

public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
                                            throws java.lang.Exception,
                                                   java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

login

public AccountDataBean login(java.lang.String userID,
                             java.lang.String password)
                      throws java.lang.Exception,
                             java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

logout

public void logout(java.lang.String userID)
            throws java.lang.Exception,
                   java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException

register

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

resetTrade

public RunStatsDataBean resetTrade(boolean deleteAll)
                            throws java.lang.Exception,
                                   java.rmi.RemoteException
Throws:
java.lang.Exception
java.rmi.RemoteException


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