public class ZoneDeliveryMode extends GeneratedZoneDeliveryMode
GenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROPERTY_NAME
Deprecated.
since ages
|
DEFAULT_INITIAL_ATTRIBUTES, NET, PROPERTYNAME, VALUES, VALUESHANDLERACTIVE, CODE, DESCRIPTION, NAME, SUPPORTEDPAYMENTMODES, SUPPORTEDPAYMENTMODESINTERNALLANGUAGE_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 |
|---|
ZoneDeliveryMode() |
| Modifier and Type | Method and Description |
|---|---|
ZoneDeliveryModeValue |
addNewDeliveryModeValue(Zone zone,
Currency curr,
double minimum,
double value)
Deprecated.
since ages - use
setCost(Currency, double, double, Zone) directly |
protected Item |
createItem(SessionContext ctx,
ComposedType type,
Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.
|
protected ZoneDeliveryModeValue |
createValue(Zone zone,
double value,
Currency currency,
double min) |
protected java.util.Map<Country,java.util.Set<Zone>> |
getAmbigousZones(java.util.Set<Zone> zones) |
protected double |
getCalculationBaseValue(SessionContext ctx,
AbstractOrder order,
java.lang.String propName) |
PriceValue |
getCost(SessionContext ctx,
AbstractOrder order)
Deprecated.
de.hybris.platform.order.strategies.calculation.FindDeliveryCostStrategy.getDeliveryCost(AbstractOrderModel)
when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation
(prices, tax & discounts) processing strategy. |
java.util.Collection<Currency> |
getCurrencies(Zone zone)
Returns all currencies for which values are defined in this delivery mode.
|
java.util.Collection<ZoneDeliveryModeValue> |
getDeliveryModeValues()
Deprecated.
since ages - use
GeneratedZoneDeliveryMode.getValues() directly |
ZoneDeliveryModeValue |
getValue(Zone zone,
Currency currency,
double min)
Finds a specific value for a given zone, currency and minimum.
|
java.util.Map<java.lang.Double,java.lang.Double> |
getValues(Currency curr,
Zone zone)
Method getValues
|
java.util.Collection<Zone> |
getZones()
Returns all zones for which price values are defined in this delivery mode.
|
boolean |
isModeUsingPrice()
Tells whether or not this mode is using the order subtotal as calculation base.
|
boolean |
isZoneAllowed(Zone toCheck)
Tells whether or not a zone is allowed to be used for adding new values to this delivery mode.
|
protected java.lang.Double |
parseItemProperty(SessionContext ctx,
Item item,
java.lang.String propertyName) |
boolean |
removeCost(Currency curr,
double min,
Zone zone)
Method removeCost
|
ZoneDeliveryModeValue |
setCost(Currency curr,
double min,
double value,
Zone zone)
Method setCost
|
void |
setModeIsUsingPrice()
Convenience method for setting the special price property name.
|
void |
setPropertyName(SessionContext ctx,
java.lang.String name)
Generated method - Setter of the
ZoneDeliveryMode.propertyName attribute. |
addToValues, addToValues, getDefaultAttributeModes, getPropertyName, getPropertyName, getValues, getValues, isNet, isNet, isNetAsPrimitive, isNetAsPrimitive, removeFromValues, removeFromValues, setNet, setNet, setNet, setNet, setPropertyName, setValues, setValuesaddSupportedPaymentMode, checkRemovable, getAllDescriptions, getAllNames, getCost, getSupportedPaymentModes, isSupportedPaymentMode, removeSupportedPaymentMode, setAllDescriptions, setAllNames, setCode, setCode, setSupportedPaymentModesgetAllDescription, getAllDescription, getAllName, getAllName, getCode, getCode, getDescription, getDescription, getName, getName, getSupportedPaymentModes, isActive, isActive, isActiveAsPrimitive, isActiveAsPrimitive, setActive, setActive, setActive, setActive, setAllDescription, setAllDescription, setAllName, setAllName, setDescription, setDescription, setName, setName, setSupportedPaymentModesgetInitialProperties, getNonInitialAttributesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getImplementation, 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, 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, isMarkModifiedDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, 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, writeReplacesetTenant@Deprecated public static final java.lang.String PROPERTY_NAME
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
ItemComposedType.newInstance(Map).
In case this method uses any of the attribute values during creation it is required to override
Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
Sn example:
public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
// here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
super.getNonInitialAttributes( ctx, allAttributes );
// remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
createItem in class DeliveryModectx - the current session context which this item is created withintype - the actual item type ( since subtypes may not provide a own jalo class this may be different from the
type which this method was implemented for )JaloBusinessException - indicates an error during creation - any changes will be rollbackedprotected ZoneDeliveryModeValue createValue(Zone zone, double value, Currency currency, double min) throws JaloDeliveryModeException
JaloDeliveryModeExceptionpublic void setPropertyName(SessionContext ctx, java.lang.String name)
GeneratedZoneDeliveryModeZoneDeliveryMode.propertyName attribute.setPropertyName in class GeneratedZoneDeliveryModename - the propertyNamepublic void setModeIsUsingPrice()
public boolean isModeUsingPrice()
public ZoneDeliveryModeValue setCost(Currency curr, double min, double value, Zone zone) throws JaloDeliveryModeException
JaloDeliveryModeExceptionpublic boolean removeCost(Currency curr, double min, Zone zone) throws JaloDeliveryModeException
JaloDeliveryModeExceptionpublic java.util.Collection<Zone> getZones()
public java.util.Collection<Currency> getCurrencies(Zone zone) throws JaloDeliveryModeException
JaloDeliveryModeExceptionpublic java.util.Map<java.lang.Double,java.lang.Double> getValues(Currency curr, Zone zone) throws JaloDeliveryModeException
JaloDeliveryModeExceptionpublic ZoneDeliveryModeValue getValue(Zone zone, Currency currency, double min)
@Deprecated public PriceValue getCost(SessionContext ctx, AbstractOrder order) throws JaloDeliveryModeException
de.hybris.platform.order.strategies.calculation.FindDeliveryCostStrategy.getDeliveryCost(AbstractOrderModel)
when the Hybris Platform is configured to use the service-layer based (the 'pdt.calculation.mode' is set to the 'sl' value) cart calculation
(prices, tax & discounts) processing strategy.DeliveryModeThis default implementation always returns 0 costs. each subtype may override this method to implement its own cost model.
getCost in class DeliveryModectx - session contextorder - the order to calculate costs forJaloDeliveryModeExceptionprotected double getCalculationBaseValue(SessionContext ctx, AbstractOrder order, java.lang.String propName) throws JaloDeliveryModeException
JaloDeliveryModeExceptionprotected java.lang.Double parseItemProperty(SessionContext ctx, Item item, java.lang.String propertyName)
protected java.util.Map<Country,java.util.Set<Zone>> getAmbigousZones(java.util.Set<Zone> zones)
public boolean isZoneAllowed(Zone toCheck)
If a new ZoneDeliveryModeValue is tried to be created with such a disallowed zone a
ConsistencyCheckException is thrown!
@Deprecated public java.util.Collection<ZoneDeliveryModeValue> getDeliveryModeValues()
GeneratedZoneDeliveryMode.getValues() directly@Deprecated public ZoneDeliveryModeValue addNewDeliveryModeValue(Zone zone, Currency curr, double minimum, double value) throws JaloDeliveryModeException
setCost(Currency, double, double, Zone) directlyJaloDeliveryModeExceptionCopyright © 2018 SAP SE. All Rights Reserved.