com.elasticpath.domain.shipping.impl
Class FixedBaseAndOrderTotalPercentageMethodImpl

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.FixedBaseAndOrderTotalPercentageMethodImpl
All Implemented Interfaces:
Entity, EpDomain, Persistence, ShippingCostCalculationMethod, java.io.Serializable

public class FixedBaseAndOrderTotalPercentageMethodImpl
extends AbstractShippingCostCalculationMethodImpl

Shipping cost calculation method that calculates the shipping cost as fixBase + % of order total. It needs two parameters: the value of fixBase and the value of percentage of the order total.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
FixedBaseAndOrderTotalPercentageMethodImpl()
           
 
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

FixedBaseAndOrderTotalPercentageMethodImpl

public FixedBaseAndOrderTotalPercentageMethodImpl()
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