public abstract class AbstractPromotionAction extends GeneratedAbstractPromotionAction
GenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationExceptionDEFAULT_INITIAL_ATTRIBUTES, GUID, MARKEDAPPLIED, PROMOTIONRESULT, PROMOTIONRESULTHANDLERLANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
AbstractPromotionAction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply()
Apply the action to the order.
|
abstract boolean |
apply(SessionContext ctx)
Apply the action to the order.
|
protected AbstractPromotionAction |
deepClone(SessionContext ctx)
Deep clone this action instance.
|
protected void |
deepCloneAttributes(SessionContext ctx,
Map values)
Called to deep clone attributes of this instance.
|
String |
getGuid(SessionContext ctx)
Get the Unique Identifier assigned to this action.
|
abstract double |
getValue(SessionContext ctx)
Get the total value of this action.
|
protected static void |
insertFirstGlobalDiscountValue(SessionContext ctx,
AbstractOrder order,
DiscountValue discountValue)
Add a global DiscountValue to the Order at the first position in the list of discounts
|
protected static void |
insertFirstOrderEntryDiscountValue(SessionContext ctx,
AbstractOrderEntry orderEntry,
DiscountValue discountValue)
Add a DiscountValue to the OrderEntry at the first position in the list of discounts
|
boolean |
isAppliedToOrder()
Test if this action is applied to the order.
|
abstract boolean |
isAppliedToOrder(SessionContext ctx)
Test if this action is applied to the order.
|
boolean |
undo()
Unapply the action from the order.
|
abstract boolean |
undo(SessionContext ctx)
Unapply the action from the order.
|
createItem, getDefaultAttributeModes, getGuid, getPromotionResult, getPromotionResult, isMarkedApplied, isMarkedApplied, isMarkedAppliedAsPrimitive, isMarkedAppliedAsPrimitive, setGuid, setGuid, setMarkedApplied, setMarkedApplied, setMarkedApplied, setMarkedApplied, setPromotionResult, setPromotionResultgetInitialProperties, getNonInitialAttributesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, readResolve, refreshRemote, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, toString, useTA, writeReplacegetImplementation, setTenantpublic String getGuid(SessionContext ctx)
getGuid in class GeneratedAbstractPromotionActionctx - The hybris contextpublic final boolean apply()
AbstractOrder.recalculate() to update the totals as this disposes
of all applied discounts and the promotions engine is unable to intercept the recalculate call to reinstate these.public abstract boolean apply(SessionContext ctx)
AbstractOrder.recalculate() to update the totals as this disposes
of all applied discounts and the promotions engine is unable to intercept the recalculate call to reinstate these.ctx - The hybris contextpublic final boolean undo()
public abstract boolean undo(SessionContext ctx)
ctx - The hybris contextpublic final boolean isAppliedToOrder()
undo() method.public abstract boolean isAppliedToOrder(SessionContext ctx)
ctx - The hybris contextpublic abstract double getValue(SessionContext ctx)
ctx - The hybris contextprotected AbstractPromotionAction deepClone(SessionContext ctx)
ctx - The hybris contextprotected void deepCloneAttributes(SessionContext ctx, Map values)
ctx - The hybris contextvalues - The map to write intoprotected static void insertFirstGlobalDiscountValue(SessionContext ctx, AbstractOrder order, DiscountValue discountValue)
ctx - The hybris contextorder - The orderdiscountValue - The discount to addprotected static void insertFirstOrderEntryDiscountValue(SessionContext ctx, AbstractOrderEntry orderEntry, DiscountValue discountValue)
ctx - The hybris contextorderEntry - The orderdiscountValue - The discount to addCopyright © 2017 SAP SE. All Rights Reserved.