org.opencrx.kernel.backend
Class Products
java.lang.Object
org.opencrx.kernel.backend.Products
public class Products
- extends Object
|
Method Summary |
int |
calculatePrices(DataproviderObject_1_0 priceLevel,
boolean testOnly,
Date includeProductsModifiedSince)
|
int |
calculatePrices(Path priceLevelIdentity,
Short processingMode,
Date includeProductsModifiedSince)
|
int |
clonePriceLevel(Path priceLevelIdentity,
Short processingMode,
Map<String,Marshaller> priceLevelMarshallers)
|
int |
clonePriceLevel(Path priceLevelIdentity,
Short processingMode,
String nameReplacementRegex,
String nameReplacementValue,
Date validFrom,
Date validTo)
|
int |
cloneProductConfigurationSet(Path fromIdentity,
Path toIdentity,
boolean cloneDefaultOnly,
boolean updateCurrentConfig)
Clone ProductConfigurations stored under fromIdentity to toIdentity. |
int |
cloneProductPhasePriceLevel(Path priceLevelIdentity,
Short processingMode,
String nameReplacementRegex,
String nameReplacementValue,
String productPhaseKey)
|
int |
countFilteredProduct(Path productFilterIdentity)
|
int |
createInitialPrices(Path priceLevelIdentity,
Short processingMode,
Path priceUomIdentity,
Date includeProductsCreatedSince)
|
List |
findPrices(DataproviderObject_1_0 priceLevel,
boolean useBasedOnPriceLevel,
Path productIdentity)
|
static PricingRule |
findPricingRule(String name,
Segment segment,
javax.jdo.PersistenceManager pm)
|
Set |
getDependentPriceLevels(Path priceLevelIdentity,
List allPriceLevels)
|
static GetPriceLevelResult |
getLowestPricePriceLevel(RefPackage_1_0 rootPkg,
PricingRule pricingRule,
AbstractContract contract,
AbstractProduct product,
Uom priceUom,
BigDecimal quantity,
Date pricingDate)
|
GetPriceLevelResult |
getPriceLevel(PricingRule pricingRule,
AbstractContract contract,
AbstractProduct product,
Uom priceUom,
BigDecimal quantity,
Date pricingDate)
|
List |
getPriceListEntries(DataproviderObject_1_0 priceLevel,
boolean applyPriceFilter)
|
FilterProperty[] |
getProductFilterProperties(Path productFilterIdentity,
boolean forCounting)
|
static Segment |
getProductSegment(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
|
boolean |
hasDependentPriceLevels(Path priceLevelIdentity)
|
static PricingRule |
initPricingRule(String pricingRuleName,
String description,
String getPriceLevelScript,
javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
|
void |
removePriceLevel(Path priceLevelIdentity,
boolean checkDependencies)
|
int |
removePriceLevels(Path priceLevelIdentity,
Short processingMode)
|
int |
removePrices(Path priceLevelIdentity,
boolean removePrices)
|
int |
removePrices(Path priceLevelIdentity,
Short processingMode)
|
void |
setConfigurationType(Path productIdentity,
Path configurationTypeSetIdentity)
|
void |
unsetConfigurationType(Path bundledProdcutIdentity)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BATCHING_MODE_SIZE
public static final int BATCHING_MODE_SIZE
- See Also:
- Constant Field Values
PROCESSING_MODE_NA
public static final short PROCESSING_MODE_NA
- See Also:
- Constant Field Values
PROCESSING_MODE_TEST
public static final short PROCESSING_MODE_TEST
- See Also:
- Constant Field Values
PROCESSING_MODE_PROCESS
public static final short PROCESSING_MODE_PROCESS
- See Also:
- Constant Field Values
PROCESSING_MODE_PROCESS_INCLUDE_DEPENDENT
public static final short PROCESSING_MODE_PROCESS_INCLUDE_DEPENDENT
- See Also:
- Constant Field Values
PROCESSING_MODE_CLONE_PRICELEVEL_INCLUDE_PRICES
public static final short PROCESSING_MODE_CLONE_PRICELEVEL_INCLUDE_PRICES
- See Also:
- Constant Field Values
PROCESSING_MODE_CLONE_PRICELEVEL_NO_PRICES
public static final short PROCESSING_MODE_CLONE_PRICELEVEL_NO_PRICES
- See Also:
- Constant Field Values
STATUS_CODE_OK
public static final short STATUS_CODE_OK
- See Also:
- Constant Field Values
STATUS_CODE_ERROR
public static final short STATUS_CODE_ERROR
- See Also:
- Constant Field Values
PRICING_RULE_NAME_LOWEST_PRICE
public static final String PRICING_RULE_NAME_LOWEST_PRICE
- See Also:
- Constant Field Values
PRICING_RULE_DESCRIPTION_LOWEST_PRICE
public static final String PRICING_RULE_DESCRIPTION_LOWEST_PRICE
- See Also:
- Constant Field Values
PRICING_RULE_GET_PRICE_LEVEL_SCRIPT_LOWEST_PRICE
public static final String PRICING_RULE_GET_PRICE_LEVEL_SCRIPT_LOWEST_PRICE
- See Also:
- Constant Field Values
threadLocalPricingRules
protected static final ThreadLocal<Map<String,Class>> threadLocalPricingRules
backend
protected final Backend backend
Products
public Products(Backend backend)
findPricingRule
public static PricingRule findPricingRule(String name,
Segment segment,
javax.jdo.PersistenceManager pm)
getProductSegment
public static Segment getProductSegment(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
- Returns:
- Returns the product segment.
initPricingRule
public static PricingRule initPricingRule(String pricingRuleName,
String description,
String getPriceLevelScript,
javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
cloneProductConfigurationSet
public int cloneProductConfigurationSet(Path fromIdentity,
Path toIdentity,
boolean cloneDefaultOnly,
boolean updateCurrentConfig)
throws ServiceException
- Clone ProductConfigurations stored under fromIdentity to toIdentity.
- Returns:
- number of cloned configurations
- Throws:
ServiceException
setConfigurationType
public void setConfigurationType(Path productIdentity,
Path configurationTypeSetIdentity)
throws ServiceException
- Throws:
ServiceException
unsetConfigurationType
public void unsetConfigurationType(Path bundledProdcutIdentity)
throws ServiceException
- Throws:
ServiceException
getProductFilterProperties
public FilterProperty[] getProductFilterProperties(Path productFilterIdentity,
boolean forCounting)
throws ServiceException
- Throws:
ServiceException
getPriceListEntries
public List getPriceListEntries(DataproviderObject_1_0 priceLevel,
boolean applyPriceFilter)
throws ServiceException
- Throws:
ServiceException
findPrices
public List findPrices(DataproviderObject_1_0 priceLevel,
boolean useBasedOnPriceLevel,
Path productIdentity)
throws ServiceException
- Throws:
ServiceException
clonePriceLevel
public int clonePriceLevel(Path priceLevelIdentity,
Short processingMode,
Map<String,Marshaller> priceLevelMarshallers)
throws ServiceException
- Throws:
ServiceException
clonePriceLevel
public int clonePriceLevel(Path priceLevelIdentity,
Short processingMode,
String nameReplacementRegex,
String nameReplacementValue,
Date validFrom,
Date validTo)
throws ServiceException
- Throws:
ServiceException
cloneProductPhasePriceLevel
public int cloneProductPhasePriceLevel(Path priceLevelIdentity,
Short processingMode,
String nameReplacementRegex,
String nameReplacementValue,
String productPhaseKey)
throws ServiceException
- Throws:
ServiceException
getDependentPriceLevels
public Set getDependentPriceLevels(Path priceLevelIdentity,
List allPriceLevels)
throws ServiceException
- Throws:
ServiceException
calculatePrices
public int calculatePrices(Path priceLevelIdentity,
Short processingMode,
Date includeProductsModifiedSince)
throws ServiceException
- Throws:
ServiceException
calculatePrices
public int calculatePrices(DataproviderObject_1_0 priceLevel,
boolean testOnly,
Date includeProductsModifiedSince)
throws ServiceException
- Throws:
ServiceException
removePrices
public int removePrices(Path priceLevelIdentity,
boolean removePrices)
throws ServiceException
- Throws:
ServiceException
removePrices
public int removePrices(Path priceLevelIdentity,
Short processingMode)
throws ServiceException
- Throws:
ServiceException
removePriceLevels
public int removePriceLevels(Path priceLevelIdentity,
Short processingMode)
throws ServiceException
- Throws:
ServiceException
createInitialPrices
public int createInitialPrices(Path priceLevelIdentity,
Short processingMode,
Path priceUomIdentity,
Date includeProductsCreatedSince)
throws ServiceException
- Throws:
ServiceException
getPriceLevel
public GetPriceLevelResult getPriceLevel(PricingRule pricingRule,
AbstractContract contract,
AbstractProduct product,
Uom priceUom,
BigDecimal quantity,
Date pricingDate)
throws ServiceException
- Throws:
ServiceException
hasDependentPriceLevels
public boolean hasDependentPriceLevels(Path priceLevelIdentity)
throws ServiceException
- Throws:
ServiceException
removePriceLevel
public void removePriceLevel(Path priceLevelIdentity,
boolean checkDependencies)
throws ServiceException
- Throws:
ServiceException
countFilteredProduct
public int countFilteredProduct(Path productFilterIdentity)
throws ServiceException
- Throws:
ServiceException
getLowestPricePriceLevel
public static GetPriceLevelResult getLowestPricePriceLevel(RefPackage_1_0 rootPkg,
PricingRule pricingRule,
AbstractContract contract,
AbstractProduct product,
Uom priceUom,
BigDecimal quantity,
Date pricingDate)
This software is published under the BSD license. Copyright © 2003-2008, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.