public class PriceCalculationHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.math.BigDecimal | BIG_DECIMAL_ZERO
String of big decimal "0"
|
static java.lang.String | CONFIGURATOR_BOM_XML_ATTRIBUTE_PRICELOCK
The Price attribute in the ConfiguratorBOM XML generated from Sterling Dynamic Kit Configurator.
|
static java.lang.String | CONFIGURATOR_BOM_XML_ATTRIBUTE_PRICELOCK_DEFAULTVALUE
The default price lock of the component and dynamickit in the ConfiguratorBOM XML.
|
static java.lang.String | CONFIGURATOR_BOM_XML_ATTRIBUTE_SKU
The SKU attribute in the ConfiguratorBOM XML generated from Sterling Dynamic Kit Configurator.
|
static java.lang.String | CONFIGURATOR_BOM_XML_ELEMENT_LINE_ITEM
The LineItem element name in the ConfiguratorBOM XML generated from Sterling Dynamic Kit Configurator.
|
static java.lang.String | CONFIGURATOR_BOM_XML_NODE_CONFIGURATOR_BOM |
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.Double | DOUBLE_ZERO
String of "0" for double type
|
static java.lang.String | ERRTASK_NAME
String of RetrievePriceErrorView
|
static java.lang.Integer | INTEGER_ZERO
String of "0" for integer type
|
static java.lang.Long | LONG_ZERO
String of "0" for Long type
|
static java.lang.Object | NULL
String of object NULL
|
Constructor and Description |
---|
PriceCalculationHelper()
PriceCalculationHelper constructor comment.
|
Modifier and Type | Method and Description |
---|---|
void | createPriceBusinessPolicy(java.lang.String aPriceListName, java.lang.Long aPriceListOwner, java.lang.Integer aStoreEntityId, java.lang.String aPolicyName)
Creates a price business policy.
|
void | deletePriceBusinessPolicy(java.lang.String aPriceListId, java.lang.Integer aStoreEntityId)
Deletes a price business policy.
|
java.lang.Long[] | findAllMasterCatalogPriceLists(StoreAccessBean aStoreAB)
Retrieves the price lists associated with master catalog (Fast Method).
|
java.lang.String | genMarkers(int num)
Generates parameter markers for the IN search predicate.
|
java.lang.Long[] | getAllMasterCatalogPriceLists(StoreAccessBean aStoreAB)
Retrieves the price lists associated with master catalog (Alternative Method).
|
java.util.Hashtable | getAllPolicyPriceLists(StoreAccessBean aStoreAB)
Retrieves the price list business policies.
|
java.util.Hashtable | getAllPolicyPriceProperties(StoreAccessBean aStoreAB)
Retrieves the price list business policy properties.
|
java.util.Vector | getAllStandardPriceListAccessBeans()
Retrieves the standard price list access beans.
|
java.util.Vector | getAllStandardPriceLists()
Retrieves the ids of standard price list.
|
MonetaryAmount | getDynamicKitConfigurationPriceWithPredefinedConfiguration(java.lang.String aCurrency, java.lang.Long tradingId, OrderItemAccessBean oiab, java.lang.Long dynamicKitCatalogEntryId, java.lang.Long dynamicKitPredefinedConfigurationId, MonetaryAmount predefinedConfigurationPrice, CommandContext commandContext)
Returns the cost of the dynamic kit configuration represented by the passed OrderItemAccessBean, oiab using the starting point represented by startPointOfferAccessBean.
|
MonetaryAmount | getDynamicKitPrice(java.lang.String aCurrency, CommandContext aCommandContext, java.lang.String astrConfigurationId, OrderItemAccessBean aabOrderItem)
get dynamic kit price
|
MonetaryAmount | getDynamicKitPrice(java.lang.String aCurrency, CommandContext aCommandContext, java.lang.String astrConfigurationId, OrderItemAccessBean aabOrderItem, java.util.Vector avecOrderItemComponents)
get dynamic kit price
|
MonetaryAmount | getDynamicKitPrice(java.lang.String aCurrency, CommandContext aCommandContext, java.lang.String astrConfigurationId, OrderItemAccessBean aabOrderItem, java.util.Vector avecOrderItemComponents, java.lang.Long[] tradingIds)
Calls getDynamicKitPrice(aCurrency, aCommandContext, astrConfigurationId, aabOrderItem, avecOrderItemComponents, tradingIds, true) to find the dynamic kit price using starting points.
|
MonetaryAmount | getDynamicKitPrice(java.lang.String aCurrency, CommandContext aCommandContext, java.lang.String astrConfigurationId, OrderItemAccessBean aabOrderItem, java.util.Vector avecOrderItemComponents, java.lang.Long[] tradingIds, boolean useStartingPoint, java.lang.Long dynamicKitPredefinedConfigurationId)
get dynamic kit price
|
java.lang.String | getInPredicate(java.lang.Object[] objects)
Composes the IN search predicate.
|
static PriceCalculationHelper | getInstance()
Get PriceCalculationHelper instance
|
java.lang.Long | getMemberIdFromPrcPolicyProperties(TypedProperty aparam)
Get member Id from properties retrieved from price policy
|
OfferPriceAccessBean | getNominalCost(java.lang.Long aCatEntryID, java.lang.Long aTpcID, java.lang.Integer aStoreID)
Retrieve the nominal cost in the form of OfferPriceAccessBean for the input data: i) a given catalog entry ID (mandatory), ii) the nominal cost pricelist ID (optional), iii) the store ID (mandatory).
|
java.util.List | getNominalCostOfferABs(java.lang.Long aCatEntryID, java.lang.Long aTpcID, java.lang.Integer aStoreID)
Retrieve the nominal cost in the form of OfferAccessBean for the input data: i) a given catalog entry ID (mandatory), ii) the nominal cost pricelist ID (optional), iii) the store ID (mandatory).
|
java.lang.Long | getNominalCostPriceList(java.lang.Integer aStoreID)
Retrieve the nominal cost pricelist ID for a given store (there is one and only one pricelist).
|
java.lang.String | getPolicyPriceList(java.lang.String aPolicyProperties)
Retrieves the price list associated with a policy.
|
java.lang.String | getPolicyProductSet(java.lang.String aPolicyProperties)
Retrieves the product set associated with a policy.
|
java.lang.String | getPriceListType(java.lang.String properties)
Determine the type of the pricelist based on the value of PROPERTIES attribute of a policy entity.
|
PricedDynamicKitPredefinedConfiguration | getStartingOfferAndPriceOfPredefinedConfigurationFromTradingAgreement(java.lang.Long tradingId, java.lang.Long dynamicKitCatalogEntryId, java.lang.Long dynamicKitPredefinedConfigurationId, java.lang.Double quantity, java.lang.String currency, StoreAccessBean storeAB)
Returns the starting price of a predefined configuration of a dynamic kit.
|
void | handlePriceNotFoundException(ItemPriceInfo aItemPriceInfo, java.lang.String aCurrency, java.lang.String aClassName)
Handles the price not found exception.
|
boolean | isBestPrice(QualifyingOfferInfo offerInfo, java.math.BigDecimal aPriceValue)
Compares two prices for the best.
|
boolean | isHybridPriceLock(java.lang.String configXML) |
boolean | processOfferPricesVector(QualifyingOfferInfo offerInfo, java.util.Vector offerPricesVector, java.lang.String requestedCurrency, OfferAccessBean offer, StoreAccessBean storeAB)
Process the prices for a specific offer.
|
void | setPriceListProductSetId(java.lang.String aPriceListId, java.lang.String aProductSetId)
Sets the product set id in the price list.
|
MonetaryAmount | setRoundCustomizedPrice(MonetaryAmount aPrice, StoreAccessBean aStoreAB)
Rounds up the input price.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.Object NULL
public static final java.math.BigDecimal BIG_DECIMAL_ZERO
public static final java.lang.Double DOUBLE_ZERO
public static final java.lang.Integer INTEGER_ZERO
public static final java.lang.Long LONG_ZERO
public static final java.lang.String ERRTASK_NAME
public static final java.lang.String CONFIGURATOR_BOM_XML_NODE_CONFIGURATOR_BOM
public static final java.lang.String CONFIGURATOR_BOM_XML_ELEMENT_LINE_ITEM
public static final java.lang.String CONFIGURATOR_BOM_XML_ATTRIBUTE_SKU
public static final java.lang.String CONFIGURATOR_BOM_XML_ATTRIBUTE_PRICELOCK
public static final java.lang.String CONFIGURATOR_BOM_XML_ATTRIBUTE_PRICELOCK_DEFAULTVALUE
public PriceCalculationHelper()
public void createPriceBusinessPolicy(java.lang.String aPriceListName, java.lang.Long aPriceListOwner, java.lang.Integer aStoreEntityId, java.lang.String aPolicyName) throws ECException, java.sql.SQLException
public void deletePriceBusinessPolicy(java.lang.String aPriceListId, java.lang.Integer aStoreEntityId) throws ECException
public java.lang.Long[] findAllMasterCatalogPriceLists(StoreAccessBean aStoreAB) throws ECException
public java.lang.Long[] getAllMasterCatalogPriceLists(StoreAccessBean aStoreAB) throws ECException
public java.util.Hashtable getAllPolicyPriceLists(StoreAccessBean aStoreAB) throws ECException
public java.util.Hashtable getAllPolicyPriceProperties(StoreAccessBean aStoreAB) throws ECException
public java.util.Vector getAllStandardPriceListAccessBeans() throws ECException
public java.util.Vector getAllStandardPriceLists() throws ECException
public MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency, CommandContext aCommandContext, java.lang.String astrConfigurationId, OrderItemAccessBean aabOrderItem) throws ECException
public MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency, CommandContext aCommandContext, java.lang.String astrConfigurationId, OrderItemAccessBean aabOrderItem, java.util.Vector avecOrderItemComponents) throws ECException
public MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency, CommandContext aCommandContext, java.lang.String astrConfigurationId, OrderItemAccessBean aabOrderItem, java.util.Vector avecOrderItemComponents, java.lang.Long[] tradingIds) throws ECException
public MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency, CommandContext aCommandContext, java.lang.String astrConfigurationId, OrderItemAccessBean aabOrderItem, java.util.Vector avecOrderItemComponents, java.lang.Long[] tradingIds, boolean useStartingPoint, java.lang.Long dynamicKitPredefinedConfigurationId) throws ECException
public java.lang.String getInPredicate(java.lang.Object[] objects)
public java.lang.String genMarkers(int num)
public static PriceCalculationHelper getInstance()
public java.lang.Long getMemberIdFromPrcPolicyProperties(TypedProperty aparam) throws ECException
public java.lang.String getPolicyPriceList(java.lang.String aPolicyProperties) throws ECException
public java.lang.String getPolicyProductSet(java.lang.String aPolicyProperties) throws ECException
public void handlePriceNotFoundException(ItemPriceInfo aItemPriceInfo, java.lang.String aCurrency, java.lang.String aClassName) throws ECException
public boolean isBestPrice(QualifyingOfferInfo offerInfo, java.math.BigDecimal aPriceValue)
public boolean processOfferPricesVector(QualifyingOfferInfo offerInfo, java.util.Vector offerPricesVector, java.lang.String requestedCurrency, OfferAccessBean offer, StoreAccessBean storeAB) throws ECException
public void setPriceListProductSetId(java.lang.String aPriceListId, java.lang.String aProductSetId) throws ECException
public MonetaryAmount setRoundCustomizedPrice(MonetaryAmount aPrice, StoreAccessBean aStoreAB) throws ECSystemException
public MonetaryAmount getDynamicKitConfigurationPriceWithPredefinedConfiguration(java.lang.String aCurrency, java.lang.Long tradingId, OrderItemAccessBean oiab, java.lang.Long dynamicKitCatalogEntryId, java.lang.Long dynamicKitPredefinedConfigurationId, MonetaryAmount predefinedConfigurationPrice, CommandContext commandContext) throws java.lang.Exception
public PricedDynamicKitPredefinedConfiguration getStartingOfferAndPriceOfPredefinedConfigurationFromTradingAgreement(java.lang.Long tradingId, java.lang.Long dynamicKitCatalogEntryId, java.lang.Long dynamicKitPredefinedConfigurationId, java.lang.Double quantity, java.lang.String currency, StoreAccessBean storeAB) throws ECException
public java.lang.Long getNominalCostPriceList(java.lang.Integer aStoreID) throws ECException
public java.lang.String getPriceListType(java.lang.String properties)
public java.util.List getNominalCostOfferABs(java.lang.Long aCatEntryID, java.lang.Long aTpcID, java.lang.Integer aStoreID) throws ECException
public OfferPriceAccessBean getNominalCost(java.lang.Long aCatEntryID, java.lang.Long aTpcID, java.lang.Integer aStoreID) throws ECException
public boolean isHybridPriceLock(java.lang.String configXML) throws ECApplicationException