com.ibm.commerce.rules.project
Class BlazeEventRuleHelper

java.lang.Object
  |
  +--com.ibm.commerce.rules.project.BlazeEventRuleHelper

public class BlazeEventRuleHelper
extends java.lang.Object

This class provides services which an Advisor rules project (for WebSphere Commerce) can use to obtain data within an event rule. This class provides an Advisor-specific layer on top of the EventRuleHelperUtil.

When returning objects to the Advisor rule agent, the return object must be mapped into the rule agent using the mapItem methods, except for the Advisor built in types. A Number should simply be returned as either a BigInteger or a BigDecimal, depending on whether the number has a fractional part.

Note that the default, no-argument constructor for this class is provided only to be Java bean compliant. Do not attempt to use an instance of this class until the properties commandContext and advisorObjectMapper have been set.


Field Summary
static java.lang.String COPYRIGHT
           
 
Constructor Summary
BlazeEventRuleHelper()
          Creates a default event rule helper; no configuration information is required.
BlazeEventRuleHelper(CommandContext commandContext, com.ibm.commerce.rules.project.NdAdvisorExternalObjectMapper advisorObjectMapper)
          Creates a default event rule helper; no configuration information is required.
BlazeEventRuleHelper(WcsBusinessObjectsProxy aProxy)
          Creates a default event rule helper; no configuration information is required.
 
Method Summary
protected static java.lang.String computeAdvisorDynamicArrayTypeName(java.lang.String forTypeName)
          Computes the Advisor type name for a dynamic array of items of the specified type.
protected static java.lang.String computeAdvisorFixedArrayTypeName(java.lang.String forTypeName)
          Computes the Advisor type name for a fixed array of items of the specified type.
protected static java.lang.String computeAdvisorTypeName(java.lang.Object advisorTypeObject)
          Extracts the name of the Advisor type from the specified Advisor type object.
protected  com.ibm.commerce.rules.project.NdIndexedCollection createEmptyAdvisorFixedArray(com.ibm.commerce.rules.project.NdType advisorElementType)
          Creates an empty fixed array of the specified Advisor type.
protected  java.util.Collection extractMemberGroupNames(java.util.Set memberGroups)
          Retrieves the collection of member group names from the specified set of member groups.
protected  com.blazesoft.engines.rules.NdAdvisorExternalObjectMapper getAdvisorObjectMapper()
          Provides access to the Advisor object mapper for this event rule helper.
protected  com.ibm.commerce.rules.project.CatEntryByCatEntryIdResultBean getCatalogEntryById(java.lang.Object advisorCatalogEntryTypeObject, java.math.BigInteger catalogEntryId)
          Retrieves the catalog entry with the specified ID and maps that instance into the rule agent.
 com.ibm.commerce.rules.project.CatEntryByCatEntryIdResultBean getCatalogEntryById(java.lang.Object advisorCatalogEntryTypeObject, int catalogEntryId)
          Retrieves the catalog entry with the specified ID and maps that instance into the rule agent.
 java.lang.String[] getCatalogGroupNamesForCatalogEntry(java.lang.Long catalogEntryId)
           
 java.lang.String[] getCatalogGroupNamesForCatalogEntry(java.lang.Long catalogEntryId, java.lang.Long languageId)
           
protected  CommandContext getCommandContext()
           
protected  com.ibm.commerce.rules.project.PrimaryAddressByMemberIdResultBean getDefaultPrimaryAddress(java.lang.Object advisorPrimaryAddressTypeObject, UserAccessBean forUser)
          Retrieves the "default" primary address for the specified user.
 AddressAccessBean getDefaultSelfAddress(java.lang.Object advisorAddressTypeObject, UserAccessBean forUser)
          Retrieves the default self address for the specified user and maps that address into the rule agent.
 java.lang.Long[] getMemberGroupIds(UserAccessBean forUser, int storeId)
          Retrieves the collection of IDs of the member groups to which the specified user belongs, constrained by the specified store.
 java.lang.String[] getMemberGroupNames(UserAccessBean forUser, int storeId)
          Retrieves the collection of names of member groups to which the specified user belongs, constrained by the specified store.
protected  com.ibm.commerce.rules.project.NdIndexedCollection getMemberGroups(java.lang.Object advisorMemberGroupTypeObject, UserAccessBean forUser, java.math.BigInteger storeId)
          Retrieves the collection of member groups to which the specified user belongs, constrained by the specified store, then maps that collection into the Advisor project as a fixed array of Member Group Result Beans.
 com.ibm.commerce.rules.project.NdIndexedCollection getMemberGroups(java.lang.Object advisorMemberGroupTypeObject, UserAccessBean forUser, int storeId)
          Retrieves the collection of member groups to which the specified user belongs, constrained by the specified store, then maps that collection into the Advisor project as a fixed array of Member Group Result Beans.
protected  java.math.BigInteger getNumberOfPastOrders(UserAccessBean forUser, java.math.BigInteger storeId)
          Provides access to the number of past orders that the specified user has in the specified store.
 int getNumberOfPastOrders(UserAccessBean forUser, int storeId)
          Provides access to the number of past orders that the specified user has in the specified store.
protected  com.ibm.commerce.rules.project.NdModifiableIndexedCollection getOrderItemsFromPastOrders(java.lang.Object advisorOrderItemTypeObject, UserAccessBean forUser, java.math.BigInteger storeId)
          Retrieves the collection of order items from the specified user's past orders.
 com.ibm.commerce.rules.project.NdModifiableIndexedCollection getOrderItemsFromPastOrders(java.lang.Object advisorOrderItemTypeObject, UserAccessBean forUser, int storeId)
          Retrieves the set of order items (Set[OrderItemAccessBean]) from the specified user's past orders.
 com.ibm.commerce.rules.project.NdModifiableIndexedCollection getOrderItemsFromShopcart(java.lang.Object advisorOrderItemTypeObject, UserAccessBean forUser, int storeId)
          Retrieves the set of order items (Set[OrderItemAccessBean]) in the specified user's shopcart, constrained by the specified store.
 StoreAccessBean getStore(java.lang.Integer storeId)
          Retrieves the store corresponding to the specified store ID, or null if no such store exists.
protected  java.math.BigDecimal getTotalValueOfPastOrders(UserAccessBean forUser, java.math.BigInteger 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 getTotalValueOfPastOrders(UserAccessBean forUser, int 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, int 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, int storeId)
          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.
 java.math.BigDecimal getTotalValueOfShopcartItems(UserAccessBean forUser, int 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.Object advisorUserTypeObject, java.lang.String logonId)
          Retrieves the user object for the specified logon ID.
protected  UserAccessBean getUserByUserId(java.lang.Object advisorUserTypeObject, java.math.BigInteger userId)
          Retrieves the user object for the specified user ID.
 UserAccessBean getUserByUserId(java.lang.Object advisorUserTypeObject, int userId)
          Retrieves the user object for the specified user ID.
 DemographicsAccessBean getUserDemographics(java.lang.Object advisorUserDemographicsTypeObject, UserAccessBean forUser)
          Provides access to the specified user's demographics.
 UserProfileAccessBean getUserProfile(java.lang.Object advisorUserProfileTypeObject, UserAccessBean forUser)
          Provides access to the specified user's profile.
protected  WcsBusinessObjectsProxy getUtil()
          Provides access to the helper utility object for this helper.
protected  void handleException(java.lang.String methodName, java.lang.Throwable aThrowable)
           
protected  void handleInvalidParameter(java.lang.String methodName, java.lang.String parameterName)
           
protected  com.ibm.commerce.rules.project.NdModifiableIndexedCollection mapCollectionIntoRuleAgentAsAdvisorDynamicArray(java.util.Collection aCollection, com.ibm.commerce.rules.project.NdType advisorElementType)
          Maps the items from the specified collection into the specified rule agent, using the item type as required, returning the resulting Advisor-based (dynamic) array object.
protected  com.ibm.commerce.rules.project.NdIndexedCollection mapCollectionIntoRuleAgentAsAdvisorFixedArray(java.util.Collection aCollection, com.ibm.commerce.rules.project.NdType advisorElementType)
          Maps the items from the specified collection into the specified rule agent, using the item type as required, returning the resulting Advisor-based fixed array object.
protected  com.ibm.commerce.rules.project.NdModifiableIndexedCollection mapEnumerationIntoRuleAgentAsAdvisorDynamicArray(java.util.Enumeration anEnumeration, com.ibm.commerce.rules.project.NdType advisorElementType)
          Maps the items from the specified enumeration into the specified rule agent, using the item type as required, returning the resulting Advisor-based dynamic array object.
protected  com.ibm.commerce.rules.project.NdIndexedCollection mapEnumerationIntoRuleAgentAsAdvisorFixedArray(java.util.Enumeration anEnumeration, com.ibm.commerce.rules.project.NdType advisorElementType)
          Maps the items from the specified enumeration into the specified rule agent, using the item type as required, returning the resulting Advisor-based fixed array object.
protected  void mapItemIntoRuleAgent(java.lang.String advisorClassName, java.lang.Object toMap)
          Maps a single instance of the class advisorClassName into the Advisor project belonging to the specified rule agent.
 void setAdvisorObjectMapper(com.blazesoft.engines.rules.NdAdvisorExternalObjectMapper newAdvisorObjectMapper)
          Changes the property advisorObjectMapper — designed to be called from within an Advisor project.
 void setCommandContext(CommandContext newCommandContext)
          Changes the property commandContext.
 java.lang.Boolean storeExists(java.math.BigInteger storeId)
          Answers the question, "Does a store exist for this store ID?"
 java.lang.Boolean storeExists(int storeId)
          Answers the question, "Does a store exist for 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

BlazeEventRuleHelper

public BlazeEventRuleHelper()
Creates a default event rule helper; no configuration information is required.

BlazeEventRuleHelper

public BlazeEventRuleHelper(CommandContext commandContext,
                            com.ibm.commerce.rules.project.NdAdvisorExternalObjectMapper advisorObjectMapper)
Creates a default event rule helper; no configuration information is required.
Parameters:
commandContext - A command context that this event rule helper can use to do its work.
advisorObjectMapper - An object mapper that this event rule helper can use to map instances back into the Advisor project.

BlazeEventRuleHelper

public BlazeEventRuleHelper(WcsBusinessObjectsProxy aProxy)
Creates a default event rule helper; no configuration information is required.
Method Detail

computeAdvisorDynamicArrayTypeName

protected static java.lang.String computeAdvisorDynamicArrayTypeName(java.lang.String forTypeName)
Computes the Advisor type name for a dynamic array of items of the specified type.
Parameters:
forTypeName - The type name of the items in the collection.
Returns:
The Advisor type name for a dynamic array of items of the specified type.

computeAdvisorFixedArrayTypeName

protected static java.lang.String computeAdvisorFixedArrayTypeName(java.lang.String forTypeName)
Computes the Advisor type name for a fixed array of items of the specified type.
Parameters:
forTypeName - The type name of the items in the collection.
Returns:
The Advisor type name for a fixed array of items of the specified type.

computeAdvisorTypeName

protected static java.lang.String computeAdvisorTypeName(java.lang.Object advisorTypeObject)
                                                  throws java.lang.ClassCastException
Extracts the name of the Advisor type from the specified Advisor type object. We require this workaround until we can find out why it is impossible to receive the parameter as an NdType directly.
Parameters:
advisorTypeObject - An object representing an Advisor NdType.
Returns:
The name of the Advisor type from the specified Advisor type object.
Throws:
java.lang.ClassCastException - Thrown if the specified parameter is not an NdType.

createEmptyAdvisorFixedArray

protected com.ibm.commerce.rules.project.NdIndexedCollection createEmptyAdvisorFixedArray(com.ibm.commerce.rules.project.NdType advisorElementType)
Creates an empty fixed array of the specified Advisor type.
Parameters:
advisorElementType - The Advisor-based type of an item.
Returns:
An empty fixed array of the specified Advisor type.

extractMemberGroupNames

protected java.util.Collection extractMemberGroupNames(java.util.Set memberGroups)
Retrieves the collection of member group names from the specified set of member groups. If an exception occurs while retrieving a member group name, that name is not added to the collection.
Parameters:
memberGroups - java.util.Set
Returns:
A collection of member group names corresponding to the specific member groups.

getAdvisorObjectMapper

protected com.blazesoft.engines.rules.NdAdvisorExternalObjectMapper getAdvisorObjectMapper()
Provides access to the Advisor object mapper for this event rule helper.
Returns:
The Advisor object mapper for this event rule helper.

getCatalogEntryById

protected com.ibm.commerce.rules.project.CatEntryByCatEntryIdResultBean getCatalogEntryById(java.lang.Object advisorCatalogEntryTypeObject,
                                                                                            java.math.BigInteger catalogEntryId)
Retrieves the catalog entry with the specified ID and maps that instance into the rule agent.
Parameters:
advisorCatalogEntryTypeObject - The Advisor-based catalog entry type.
catalogEntryId - A catalog entry ID.
Returns:
The catalog entry with the specified ID.

getCatalogEntryById

public com.ibm.commerce.rules.project.CatEntryByCatEntryIdResultBean getCatalogEntryById(java.lang.Object advisorCatalogEntryTypeObject,
                                                                                         int catalogEntryId)
Retrieves the catalog entry with the specified ID and maps that instance into the rule agent.
Parameters:
advisorCatalogEntryTypeObject - The Advisor-based catalog entry type.
catalogEntryId - A catalog entry ID.
Returns:
The catalog entry with the specified ID.

getCatalogGroupNamesForCatalogEntry

public java.lang.String[] getCatalogGroupNamesForCatalogEntry(java.lang.Long catalogEntryId)
Parameters:
catalogEntryId - The ID of a catalog entry.
Returns:
An array of strings representing the names of all the catalog groups to which the specified catalog entry belongs. The names are in the store's default language.

getCatalogGroupNamesForCatalogEntry

public java.lang.String[] getCatalogGroupNamesForCatalogEntry(java.lang.Long catalogEntryId,
                                                              java.lang.Long languageId)
Parameters:
catalogEntryId - The ID of a catalog entry.
languageId - The ID of the language of the name to return.
Returns:
An array of strings representing the names of all the catalog groups to which the specified catalog entry belongs. The names are in the specified language.

getCommandContext

protected CommandContext getCommandContext()
Returns:
The command context.

getDefaultPrimaryAddress

protected com.ibm.commerce.rules.project.PrimaryAddressByMemberIdResultBean getDefaultPrimaryAddress(java.lang.Object advisorPrimaryAddressTypeObject,
                                                                                                     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:
advisorPrimaryAddressTypeObject - The Advisor class to which to map the result.
forUser - A user.
Returns:
The default primary address for the specified user.

getDefaultSelfAddress

public AddressAccessBean getDefaultSelfAddress(java.lang.Object advisorAddressTypeObject,
                                               UserAccessBean forUser)
                                        throws com.blazesoft.util.NdValueException
Retrieves the default self address for the specified user and maps that address into the rule agent.
Parameters:
advisorAddressTypeObject - The Advisor-based address type.
forUser - A user.
Returns:
The primary address for the specified user.

getMemberGroupIds

public java.lang.Long[] getMemberGroupIds(UserAccessBean forUser,
                                          int storeId)
Retrieves the collection of IDs of the member groups to which the specified user belongs, constrained by the specified store. The mapping is done automatically in the rule agent.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The IDs of the member groups to which the specified user belongs, constrained by the specified store, or an empty array if something went wrong.

getMemberGroupNames

public java.lang.String[] getMemberGroupNames(UserAccessBean forUser,
                                              int storeId)
Retrieves the collection of names of member groups to which the specified user belongs, constrained by the specified store. Mapping into the rule agent occurs automatically.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
An array of member group names (String[]).

getMemberGroups

protected com.ibm.commerce.rules.project.NdIndexedCollection getMemberGroups(java.lang.Object advisorMemberGroupTypeObject,
                                                                             UserAccessBean forUser,
                                                                             java.math.BigInteger storeId)
Retrieves the collection of member groups to which the specified user belongs, constrained by the specified store, then maps that collection into the Advisor project as a fixed array of Member Group Result Beans. This method will only return null under the following conditions:
  1. advisorMemberGroupType is not of type NdType.
  2. Creating an empty fixed array of category name Advisor classes fails.
Parameters:
advisorMemberGroupTypeObject - The Advisor-based member group type.
forUser - A user.
storeId - A store ID.
Returns:
A member group to which the specified user belongs, constrained by the specified store.

getMemberGroups

public com.ibm.commerce.rules.project.NdIndexedCollection getMemberGroups(java.lang.Object advisorMemberGroupTypeObject,
                                                                          UserAccessBean forUser,
                                                                          int storeId)
Retrieves the collection of member groups to which the specified user belongs, constrained by the specified store, then maps that collection into the Advisor project as a fixed array of Member Group Result Beans. This method will only return null under the following conditions:
  1. advisorMemberGroupType is not of type NdType.
  2. Creating an empty fixed array of category name Advisor classes fails.
Parameters:
advisorMemberGroupTypeObject - The Advisor-based member group type.
forUser - A user.
storeId - A store ID.
Returns:
A member group to which the specified user belongs, constrained by the specified store.

getNumberOfPastOrders

protected java.math.BigInteger getNumberOfPastOrders(UserAccessBean forUser,
                                                     java.math.BigInteger storeId)
Provides access to the number of past orders that the specified user has in the specified store.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The number of past orders that the specified user has in the specified store.

getNumberOfPastOrders

public int getNumberOfPastOrders(UserAccessBean forUser,
                                 int storeId)
Provides access to the number of past orders that the specified user has in the specified store.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The number of past orders that the specified user has in the specified store.

getOrderItemsFromPastOrders

protected com.ibm.commerce.rules.project.NdModifiableIndexedCollection getOrderItemsFromPastOrders(java.lang.Object advisorOrderItemTypeObject,
                                                                                                   UserAccessBean forUser,
                                                                                                   java.math.BigInteger storeId)
Retrieves the collection of order items from the specified user's past orders.
Parameters:
advisorOrderItemTypeObject - The Advisor-based order item type.
forUser - A user.
storeId - A store ID.
Returns:
The collection of order items from the specified user's past orders.

getOrderItemsFromPastOrders

public com.ibm.commerce.rules.project.NdModifiableIndexedCollection getOrderItemsFromPastOrders(java.lang.Object advisorOrderItemTypeObject,
                                                                                                UserAccessBean forUser,
                                                                                                int storeId)
Retrieves the set of order items (Set[OrderItemAccessBean]) from the specified user's past orders.
Parameters:
advisorOrderItemTypeObject - The Advisor-based order item type. (OrderItemAccessBean)
forUser - A user.
storeId - A store ID.
Returns:
The set of order items (Set[OrderItemAccessBean]) from the specified user's past orders.

getOrderItemsFromShopcart

public com.ibm.commerce.rules.project.NdModifiableIndexedCollection getOrderItemsFromShopcart(java.lang.Object advisorOrderItemTypeObject,
                                                                                              UserAccessBean forUser,
                                                                                              int storeId)
Retrieves the set of order items (Set[OrderItemAccessBean]) in the specified user's shopcart, constrained by the specified store.
Parameters:
advisorOrderItemTypeObject - The Advisor-based type for an order item. (OrderItemAccessBean)
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.

getStore

public StoreAccessBean getStore(java.lang.Integer storeId)
Retrieves the store corresponding to the specified store ID, or null if no such store exists.
Parameters:
storeId - A store ID.
Returns:
The store corresponding to the specified store ID.

getTotalValueOfPastOrders

protected java.math.BigDecimal getTotalValueOfPastOrders(UserAccessBean forUser,
                                                         java.math.BigInteger 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.

getTotalValueOfPastOrders

public java.math.BigDecimal getTotalValueOfPastOrders(UserAccessBean forUser,
                                                      int 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.
Parameters:
forUser - A user.
storeId - A store ID.
Returns:
The total value of the (not pending) orders.

getTotalValueOfPastOrders

public java.math.BigDecimal getTotalValueOfPastOrders(UserAccessBean forUser,
                                                      int 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,
                                                         int storeId)
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.
Returns:
The total value of the orders.

getTotalValueOfShopcartItems

public java.math.BigDecimal getTotalValueOfShopcartItems(UserAccessBean forUser,
                                                         int 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.Object advisorUserTypeObject,
                                       java.lang.String logonId)
Retrieves the user object for the specified logon ID.
Parameters:
advisorUserTypeObject - The Advisor type User to which the result will be mapped.
logonId - A user's logon ID.
Returns:
The user object for the specified logon ID.

getUserByUserId

protected UserAccessBean getUserByUserId(java.lang.Object advisorUserTypeObject,
                                         java.math.BigInteger userId)
Retrieves the user object for the specified user ID.
Parameters:
advisorUserTypeObject - The Advisor-based type for User.
userId - A user ID.
Returns:
The user object for the specified user ID.

getUserByUserId

public UserAccessBean getUserByUserId(java.lang.Object advisorUserTypeObject,
                                      int userId)
Retrieves the user object for the specified user ID.
Parameters:
advisorUserTypeObject - The Advisor-based type for User.
userId - A user ID.
Returns:
The user object for the specified user ID.

getUserDemographics

public DemographicsAccessBean getUserDemographics(java.lang.Object advisorUserDemographicsTypeObject,
                                                  UserAccessBean forUser)
Provides access to the specified user's demographics.
Parameters:
advisorUserDemographicsTypeObject - The Advisor class to which to map the result.
forUser - A user.
Returns:
The specified user's demographics.

getUserProfile

public UserProfileAccessBean getUserProfile(java.lang.Object advisorUserProfileTypeObject,
                                            UserAccessBean forUser)
Provides access to the specified user's profile.
Parameters:
advisorUserProfileTypeObject - The Advisor class to which to map the result.
forUser - A user.
Returns:
The specified user's profile.

getUtil

protected WcsBusinessObjectsProxy getUtil()
Provides access to the helper utility object for this helper.
Returns:
A helper utility object.

handleException

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

handleInvalidParameter

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

mapCollectionIntoRuleAgentAsAdvisorDynamicArray

protected com.ibm.commerce.rules.project.NdModifiableIndexedCollection mapCollectionIntoRuleAgentAsAdvisorDynamicArray(java.util.Collection aCollection,
                                                                                                                       com.ibm.commerce.rules.project.NdType advisorElementType)
Maps the items from the specified collection into the specified rule agent, using the item type as required, returning the resulting Advisor-based (dynamic) array object. (Currently NdModifiableIndexedCollection.)
Parameters:
aCollection - A collection of objects to map into the rule agent as an Advisor-based collection.
advisorElementType - The Advisor type for each element in the collection.
Returns:
The Advisor-based collection.

mapCollectionIntoRuleAgentAsAdvisorFixedArray

protected com.ibm.commerce.rules.project.NdIndexedCollection mapCollectionIntoRuleAgentAsAdvisorFixedArray(java.util.Collection aCollection,
                                                                                                           com.ibm.commerce.rules.project.NdType advisorElementType)
Maps the items from the specified collection into the specified rule agent, using the item type as required, returning the resulting Advisor-based fixed array object. (Currently NdIndexedCollection.)
Parameters:
aCollection - A collection of objects to map into the rule agent as an Advisor-based collection.
advisorElementType - The Advisor type for each element in the collection.
Returns:
The Advisor-based collection.

mapEnumerationIntoRuleAgentAsAdvisorDynamicArray

protected com.ibm.commerce.rules.project.NdModifiableIndexedCollection mapEnumerationIntoRuleAgentAsAdvisorDynamicArray(java.util.Enumeration anEnumeration,
                                                                                                                        com.ibm.commerce.rules.project.NdType advisorElementType)
Maps the items from the specified enumeration into the specified rule agent, using the item type as required, returning the resulting Advisor-based dynamic array object.
Parameters:
anEnumeration - An enumeration of objects to map into the rule agent as a dynamic array.
advisorElementType - The Advisor type for each element in the collection.
Returns:
The Advisor-based collection.

mapEnumerationIntoRuleAgentAsAdvisorFixedArray

protected com.ibm.commerce.rules.project.NdIndexedCollection mapEnumerationIntoRuleAgentAsAdvisorFixedArray(java.util.Enumeration anEnumeration,
                                                                                                            com.ibm.commerce.rules.project.NdType advisorElementType)
Maps the items from the specified enumeration into the specified rule agent, using the item type as required, returning the resulting Advisor-based fixed array object.
Parameters:
anEnumeration - An enumeration of objects to map into the rule agent as a fixed array.
advisorElementType - The Advisor type for each element in the collection.
Returns:
The Advisor-based collection.

mapItemIntoRuleAgent

protected void mapItemIntoRuleAgent(java.lang.String advisorClassName,
                                    java.lang.Object toMap)
Maps a single instance of the class advisorClassName into the Advisor project belonging to the specified rule agent.
Parameters:
advisorClassName - The Advisor class name of the object to map.
toMap - The object to map.

setAdvisorObjectMapper

public void setAdvisorObjectMapper(com.blazesoft.engines.rules.NdAdvisorExternalObjectMapper newAdvisorObjectMapper)
Changes the property advisorObjectMapper — designed to be called from within an Advisor project.
Parameters:
newAdvisorObjectMapper -  

setCommandContext

public void setCommandContext(CommandContext newCommandContext)
Changes the property commandContext.
Parameters:
newCommandContext -  

storeExists

public java.lang.Boolean storeExists(java.math.BigInteger storeId)
Answers the question, "Does a store exist for this store ID?"
Parameters:
storeId - A store ID.
Returns:
If the specified store ID corresponds to an existing store, then true; otherwise false.

storeExists

public java.lang.Boolean storeExists(int storeId)
Answers the question, "Does a store exist for this store ID?"
Parameters:
storeId - A store ID.
Returns:
If the specified store ID corresponds to an existing store, then true; otherwise false.