Class AbstractPermissionEvaluationStrategy<P extends B2BPermissionModel>
- java.lang.Object
-
- de.hybris.platform.b2b.strategies.impl.AbstractEvaluationStrategy<P>
-
- de.hybris.platform.b2b.strategies.impl.AbstractPermissionEvaluationStrategy<P>
-
- Direct Known Subclasses:
AbstractB2BOrderThresholdPermissionEvaluationStrategy
,B2B2POEPermissionEvaluationStrategy
,DefaultB2BBudgetExceededEvaluationStrategy
public abstract class AbstractPermissionEvaluationStrategy<P extends B2BPermissionModel> extends AbstractEvaluationStrategy<P>
Abstract evaluation strategy which provides methods helpful to all permission evaluations strategies.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Double
NOLIMIT
-
Constructor Summary
Constructors Constructor Description AbstractPermissionEvaluationStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.util.Set<P>
getActivePermissions(java.util.Set<P> permissionSet)
protected java.math.BigDecimal
getOrderEntryTotal(AbstractOrderEntryModel entry)
protected java.math.BigDecimal
getOrderTotal(AbstractOrderModel order)
protected java.math.BigDecimal
getOrderTotals(java.util.List<OrderModel> orders)
java.util.Set<P>
getPermissions(B2BCustomerModel customer)
Deprecated.Since 4.4.abstract java.lang.Class<? extends B2BPermissionModel>
getPermissionType()
protected java.math.BigDecimal
getTotalOfEntriesWithCostCenter(B2BCostCenterModel costCenter, java.util.List<AbstractOrderEntryModel> entries)
protected java.math.BigDecimal
getTotalTax(AbstractOrderEntryModel orderEntry)
java.util.Set<P>
getTypesToEvaluate(B2BCustomerModel user, AbstractOrderModel order)
protected java.math.BigDecimal
toMoney(java.lang.Double amt)
-
Methods inherited from class de.hybris.platform.b2b.strategies.impl.AbstractEvaluationStrategy
getModelService, getTypeService, setModelService, setTypeService
-
-
-
-
Method Detail
-
getPermissions
@Deprecated(since="4.4") public java.util.Set<P> getPermissions(B2BCustomerModel customer)
Deprecated.Builds a list of permissions associated to aB2BCustomerModel
by collections associated permissions formB2BCustomerModel.getPermissionGroups()
and mB2BCustomerModel.getPermissions()
- Parameters:
customer
- AB2BCustomerModel
who placed a b2b order- Returns:
- A Collection of permissions.
-
getTypesToEvaluate
public java.util.Set<P> getTypesToEvaluate(B2BCustomerModel user, AbstractOrderModel order)
- Specified by:
getTypesToEvaluate
in classAbstractEvaluationStrategy<P extends B2BPermissionModel>
-
getActivePermissions
protected java.util.Set<P> getActivePermissions(java.util.Set<P> permissionSet)
-
getPermissionType
public abstract java.lang.Class<? extends B2BPermissionModel> getPermissionType()
-
getOrderTotal
protected java.math.BigDecimal getOrderTotal(AbstractOrderModel order)
-
getOrderEntryTotal
protected java.math.BigDecimal getOrderEntryTotal(AbstractOrderEntryModel entry)
-
getOrderTotals
protected java.math.BigDecimal getOrderTotals(java.util.List<OrderModel> orders)
-
getTotalTax
protected java.math.BigDecimal getTotalTax(AbstractOrderEntryModel orderEntry)
-
getTotalOfEntriesWithCostCenter
protected java.math.BigDecimal getTotalOfEntriesWithCostCenter(B2BCostCenterModel costCenter, java.util.List<AbstractOrderEntryModel> entries)
-
toMoney
protected java.math.BigDecimal toMoney(java.lang.Double amt)
-
-