org.opencrx.kernel.backend
Class Products
java.lang.Object
org.opencrx.kernel.backend.AbstractImpl
org.opencrx.kernel.backend.Products
public class Products
- extends AbstractImpl
|
Constructor Summary |
protected |
Products()
|
|
Method Summary |
int |
calculatePrices(AbstractPriceLevel priceLevel,
boolean testOnly,
Date includeProductsModifiedSince)
|
int |
calculatePrices(AbstractPriceLevel priceLevel,
Short processingMode,
Date includeProductsModifiedSince)
|
int |
clonePriceLevel(AbstractPriceLevel priceLevel,
Short processingMode,
Map<String,Marshaller> priceLevelMarshallers)
|
int |
clonePriceLevel(PriceLevel priceLevel,
Short processingMode,
String nameReplacementRegex,
String nameReplacementValue,
Date validFrom,
Date validTo)
|
int |
cloneProductConfigurationSet(ProductConfigurationSet from,
AbstractContractPosition to,
boolean cloneDefaultOnly,
boolean updateCurrentConfig,
User owningUser,
List<PrincipalGroup> owningGroup)
Clone ProductConfigurations stored under fromIdentity to toIdentity. |
int |
cloneProductPhasePriceLevel(ProductPhasePriceLevel priceLevel,
Short processingMode,
String nameReplacementRegex,
String nameReplacementValue,
String productPhaseKey)
|
int |
countFilteredProduct(AbstractFilterProduct productFilter)
|
int |
createInitialPrices(AbstractPriceLevel priceLevel,
Short processingMode,
Uom priceUom,
Date includeProductsCreatedSince)
|
List<ProductBasePrice> |
findPrices(Product product,
AbstractPriceLevel priceLevel,
boolean useBasedOnPriceLevel)
|
PricingRule |
findPricingRule(String name,
Segment segment,
javax.jdo.PersistenceManager pm)
|
List<AbstractPriceLevel> |
getDependentPriceLevels(AbstractPriceLevel priceLevel,
boolean recursive)
|
ProductQuery |
getFilteredProductQuery(AbstractFilterProduct productFilter,
ProductQuery query,
boolean forCounting)
|
static Products |
getInstance()
|
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<PriceListEntry> |
getPriceListEntries(AbstractPriceLevel priceLevel,
boolean applyPriceFilter)
|
Segment |
getProductSegment(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
|
boolean |
hasDependentPriceLevels(AbstractPriceLevel priceLevel)
|
PricingRule |
initPricingRule(String pricingRuleName,
String description,
String getPriceLevelScript,
javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
|
static void |
register()
|
void |
removePriceLevel(AbstractPriceLevel priceLevel,
boolean preDelete)
|
int |
removePriceLevels(AbstractPriceLevel priceLevel,
Short processingMode,
boolean preDelete)
|
int |
removePrices(AbstractPriceLevel priceLevel)
|
int |
removePrices(AbstractPriceLevel priceLevel,
Short processingMode)
|
void |
removeProduct(Product product,
boolean preDelete)
|
void |
setConfigurationType(Product product,
ProductConfigurationTypeSet configurationTypeSet)
|
void |
unsetConfigurationType(ProductConfiguration productConfiguration)
|
void |
unsetConfigurationType(ProductConfigurationSet productConfigurationSet)
|
void |
updateProduct(Product product)
|
| 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
Products
protected Products()
register
public static void register()
getInstance
public static Products getInstance()
throws ServiceException
- Throws:
ServiceException
findPricingRule
public PricingRule findPricingRule(String name,
Segment segment,
javax.jdo.PersistenceManager pm)
getProductSegment
public Segment getProductSegment(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
- Returns:
- Returns the product segment.
initPricingRule
public PricingRule initPricingRule(String pricingRuleName,
String description,
String getPriceLevelScript,
javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
cloneProductConfigurationSet
public int cloneProductConfigurationSet(ProductConfigurationSet from,
AbstractContractPosition to,
boolean cloneDefaultOnly,
boolean updateCurrentConfig,
User owningUser,
List<PrincipalGroup> owningGroup)
throws ServiceException
- Clone ProductConfigurations stored under fromIdentity to toIdentity.
- Returns:
- number of cloned configurations
- Throws:
ServiceException
setConfigurationType
public void setConfigurationType(Product product,
ProductConfigurationTypeSet configurationTypeSet)
throws ServiceException
- Throws:
ServiceException
unsetConfigurationType
public void unsetConfigurationType(ProductConfigurationSet productConfigurationSet)
throws ServiceException
- Throws:
ServiceException
unsetConfigurationType
public void unsetConfigurationType(ProductConfiguration productConfiguration)
throws ServiceException
- Throws:
ServiceException
getFilteredProductQuery
public ProductQuery getFilteredProductQuery(AbstractFilterProduct productFilter,
ProductQuery query,
boolean forCounting)
throws ServiceException
- Throws:
ServiceException
getPriceListEntries
public List<PriceListEntry> getPriceListEntries(AbstractPriceLevel priceLevel,
boolean applyPriceFilter)
throws ServiceException
- Throws:
ServiceException
findPrices
public List<ProductBasePrice> findPrices(Product product,
AbstractPriceLevel priceLevel,
boolean useBasedOnPriceLevel)
throws ServiceException
- Throws:
ServiceException
clonePriceLevel
public int clonePriceLevel(AbstractPriceLevel priceLevel,
Short processingMode,
Map<String,Marshaller> priceLevelMarshallers)
throws ServiceException
- Throws:
ServiceException
clonePriceLevel
public int clonePriceLevel(PriceLevel priceLevel,
Short processingMode,
String nameReplacementRegex,
String nameReplacementValue,
Date validFrom,
Date validTo)
throws ServiceException
- Throws:
ServiceException
cloneProductPhasePriceLevel
public int cloneProductPhasePriceLevel(ProductPhasePriceLevel priceLevel,
Short processingMode,
String nameReplacementRegex,
String nameReplacementValue,
String productPhaseKey)
throws ServiceException
- Throws:
ServiceException
getDependentPriceLevels
public List<AbstractPriceLevel> getDependentPriceLevels(AbstractPriceLevel priceLevel,
boolean recursive)
throws ServiceException
- Throws:
ServiceException
calculatePrices
public int calculatePrices(AbstractPriceLevel priceLevel,
Short processingMode,
Date includeProductsModifiedSince)
throws ServiceException
- Throws:
ServiceException
calculatePrices
public int calculatePrices(AbstractPriceLevel priceLevel,
boolean testOnly,
Date includeProductsModifiedSince)
throws ServiceException
- Throws:
ServiceException
removePrices
public int removePrices(AbstractPriceLevel priceLevel)
throws ServiceException
- Throws:
ServiceException
removePrices
public int removePrices(AbstractPriceLevel priceLevel,
Short processingMode)
throws ServiceException
- Throws:
ServiceException
removePriceLevels
public int removePriceLevels(AbstractPriceLevel priceLevel,
Short processingMode,
boolean preDelete)
throws ServiceException
- Throws:
ServiceException
createInitialPrices
public int createInitialPrices(AbstractPriceLevel priceLevel,
Short processingMode,
Uom priceUom,
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(AbstractPriceLevel priceLevel)
throws ServiceException
- Throws:
ServiceException
removePriceLevel
public void removePriceLevel(AbstractPriceLevel priceLevel,
boolean preDelete)
throws ServiceException
- Throws:
ServiceException
countFilteredProduct
public int countFilteredProduct(AbstractFilterProduct productFilter)
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)
updateProduct
public void updateProduct(Product product)
throws ServiceException
- Throws:
ServiceException
removeProduct
public void removeProduct(Product product,
boolean preDelete)
throws ServiceException
- Throws:
ServiceException
This software is published under the BSD license. Copyright © 2003-2010, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.