com.ibm.commerce.rules.project
Class EventRuleHelperUtil

java.lang.Object
  |
  +--com.ibm.commerce.rules.project.EventRuleHelperUtil
All Implemented Interfaces:
WcsBusinessObjectsProxy

public class EventRuleHelperUtil
extends java.lang.Object
implements WcsBusinessObjectsProxy

Provides some low-level services to the BlazeEventRuleHelper.


Field Summary
static java.lang.String COPYRIGHT
           
 
Constructor Summary
EventRuleHelperUtil(CommandContext commandContext)
           
 
Method Summary
protected  java.math.BigDecimal computeTotalInCurrency(java.util.Collection orderResultBeans, StoreAccessBean store, java.lang.String currencySymbol)
          Computes the total value of the items in the specified orders, expressing the total in the specified currency using the conversion rules from the specified store.
protected  java.math.BigDecimal computeTotalInCurrency(OrderItemAccessBean orderItem, StoreAccessBean store, java.lang.String currencySymbol)
          Computes the total value of the items in the specified order item, expressing the total in the specified currency using the specified store's conversion rules.
protected  java.math.BigDecimal computeTotalInCurrency(com.ibm.commerce.rules.project.OrderResultBean orderResultBean, StoreAccessBean store, java.lang.String currencySymbol)
          Computes the total value of the items in the specified order, expressing the total in the specified currency using the specified store's conversion rules.
protected  java.math.BigDecimal convertMonetaryAmount(StoreAccessBean store, java.math.BigDecimal amount, java.lang.String fromCurrencySymbol, java.lang.String toCurrencySymbol)
          Converts a monetary amount from the specified currency to the other specified currency, according to the conversion rules of the specified store.
static void fillCollection(java.util.Collection aCollection, java.util.Enumeration anEnumeration)
          Fills the specified collection with the elements from the specified enumeration.
static void fillCollection(java.util.Collection aCollection, java.lang.Object[] anArray)
          Fills the specified collection with the elements from the specified array.
 AddressBookAccessBean getAddressBook(UserAccessBean forUser)
          Retrieves the specified user's address book.
protected  AddressBookAccessBean getAddressBookFinder()
          Provides access to an address book finder access bean.
protected  AddressAccessBean getAddressFinder()
           
protected  java.util.Set getCatalogEntriesFromPastOrders(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the set of catalog entries from the specified user's past orders.
 com.ibm.commerce.rules.project.CatEntryByCatEntryIdResultBean getCatalogEntryById(java.lang.Number catalogEntryId)
          Retrieves the catalog entry with the specified ID.
protected  java.util.Set getCatalogEntryOrderItemsByOrderId(java.lang.Number orderId)
          Given an order, this method retrieves all order items corresponding to catalog entries and nothing else.
 java.util.Set getCatalogGroupNamesForCatalogEntry(java.lang.Number catalogEntryId, java.lang.Number languageId)
          Retrieves the set of catalog group names for the specified catalog entry ID.
protected  CommandContext getCommandContext()
           
protected  java.lang.String getDefaultCurrencySymbolForStore(java.lang.Number storeId)
          Retrieves the currency symbol for the specified store's default currency, or the mall's currency, if the store cannot be found.
 com.ibm.commerce.rules.project.PrimaryAddressByMemberIdResultBean getDefaultPrimaryAddress(UserAccessBean forUser)
          Retrieves the "default" primary address for the specified user.
protected  com.ibm.commerce.rules.objects.MerchantCenterInfrastructureJDBCHelperAccessBean getEventRuleDataAccessBean()
          Provides access to an object that can perform the more complex, customized database access.
protected  java.util.Set getImmediateParentCatalogGroups(java.util.Set children)
           
protected  java.lang.Number getMallId()
          Provides access to the mall ID.
protected  MemberGroupAccessBean getMemberGroupFinder()
          Provides access to an object which can find member groups.
 java.util.Set getMemberGroupIds(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the set of IDs for the member groups to which the specified user belongs, constrained by the specified store.
protected  MemberGroupMemberAccessBean getMemberGroupMemberFinder()
          Provides access to an object which can find member group members.
 java.util.Set getMemberGroups(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the set of member groups to which the specified user belongs, constrained by the specified store.
protected  com.ibm.commerce.rules.project.OrderResultBean getMostRecentCurrentPendingOrder(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the most recent current pending order for the specified user in the specified store.
protected  com.ibm.commerce.rules.project.OrderResultBean getMostRecentPendingOrder(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the most recent pending order for the specified user in the specified store.
 java.lang.Number getNumberOfPastOrders(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the number of past orders placed by the specified user within the specified store.
protected  com.ibm.commerce.rules.project.OrderJDBCHelperAccessBean getOrderDataAccessHelper()
           
protected  java.util.Set getOrderItemsByOrderId(java.lang.Number orderId)
          Retrieves the order items from the specified order.
 java.util.Set getOrderItemsFromPastOrders(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the set of order items from the specified user's past orders.
 java.util.Set getOrderItemsFromShopcart(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the set of order items in the specified user's shopcart, constrained by the specified store.
protected  java.util.Set getParentCatalogGroups(com.ibm.commerce.rules.project.CatalogGroupResultBean catalogGroup, java.lang.Number languageId)
           
protected  java.util.Set getParentCatalogGroups(java.util.Set children, java.lang.Number languageId)
           
protected  java.util.Set getPastOrders(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the set of past orders (Set[OrderResultBean]) for the specified user in the specified store.
 AddressAccessBean getPrimaryAddress(UserAccessBean forUser)
          Retrieves the primary address for the specified user.
 AddressAccessBean getPrimaryBillingAddress(UserAccessBean forUser)
          Retrieves the primary billing address for the specified user.
 java.util.Set getRegisteredUsers()
          Retrieves the set of registered users.
 AddressAccessBean getSelfAddress(UserAccessBean forUser)
          Retrieves the user's self address, which is the "first" address (as returned from an enumeration of addresses) for the user whose "selfAddress" property is "1".
protected  com.ibm.commerce.rules.project.OrderResultBean getShopcartOrder(UserAccessBean forUser, java.lang.Number storeId)
          Retrieves the order corresponding to the specified user's shopcart in the specified store.
 StoreAccessBean getStore(java.lang.Number storeId)
          Provides access to the store for the specified ID.
 java.math.BigDecimal getTotalValueOfPastOrders(UserAccessBean forUser, java.lang.Number storeId)
          Computes the total value of the (not pending) orders made by the specified user in the specified store, which orders were made in the store's default currency.
 java.math.BigDecimal getTotalValueOfPastOrders(UserAccessBean forUser, java.lang.Number storeId, java.lang.String currencySymbol)
          Computes the total value of the (not pending) orders made by the specified user in the specified store, which orders were made in the specific currency.
 java.math.BigDecimal getTotalValueOfShopcartItems(UserAccessBean forUser, java.lang.Number storeId)
          Computes the total value of the items in the specified user's shopcart in the specified store, which orders were made in the store's default currency.
 java.math.BigDecimal getTotalValueOfShopcartItems(UserAccessBean forUser, java.lang.Number storeId, java.lang.String currencySymbol)
          Computes the total value of the items in the specified user's shopcart in the specified store, which orders were made in the specific currency.
 UserAccessBean getUserByLogonId(java.lang.String logonId)
          Retrieves the user object for the specified logon ID.
 UserAccessBean getUserByUserId(java.lang.Number userId)
          Retrieves the user object for the specified user ID.
protected  UserAccessBean getUserFinder()
          Provides access to an object that finds users.
protected  UserRegistryAccessBean getUserRegistryFinder()
          Provides access to a user registry finder access bean.
protected  void handleException(java.lang.String methodName, java.lang.Throwable aThrowable)
           
protected  void handleInvalidParameter(java.lang.String methodName, java.lang.String parameterName)
           
protected  void setCommandContext(CommandContext newCommandContext)
           
 boolean storeExists(java.lang.Number storeId)
          Answers the question, "Does a store exist with this store ID?"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

EventRuleHelperUtil

public EventRuleHelperUtil(CommandContext commandContext)
Parameters:
commandContext - The WebSphere Commerce command context, which is required for certain WebSphere Commerce-related function.
Method Detail

computeTotalInCurrency

protected java.math.BigDecimal computeTotalInCurrency(java.util.Collection orderResultBeans,
                                                      StoreAccessBean store,
                                                      java.lang.String currencySymbol)
Computes the total value of the items in the specified orders, expressing the total in the specified currency using the conversion rules from the specified store.
Parameters:
orderResultBeans - A collection of orders.
store - The store whose conversion rules to use.
currencySymbol - The symbol for desired currency.
Returns:
The total value of the items in the specified orders, expressed in the specified currency.

computeTotalInCurrency

protected java.math.BigDecimal computeTotalInCurrency(OrderItemAccessBean orderItem,
                                                      StoreAccessBean store,
                                                      java.lang.String currencySymbol)
Computes the total value of the items in the specified order item, expressing the total in the specified currency using the specified store's conversion rules. If no conversion is available or the conversion fails, then this method returns the unconverted value. If this method fails, but not the underlying conversion, then it returns 0.
Parameters:
orderItem - An order item.
store - The store whose conversion rules to use.
currencySymbol - The symbol for desired currency.
Returns:
The total value of the specified order item, expressed in the specified currency.

computeTotalInCurrency

protected java.math.BigDecimal computeTotalInCurrency(com.ibm.commerce.rules.project.OrderResultBean orderResultBean,
                                                      StoreAccessBean store,
                                                      java.lang.String currencySymbol)
Computes the total value of the items in the specified order, expressing the total in the specified currency using the specified store's conversion rules. If no conversion is available or the conversion fails, then this method returns the unconverted value. If this method fails, but not the underlying conversion, then it returns 0.
Parameters:
orderResultBean - An order.
store - The store whose conversion rules to use.
currencySymbol - The symbol for desired currency.
Returns:
The total value of the items in the specified order, expressed in the specified currency.

convertMonetaryAmount

protected java.math.BigDecimal convertMonetaryAmount(StoreAccessBean store,
                                                     java.math.BigDecimal amount,
                                                     java.lang.String fromCurrencySymbol,
                                                     java.lang.String toCurrencySymbol)
                                              throws ECSystemException
Converts a monetary amount from the specified currency to the other specified currency, according to the conversion rules of the specified store.
Parameters:
store - A store.
amount - An amount.
fromCurrencySymbol - The currency of the specified amount.
toCurrencySymbol - The desired target currency.
Returns:
The original amount converted to the specified currency.
Throws:
ECSystemException - Indicates that an exception occurred while performing the conversion.

fillCollection

public static void fillCollection(java.util.Collection aCollection,
                                  java.util.Enumeration anEnumeration)
Fills the specified collection with the elements from the specified enumeration. For simplicity, the elements in the enumeration are added to the collection in the order in which they are retrieved from the enumeration. Naturally, if the target collection is not ordered, then the order of elements in the collection is undefined. If the specified enumeration is null, then the collection remains unchanged.
Parameters:
aCollection - A collection to fill with the elements of the specified enumeration.
anEnumeration - An enumeration. If this enumeration is null, then the collection remains unchanged.
Throws:
java.lang.NullPointerException - Thrown if the target collection is null.

fillCollection

public static void fillCollection(java.util.Collection aCollection,
                                  java.lang.Object[] anArray)
Fills the specified collection with the elements from the specified array. For simplicity, the elements in the array are added to the collection in increasing order of index. Naturally, if the target collection is not ordered, then the order of elements in the collection is undefined. If the specified array is null, then the collection remains unchanged.
Parameters:
aCollection - A collection to fill with the elements of the specified array.
anArray - An array. If this array is null, then the collection remains unchanged.
Throws:
java.lang.NullPointerException - Thrown if the target collection is null.

getAddressBook

public AddressBookAccessBean getAddressBook(UserAccessBean forUser)
Retrieves the specified user's address book.
Specified by:
getAddressBook in interface WcsBusinessObjectsProxy
Parameters:
forUser - The user whose address book to retrieve.
Returns:
The specified user's address book.

getAddressBookFinder

protected AddressBookAccessBean getAddressBookFinder()
Provides access to an address book finder access bean.
Returns:
An address book finder access bean.

getAddressFinder

protected AddressAccessBean getAddressFinder()
Returns:
An object which can find addresses.

getCatalogEntriesFromPastOrders

protected java.util.Set getCatalogEntriesFromPastOrders(UserAccessBean forUser,
                                                        java.lang.Number storeId)
Retrieves the set of catalog entries from the specified user's past orders.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The set of catalog entries from the specified user's past orders.

getCatalogEntryById

public com.ibm.commerce.rules.project.CatEntryByCatEntryIdResultBean getCatalogEntryById(java.lang.Number catalogEntryId)
Retrieves the catalog entry with the specified ID.
Specified by:
getCatalogEntryById in interface WcsBusinessObjectsProxy
Parameters:
catalogEntryId - A catalog entry ID.
Returns:
The catalog entry with the specified ID.

getCatalogEntryOrderItemsByOrderId

protected java.util.Set getCatalogEntryOrderItemsByOrderId(java.lang.Number orderId)
Given an order, this method retrieves all order items corresponding to catalog entries and nothing else.
Parameters:
orderId - An order ID.
Returns:
A Set of OrderItemAccessBeans representing the order items from the specified order.

getCatalogGroupNamesForCatalogEntry

public java.util.Set getCatalogGroupNamesForCatalogEntry(java.lang.Number catalogEntryId,
                                                         java.lang.Number languageId)
Retrieves the set of catalog group names for the specified catalog entry ID.
Specified by:
getCatalogGroupNamesForCatalogEntry in interface WcsBusinessObjectsProxy
Parameters:
catalogEntryId - A catalog entry ID.
languageId - The ID of the language in which to retrieve the language-specific properties.
Returns:
The set of catalog group names for the specified catalog entry ID.

getCommandContext

protected CommandContext getCommandContext()
Returns:
com.ibm.commerce.command.CommandContext

getDefaultCurrencySymbolForStore

protected java.lang.String getDefaultCurrencySymbolForStore(java.lang.Number storeId)
                                                     throws DefaultCurrencyNotFoundException
Retrieves the currency symbol for the specified store's default currency, or the mall's currency, if the store cannot be found.
Parameters:
storeId - A store.
Returns:
The currency symbol for the specified store's default currency.

getDefaultPrimaryAddress

public com.ibm.commerce.rules.project.PrimaryAddressByMemberIdResultBean getDefaultPrimaryAddress(UserAccessBean forUser)
Retrieves the "default" primary address for the specified user. This default primary address is the primary address whose field "selfAddress" is not zero.
Specified by:
getDefaultPrimaryAddress in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
Returns:
The default primary address for the specified user.

getEventRuleDataAccessBean

protected com.ibm.commerce.rules.objects.MerchantCenterInfrastructureJDBCHelperAccessBean getEventRuleDataAccessBean()
Provides access to an object that can perform the more complex, customized database access.
Returns:
com.ibm.commerce.rules.objects.MerchantCenterInfrastructureJDBCHelperAccessBean

getImmediateParentCatalogGroups

protected java.util.Set getImmediateParentCatalogGroups(java.util.Set children)
Parameters:
children - A set of catalog groups. (Set[CatalogGroupResultBean])
Returns:
The set of catalog groups (Set[CatalogGroupResultBean]) corresponding to the union of the immediate parents of all the catalog groups in the specified set.

getMallId

protected java.lang.Number getMallId()
Provides access to the mall ID.
Returns:
The mall ID.

getMemberGroupFinder

protected MemberGroupAccessBean getMemberGroupFinder()
Provides access to an object which can find member groups.
Returns:
An object which can find member groups.

getMemberGroupIds

public java.util.Set getMemberGroupIds(UserAccessBean forUser,
                                       java.lang.Number storeId)
Retrieves the set of IDs for the member groups to which the specified user belongs, constrained by the specified store.
Specified by:
getMemberGroupIds in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The set of member groups to which the user belongs.

getMemberGroupMemberFinder

protected MemberGroupMemberAccessBean getMemberGroupMemberFinder()
Provides access to an object which can find member group members.
Returns:
An object which can find member group members.

getMemberGroups

public java.util.Set getMemberGroups(UserAccessBean forUser,
                                     java.lang.Number storeId)
Retrieves the set of member groups to which the specified user belongs, constrained by the specified store.
Specified by:
getMemberGroups in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The set of member groups to which the user belongs, which is null if either the user is invalid or the store ID is either invalid or no such store exists.

getMostRecentCurrentPendingOrder

protected com.ibm.commerce.rules.project.OrderResultBean getMostRecentCurrentPendingOrder(UserAccessBean forUser,
                                                                                          java.lang.Number storeId)
Retrieves the most recent current pending order for the specified user in the specified store. The order is "most recent" in the sense of most recently placed.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The most recent current pending order (OrderResultBean) for the specified user in the specified store.

getMostRecentPendingOrder

protected com.ibm.commerce.rules.project.OrderResultBean getMostRecentPendingOrder(UserAccessBean forUser,
                                                                                   java.lang.Number storeId)
Retrieves the most recent pending order for the specified user in the specified store. The order is "most recent" in the sense of most recently placed.

Note that this method depends on the schema. Specifically, it depends on pending orders being identified as those orders having status "P".

Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The most recent pending order (OrderResultBean) for the specified user in the specified store.

getNumberOfPastOrders

public java.lang.Number getNumberOfPastOrders(UserAccessBean forUser,
                                              java.lang.Number storeId)
Retrieves the number of past orders placed by the specified user within the specified store.
Specified by:
getNumberOfPastOrders in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The number of past orders placed by the specified user within the specified store.

getOrderDataAccessHelper

protected com.ibm.commerce.rules.project.OrderJDBCHelperAccessBean getOrderDataAccessHelper()
Returns:
An order data access helper.

getOrderItemsByOrderId

protected java.util.Set getOrderItemsByOrderId(java.lang.Number orderId)
Retrieves the order items from the specified order.
Parameters:
orderId - An order ID.
Returns:
A Set of OrderItemAccessBeans representing the order items from the specified order.

getOrderItemsFromPastOrders

public java.util.Set getOrderItemsFromPastOrders(UserAccessBean forUser,
                                                 java.lang.Number storeId)
Retrieves the set of order items from the specified user's past orders.
Specified by:
getOrderItemsFromPastOrders in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The set of order items (Set[OrderItemAccessBean]) from the specified user's past orders in the specified store.

getOrderItemsFromShopcart

public java.util.Set getOrderItemsFromShopcart(UserAccessBean forUser,
                                               java.lang.Number storeId)
Retrieves the set of order items in the specified user's shopcart, constrained by the specified store.
Specified by:
getOrderItemsFromShopcart in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The set of order items (Set[OrderItemAccessBean]) in the specified user's shopcart, constrained by the specified store.

getParentCatalogGroups

protected java.util.Set getParentCatalogGroups(com.ibm.commerce.rules.project.CatalogGroupResultBean catalogGroup,
                                               java.lang.Number languageId)
Parameters:
catalogGroup - A catalog group.
languageId - The ID of the language in which to retrieve the language-specific properties.
Returns:
The set of parent catalog groups of the specified catalog group. (Set[CatalogGroupResultBean])

getParentCatalogGroups

protected java.util.Set getParentCatalogGroups(java.util.Set children,
                                               java.lang.Number languageId)
Parameters:
children - A set of catalog groups.
languageId - The ID of the language in which retrieve the language-specific properties.
Returns:
The set of parent catalog groups corresponding to the union of the parent catalog groups of all the catalog groups in children. (Set[CatalogGroupResultBean])

getPastOrders

protected java.util.Set getPastOrders(UserAccessBean forUser,
                                      java.lang.Number storeId)
Retrieves the set of past orders (Set[OrderResultBean]) for the specified user in the specified store.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The set of past orders (Set[OrderResultBean]) for the specified user in the specified store.

getPrimaryAddress

public AddressAccessBean getPrimaryAddress(UserAccessBean forUser)
Retrieves the primary address for the specified user.
Specified by:
getPrimaryAddress in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
Returns:
The primary address for the specified user.

getPrimaryBillingAddress

public AddressAccessBean getPrimaryBillingAddress(UserAccessBean forUser)
Retrieves the primary billing address for the specified user.
Specified by:
getPrimaryBillingAddress in interface WcsBusinessObjectsProxy
Parameters:
forUser - The user for which to find the primary address.
Returns:
The primary billing address for the specified user.

getRegisteredUsers

public java.util.Set getRegisteredUsers()
Retrieves the set of registered users.
Specified by:
getRegisteredUsers in interface WcsBusinessObjectsProxy
Returns:
A set of registered users.

getSelfAddress

public AddressAccessBean getSelfAddress(UserAccessBean forUser)
                                 throws SelfAddressNotFoundException
Retrieves the user's self address, which is the "first" address (as returned from an enumeration of addresses) for the user whose "selfAddress" property is "1".
Specified by:
getSelfAddress in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
Returns:
The user's self address.
Throws:
SelfAddressNotFoundException -  

getShopcartOrder

protected com.ibm.commerce.rules.project.OrderResultBean getShopcartOrder(UserAccessBean forUser,
                                                                          java.lang.Number storeId)
Retrieves the order corresponding to the specified user's shopcart in the specified store. The shopcart order is the most recent current pending order, or, if none exist, the most recent past order.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The order corresponding to the specified user's shopcart in the specified store.

getStore

public StoreAccessBean getStore(java.lang.Number storeId)
Provides access to the store for the specified ID.
Specified by:
getStore in interface WcsBusinessObjectsProxy
Parameters:
storeId - A store ID.
Returns:
The store for the specified ID.

getTotalValueOfPastOrders

public java.math.BigDecimal getTotalValueOfPastOrders(UserAccessBean forUser,
                                                      java.lang.Number storeId)
                                               throws DefaultCurrencyNotFoundException
Computes the total value of the (not pending) orders made by the specified user in the specified store, which orders were made in the store's default currency.
Specified by:
getTotalValueOfPastOrders in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The total value of the (not pending) orders.
Throws:
DefaultCurrencyNotFoundException - Thrown to indicate that a default currency could not be found for the specified store.

getTotalValueOfPastOrders

public java.math.BigDecimal getTotalValueOfPastOrders(UserAccessBean forUser,
                                                      java.lang.Number storeId,
                                                      java.lang.String currencySymbol)
Computes the total value of the (not pending) orders made by the specified user in the specified store, which orders were made in the specific currency.
Specified by:
getTotalValueOfPastOrders in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
storeId - A store ID.
currencySymbol - The symbol of a currency in the specified store.
Returns:
The total value of the (not pending) orders.

getTotalValueOfShopcartItems

public java.math.BigDecimal getTotalValueOfShopcartItems(UserAccessBean forUser,
                                                         java.lang.Number storeId)
                                                  throws DefaultCurrencyNotFoundException,
                                                         javax.ejb.CreateException,
                                                         javax.ejb.FinderException,
                                                         javax.naming.NamingException,
                                                         java.rmi.RemoteException
Computes the total value of the items in the specified user's shopcart in the specified store, which orders were made in the store's default currency.
Specified by:
getTotalValueOfShopcartItems in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The total value of the orders.
Throws:
DefaultCurrencyNotFoundException - Indicates that the default currency was not found for the specified store.

getTotalValueOfShopcartItems

public java.math.BigDecimal getTotalValueOfShopcartItems(UserAccessBean forUser,
                                                         java.lang.Number storeId,
                                                         java.lang.String currencySymbol)
Computes the total value of the items in the specified user's shopcart in the specified store, which orders were made in the specific currency.
Specified by:
getTotalValueOfShopcartItems in interface WcsBusinessObjectsProxy
Parameters:
forUser - A user.
storeId - A store ID.
currencySymbol - The symbol of a currency in the specified store.
Returns:
The total value of the orders.

getUserByLogonId

public UserAccessBean getUserByLogonId(java.lang.String logonId)
                                throws UserNotFoundException
Retrieves the user object for the specified logon ID.
Specified by:
getUserByLogonId in interface WcsBusinessObjectsProxy
Parameters:
logonId - A user's logon ID.
Returns:
The user object for the specified logon ID.
Throws:
UserNotFoundException -  

getUserByUserId

public UserAccessBean getUserByUserId(java.lang.Number userId)
                               throws UserNotFoundException
Retrieves the user object for the specified user ID.
Specified by:
getUserByUserId in interface WcsBusinessObjectsProxy
Parameters:
userId - A user ID.
Returns:
The user object for the specified user ID.
Throws:
UserNotFoundException -  

getUserFinder

protected UserAccessBean getUserFinder()
Provides access to an object that finds users.
Returns:
An object that finds users.

getUserRegistryFinder

protected UserRegistryAccessBean getUserRegistryFinder()
Provides access to a user registry finder access bean.
Returns:
A user registry finder access bean.

handleException

protected void handleException(java.lang.String methodName,
                               java.lang.Throwable aThrowable)

handleInvalidParameter

protected void handleInvalidParameter(java.lang.String methodName,
                                      java.lang.String parameterName)

setCommandContext

protected void setCommandContext(CommandContext newCommandContext)

storeExists

public boolean storeExists(java.lang.Number storeId)
Answers the question, "Does a store exist with this store ID?"
Specified by:
storeExists in interface WcsBusinessObjectsProxy
Parameters:
storeId - A store ID, one hopes.
Returns:
Whether a store exists for the specified store ID.