Package de.hybris.platform.order.impl
Class DefaultZoneDeliveryModeService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.order.impl.DefaultDeliveryModeService
de.hybris.platform.order.impl.DefaultZoneDeliveryModeService
- All Implemented Interfaces:
DeliveryModeService,ZoneDeliveryModeService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class DefaultZoneDeliveryModeService
extends DefaultDeliveryModeService
implements ZoneDeliveryModeService
- See Also:
-
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, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets allZoneModels.getCurrencies(ZoneModel zone, ZoneDeliveryModeModel zoneDeliveryMode) Gets all currencies for which values are defined in the zone and in the delivery mode.getDeliveryValue(ZoneModel zone, CurrencyModel currency, Double min, ZoneDeliveryModeModel zoneDeliveryMode) Gets specificZoneDeliveryModeValueModelfor the given zone, currency, minimum value, and zone delivery mode.getDeliveryValues(CurrencyModel currency, ZoneModel zone, ZoneDeliveryModeModel zoneDeliveryMode) Gets all delivery cost values for the currency in the zone and with the specific delivery mode.getZoneForCode(String code) Gets theZoneModelwith the specified code.getZonesForZoneDeliveryMode(ZoneDeliveryModeModel zoneDeliveryMode) Gets all zones for which price values are defined in the delivery mode.booleanisUsingPrice(ZoneDeliveryModeModel zoneDeliveryMode) Checks whether theZoneDeliveryModeModeluses the order subtotal as calculation base.booleanisZoneAllowed(ZoneModel zone, ZoneDeliveryModeModel zoneDeliveryMode) Checks whether the zone is allowed to be used for adding new values to the delivery mode.setDeliveryCost(CurrencyModel currency, Double min, Double value, ZoneModel zone, ZoneDeliveryModeModel zoneDeliveryMode) Sets the delivery cost for the given zone, currency, minimum value, and zone delivery mode.voidsetUsingPrice(ZoneDeliveryModeModel zoneDeliveryMode) Sets the special price property name for theZoneDeliveryModeModelconveniently.voidsetZdmvConsistencyStrategy(ZDMVConsistencyStrategy zdmvConsistencyStrategy) voidsetZoneDeliveryModeDao(ZoneDeliveryModeDao zoneDeliveryModeDao) voidsetZoneDeliveryModeValueDao(ZoneDeliveryModeValueDao zoneDeliveryModeValueDao) Methods inherited from class de.hybris.platform.order.impl.DefaultDeliveryModeService
getAllDeliveryModes, getDeliveryModeForCode, getSupportedDeliveryModes, setDeliveryModeDaoMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.order.DeliveryModeService
getAllDeliveryModes, getDeliveryModeForCode, getSupportedDeliveryModes
-
Constructor Details
-
DefaultZoneDeliveryModeService
public DefaultZoneDeliveryModeService()
-
-
Method Details
-
getZoneForCode
Description copied from interface:ZoneDeliveryModeServiceGets theZoneModelwith the specified code.- Specified by:
getZoneForCodein interfaceZoneDeliveryModeService- Parameters:
code- the zone code- Returns:
- the found
ZoneModelwith the specified code
-
getAllZones
Description copied from interface:ZoneDeliveryModeServiceGets allZoneModels.- Specified by:
getAllZonesin interfaceZoneDeliveryModeService- Returns:
- a
Collectionof allZoneModels
-
getZonesForZoneDeliveryMode
Description copied from interface:ZoneDeliveryModeServiceGets all zones for which price values are defined in the delivery mode.- Specified by:
getZonesForZoneDeliveryModein interfaceZoneDeliveryModeService- Parameters:
zoneDeliveryMode- the zone delivery mode- Returns:
- all
ZoneModels for the delivery mode
-
getCurrencies
public Collection<CurrencyModel> getCurrencies(ZoneModel zone, ZoneDeliveryModeModel zoneDeliveryMode) Description copied from interface:ZoneDeliveryModeServiceGets all currencies for which values are defined in the zone and in the delivery mode.- Specified by:
getCurrenciesin interfaceZoneDeliveryModeService- Parameters:
zone- the zonezoneDeliveryMode- the zone delivery mode- Returns:
- all found
CurrencyModels
-
isZoneAllowed
Description copied from interface:ZoneDeliveryModeServiceChecks whether the zone is allowed to be used for adding new values to the delivery mode. This is necessary because two zones may share countries so the delivery mode can no longer calculate distinct prices for a specific country.- Specified by:
isZoneAllowedin interfaceZoneDeliveryModeService- Parameters:
zone- the zone to be checkedzoneDeliveryMode- the zone delivery mode- Returns:
- true if the zone is allowed for the delivery mode, false otherwise
-
getDeliveryValues
public Map<Double,Double> getDeliveryValues(CurrencyModel currency, ZoneModel zone, ZoneDeliveryModeModel zoneDeliveryMode) Description copied from interface:ZoneDeliveryModeServiceGets all delivery cost values for the currency in the zone and with the specific delivery mode.- Specified by:
getDeliveryValuesin interfaceZoneDeliveryModeService- Parameters:
currency- the currencyzone- the zonezoneDeliveryMode- the zone delivery mode- Returns:
- All delivery cost values consisting of minimum threshold value and cost value.
-
getDeliveryValue
public ZoneDeliveryModeValueModel getDeliveryValue(ZoneModel zone, CurrencyModel currency, Double min, ZoneDeliveryModeModel zoneDeliveryMode) Description copied from interface:ZoneDeliveryModeServiceGets specificZoneDeliveryModeValueModelfor the given zone, currency, minimum value, and zone delivery mode.- Specified by:
getDeliveryValuein interfaceZoneDeliveryModeService- Parameters:
zone- the zonecurrency- the currencymin- the minimum valuezoneDeliveryMode- the zone delivery mode- Returns:
- found
ZoneDeliveryModeValueModel
-
setDeliveryCost
public ZoneDeliveryModeValueModel setDeliveryCost(CurrencyModel currency, Double min, Double value, ZoneModel zone, ZoneDeliveryModeModel zoneDeliveryMode) throws DeliveryModeInterceptorException Description copied from interface:ZoneDeliveryModeServiceSets the delivery cost for the given zone, currency, minimum value, and zone delivery mode. Creates a newZoneDeliveryModeValueModelif noZoneDeliveryModeValueModelcan be found.- Specified by:
setDeliveryCostin interfaceZoneDeliveryModeService- Parameters:
currency- the currencymin- the minimum valuevalue- the delivery cost valuezone- the zonezoneDeliveryMode- the zone delivery mode- Returns:
- changed
ZoneDeliveryModeValueModelwith new delivery cost value or the createdZoneDeliveryModeValueModel - Throws:
DeliveryModeInterceptorException- if there is ambiguous zone for theZoneDeliveryModeModel
-
setUsingPrice
Description copied from interface:ZoneDeliveryModeServiceSets the special price property name for theZoneDeliveryModeModelconveniently. If the property is set, theZoneDeliveryModeModelwould use order's subtotal as calculation base.- Specified by:
setUsingPricein interfaceZoneDeliveryModeService- Parameters:
zoneDeliveryMode- the zone delivery mode
-
isUsingPrice
Description copied from interface:ZoneDeliveryModeServiceChecks whether theZoneDeliveryModeModeluses the order subtotal as calculation base.- Specified by:
isUsingPricein interfaceZoneDeliveryModeService- Parameters:
zoneDeliveryMode- the zone delivery mode
-
setZoneDeliveryModeValueDao
-
setZdmvConsistencyStrategy
-
setZoneDeliveryModeDao
-