com.elasticpath.domain.shipping
Interface ShippingServiceLevel

All Superinterfaces:
Entity, EpDomain, Persistence, java.io.Serializable
All Known Subinterfaces:
ShippingServiceLevelBean
All Known Implementing Classes:
ShippingServiceLevelBeanImpl, ShippingServiceLevelImpl

public interface ShippingServiceLevel
extends Entity

A ShippingServiceLevel represents a shipping option assoicated with a shipping region.


Field Summary
static java.lang.String LOCALIZED_PROPERTY_NAME
          The name of localized property -- name.
 
Method Summary
 Money calculateRegularPriceShippingCost(ShoppingCart shoppingCart)
          Calculate and return the shipping cost before any discount has been applied.
 Money calculateShippingCost(ShoppingCart shoppingCart)
          Return the calculated, after-promotion shipping cost.
 void clearPromotions()
          Clears any discount that has been set for this shipping service level.
 java.lang.String getCarrier()
           
 LocalizedProperties getLocalizedProperties()
          Returns the LocalizedProperties.
 java.lang.String getName(java.util.Locale locale)
          Return the ShippingServiceLevel name for the given locale.
 Money getRegularPriceShippingCost()
          Return the calculted before-discount shipping cost (make sure calculateRegularPriceShippingCost has been invoked already).
 Money getShippingCost()
          Return the calculated, after-promotion shipping cost (make sure calculateShippingCost has been invoked already).
 ShippingCostCalculationMethod getShippingCostCalculationMethod()
          Get the shipping cost calculation method associated with this ShippingServiceLevel.
 ShippingRegion getShippingRegion()
          Get the shipping region associated with this ShippingServiceLevel.
 void setCarrier(java.lang.String carrier)
           
 void setShippingCostCalculationMethod(ShippingCostCalculationMethod shippingCostCalculationMethod)
          Set the shipping cost calculation method associated with this ShippingServiceLevel.
 void setShippingDiscount(Money discount)
          Applies a discount to this shipping service level.
 void setShippingRegion(ShippingRegion shippingRegion)
          Set the shipping region associated with this ShippingServiceLevel.
 
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

LOCALIZED_PROPERTY_NAME

static final java.lang.String LOCALIZED_PROPERTY_NAME
The name of localized property -- name.

See Also:
Constant Field Values
Method Detail

calculateRegularPriceShippingCost

Money calculateRegularPriceShippingCost(ShoppingCart shoppingCart)
Calculate and return the shipping cost before any discount has been applied.

Parameters:
shoppingCart - the shopping cart containing items to be shipped
Returns:
the regular price shipping cost.

calculateShippingCost

Money calculateShippingCost(ShoppingCart shoppingCart)
Return the calculated, after-promotion shipping cost.

Parameters:
shoppingCart - the shopping cart containing items to be shipped
Returns:
the shipping cost.

clearPromotions

void clearPromotions()
Clears any discount that has been set for this shipping service level.


getCarrier

java.lang.String getCarrier()
Returns:
Returns the carrier.

getLocalizedProperties

LocalizedProperties getLocalizedProperties()
Returns the LocalizedProperties.

Returns:
the LocalizedProperties

getName

java.lang.String getName(java.util.Locale locale)
Return the ShippingServiceLevel name for the given locale.

Parameters:
locale - the locale to retrieve the name.
Returns:
Returns the name.

getRegularPriceShippingCost

Money getRegularPriceShippingCost()
Return the calculted before-discount shipping cost (make sure calculateRegularPriceShippingCost has been invoked already).

Returns:
the regular price shipping cost.

getShippingCost

Money getShippingCost()
Return the calculated, after-promotion shipping cost (make sure calculateShippingCost has been invoked already). This method is intended for use when the shopping cart used in the calculation is no longer available (DWR outbound conversion)

Returns:
the shipping cost.

getShippingCostCalculationMethod

ShippingCostCalculationMethod getShippingCostCalculationMethod()
Get the shipping cost calculation method associated with this ShippingServiceLevel.

Returns:
shippingCostCalculationMethod.

getShippingRegion

ShippingRegion getShippingRegion()
Get the shipping region associated with this ShippingServiceLevel.

Returns:
the shippingRegion.

setCarrier

void setCarrier(java.lang.String carrier)
Parameters:
carrier - The carrier to set.

setShippingCostCalculationMethod

void setShippingCostCalculationMethod(ShippingCostCalculationMethod shippingCostCalculationMethod)
Set the shipping cost calculation method associated with this ShippingServiceLevel.

Parameters:
shippingCostCalculationMethod - the shipping cost calculation method to be associated with this shippingServiceLevel.

setShippingDiscount

void setShippingDiscount(Money discount)
Applies a discount to this shipping service level.

Parameters:
discount - the amount to be discounted

setShippingRegion

void setShippingRegion(ShippingRegion shippingRegion)
Set the shipping region associated with this ShippingServiceLevel.

Parameters:
shippingRegion - the shipping region to be associated with this shippingServiceLevel.