com.elasticpath.domain.shipping
Interface ShippingCostCalculationMethod

All Superinterfaces:
Entity, EpDomain, Persistence, java.io.Serializable
All Known Implementing Classes:
AbstractShippingCostCalculationMethodImpl, CostPerUnitWeightMethodImpl, FixedBaseAndCostPerUnitWeightMethodImpl, FixedBaseAndOrderTotalPercentageMethodImpl, FixedPriceMethodImpl, OrderTotalPercentageMethodImpl

public interface ShippingCostCalculationMethod
extends Entity

A shippingCostCalculationMethod represents a method to be used for shipping cost calculation. It is a component of a shipping service level.


Method Summary
 Money calculateShippingCost(ShoppingCart shoppingCart)
          Calculation the shipping cost for the given shoppingCart.
 java.lang.String getDisplayText()
          Return the text representation of this method for display to the user.
 java.lang.String[] getParameterKeys()
          Return the array of the required parameter keys for the method.
 java.util.Set getParameters()
          Get the parameters associated with this shippingCostCalculationMethod.
 java.lang.String getType()
          Get the type of shippingCostCalculationMethod, i.e.
 void setParameters(java.util.Set shippingCostCalculationParameters)
          Set the parameters of this shippingCostCalculationMethod.
 void setType(java.lang.String type)
          Set the type of shippingCostCalculationMethod.
 
Methods inherited from interface com.elasticpath.domain.Entity
getGuid, setGuid
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Method Detail

calculateShippingCost

Money calculateShippingCost(ShoppingCart shoppingCart)
Calculation the shipping cost for the given shoppingCart.

Parameters:
shoppingCart - - the shoppingCart.
Returns:
the shippingCost for the given shoppingCart.

getDisplayText

java.lang.String getDisplayText()
Return the text representation of this method for display to the user.

Returns:
the text representation

getParameterKeys

java.lang.String[] getParameterKeys()
Return the array of the required parameter keys for the method.

Returns:
an array of String of the required parameter keys for the method.

getParameters

java.util.Set getParameters()
Get the parameters associated with this shippingCostCalculationMethod.

Returns:
the parameters

getType

java.lang.String getType()
Get the type of shippingCostCalculationMethod, i.e. fixBase, fixedBaseAndOrderTotalPercentageMethod and etc. Make sure the type value match the bean id used in the spring bean factory configuration.

Returns:
the shippingCostCalculationMethod type.

setParameters

void setParameters(java.util.Set shippingCostCalculationParameters)
Set the parameters of this shippingCostCalculationMethod.

Parameters:
shippingCostCalculationParameters - a set of ShippingCostCalculationParamater objects

setType

void setType(java.lang.String type)
Set the type of shippingCostCalculationMethod.

Parameters:
type - the type of shippingCostCalculationMethod.