Class PDTEnumGroupsHelper
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.order.strategies.calculation.pdt.impl.PDTEnumGroupsHelper
-
- All Implemented Interfaces:
java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class PDTEnumGroupsHelper extends AbstractBusinessService
An utility class for getting price/discount/tax enum values.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManager
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant
-
-
Constructor Summary
Constructors Constructor Description PDTEnumGroupsHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends HybrisEnumValue>
TgetEnumFromContextOrItem(ItemModel item, java.lang.String qualifier)protected <T extends HybrisEnumValue>
TgetEnumFromGroups(UserModel user, java.lang.String attribute)Tries to find enums connected with User or its User Groups.ProductDiscountGroupgetPDG(AbstractOrderEntryModel entry)Gets Products Discount Group for Order Entry.ProductDiscountGroupgetPDG(ProductModel product)Gets the Product Discount Group from the Product Model.PKgetPkFromEnum(HybrisEnumValue enumValue)Gets the PK from Hybris Enum.ProductPriceGroupgetPPG(ProductModel product)Gets the Product Price Group from the Product Model.ProductTaxGroupgetPTG(AbstractOrderEntryModel entry)Gets Products Tax Group for Order Entry.ProductTaxGroupgetPTG(ProductModel product)Gets the Product Tax Group from the Product Model.UserDiscountGroupgetUDG(AbstractOrderEntryModel entry)Gets User Discount Group for Order Entry.UserDiscountGroupgetUDG(AbstractOrderModel order)Gets User Discount Group for Order.UserDiscountGroupgetUDG(UserModel user)Gets the User Discount Group from the User Model.UserPriceGroupgetUPG(AbstractOrderEntryModel entry)Gets the UserPriceGroup from Order Entry.protected UserPriceGroupgetUPG(AbstractOrderModel order)UserPriceGroupgetUPG(UserModel user)Gets the User Price Group from the User Model.UserTaxGroupgetUTG(AbstractOrderEntryModel entry)Gets User Tax Group for Order Entry.UserTaxGroupgetUTG(AbstractOrderModel order)Gets User Tax Group for Order.UserTaxGroupgetUTG(UserModel user)Gets the User Tax Group from the User Model.voidsetTypeService(TypeService typeService)-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Method Detail
-
getPkFromEnum
public PK getPkFromEnum(HybrisEnumValue enumValue)
Gets the PK from Hybris Enum.
-
getPTG
public ProductTaxGroup getPTG(AbstractOrderEntryModel entry)
Gets Products Tax Group for Order Entry.
-
getPTG
public ProductTaxGroup getPTG(ProductModel product)
Gets the Product Tax Group from the Product Model.
-
getPPG
public ProductPriceGroup getPPG(ProductModel product)
Gets the Product Price Group from the Product Model.
-
getPDG
public ProductDiscountGroup getPDG(AbstractOrderEntryModel entry)
Gets Products Discount Group for Order Entry.
-
getPDG
public ProductDiscountGroup getPDG(ProductModel product)
Gets the Product Discount Group from the Product Model.
-
getUTG
public UserTaxGroup getUTG(AbstractOrderEntryModel entry) throws CalculationException
Gets User Tax Group for Order Entry.- Throws:
CalculationException
-
getUTG
public UserTaxGroup getUTG(AbstractOrderModel order) throws CalculationException
Gets User Tax Group for Order.- Throws:
CalculationException
-
getUTG
public UserTaxGroup getUTG(UserModel user) throws CalculationException
Gets the User Tax Group from the User Model.- Throws:
CalculationException
-
getUDG
public UserDiscountGroup getUDG(AbstractOrderEntryModel entry) throws CalculationException
Gets User Discount Group for Order Entry.- Throws:
CalculationException
-
getUDG
public UserDiscountGroup getUDG(AbstractOrderModel order) throws CalculationException
Gets User Discount Group for Order.- Throws:
CalculationException
-
getUDG
public UserDiscountGroup getUDG(UserModel user) throws CalculationException
Gets the User Discount Group from the User Model.- Throws:
CalculationException
-
getUPG
public UserPriceGroup getUPG(AbstractOrderEntryModel entry) throws CalculationException
Gets the UserPriceGroup from Order Entry.- Parameters:
entry- the order entry- Returns:
- the user price group
- Throws:
CalculationException- the calculation exception
-
getUPG
protected UserPriceGroup getUPG(AbstractOrderModel order) throws CalculationException
- Throws:
CalculationException
-
getUPG
public UserPriceGroup getUPG(UserModel user) throws CalculationException
Gets the User Price Group from the User Model.- Throws:
CalculationException
-
getEnumFromContextOrItem
protected <T extends HybrisEnumValue> T getEnumFromContextOrItem(ItemModel item, java.lang.String qualifier)
-
getEnumFromGroups
protected <T extends HybrisEnumValue> T getEnumFromGroups(UserModel user, java.lang.String attribute) throws CalculationException
Tries to find enums connected with User or its User Groups.- Throws:
CalculationException
-
setTypeService
public void setTypeService(TypeService typeService)
- Parameters:
typeService- the typeService to set
-
-