com.ibm.commerce.rules.project
Interface WcsBusinessObjectsProxy

All Known Implementing Classes:
EventRuleHelperUtil

public interface WcsBusinessObjectsProxy

An interface to the WebSphere Commerce Business Object Model. Clients can use this to gain access to commonly-used business objects.


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 AddressBookAccessBean getAddressBook(UserAccessBean forUser)
          Retrieves the specified user's address book.
 com.ibm.commerce.rules.project.CatEntryByCatEntryIdResultBean getCatalogEntryById(java.lang.Number catalogEntryId)
          Retrieves the catalog entry with the specified ID.
 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.
 com.ibm.commerce.rules.project.PrimaryAddressByMemberIdResultBean getDefaultPrimaryAddress(UserAccessBean forUser)
          Retrieves the "default" primary address for the specified user.
 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.
 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.
 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.
 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.
 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".
 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.
 boolean storeExists(java.lang.Number storeId)
          Answers the question, "Does a store exist with this store ID?"
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Method Detail

getAddressBook

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

getCatalogEntryById

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

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.
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.

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.
Parameters:
forUser - A user.
Returns:
The default primary address for the specified user.

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.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The set of member groups to which the user belongs.

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.
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.

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.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The number of past orders placed by the specified user within the specified store.

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.
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.
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.

getPrimaryAddress

public AddressAccessBean getPrimaryAddress(UserAccessBean forUser)
Retrieves the primary address for the specified user.
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.
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.
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".
Parameters:
forUser - A user.
Returns:
The user's self address.

getStore

public StoreAccessBean getStore(java.lang.Number storeId)
Provides access to the store for the specified ID.
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.
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.
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.
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.
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.
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.
Parameters:
userId - A user ID.
Returns:
The user object for the specified user ID.
Throws:
UserNotFoundException -  

storeExists

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