com.elasticpath.domain.shipping.impl
Class CostPerUnitWeightMethodImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractPersistenceImpl
          extended by com.elasticpath.domain.impl.AbstractEntityImpl
              extended by com.elasticpath.domain.shipping.impl.AbstractShippingCostCalculationMethodImpl
                  extended by com.elasticpath.domain.shipping.impl.CostPerUnitWeightMethodImpl
All Implemented Interfaces:
Entity, EpDomain, Persistence, ShippingCostCalculationMethod, java.io.Serializable

public class CostPerUnitWeightMethodImpl
extends AbstractShippingCostCalculationMethodImpl

Shipping cost calculation method that calculates the shipping cost as unit price * order weight. It needs one parameter: unit price.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
CostPerUnitWeightMethodImpl()
           
 
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 an array of parameter keys required by this rule action.
 
Methods inherited from class com.elasticpath.domain.shipping.impl.AbstractShippingCostCalculationMethodImpl
getParameters, getType, setParameters, setType
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEntityImpl
convertAttributeGroupAttributes, getGuid, setDefaultValues, setGuid
 
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl
executeBeforePersistAction, getUidPk, isPersistent, setUidPk
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

CostPerUnitWeightMethodImpl

public CostPerUnitWeightMethodImpl()
Method Detail

calculateShippingCost

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

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

getDisplayText

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

Returns:
the text representation

getParameterKeys

public java.lang.String[] getParameterKeys()
Return an array of parameter keys required by this rule action.

Returns:
the parameter key array