|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.elasticpath.domain.impl.AbstractEpDomainImpl
com.elasticpath.domain.impl.AbstractPersistenceImpl
com.elasticpath.domain.impl.AbstractEntityImpl
com.elasticpath.domain.shipping.impl.ShippingServiceLevelImpl
public class ShippingServiceLevelImpl
A ShippingRegion represents a region that will be associated with one or more shipping services. For now, it is composed of country and a subcountry, i.e. CA(country) and BC(subcountry).
| Field Summary | |
|---|---|
static long |
serialVersionUID
Serial version id. |
| Fields inherited from interface com.elasticpath.domain.shipping.ShippingServiceLevel |
|---|
LOCALIZED_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
ShippingServiceLevelImpl()
|
|
| Method Summary | |
|---|---|
Money |
calculateRegularPriceShippingCost(ShoppingCart shoppingCart)
Returns 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 |
setLocalizedProperties(LocalizedProperties localizedProperties)
Sets the LocalizedProperties. |
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 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 |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
public ShippingServiceLevelImpl()
| Method Detail |
|---|
public Money calculateRegularPriceShippingCost(ShoppingCart shoppingCart)
calculateRegularPriceShippingCost in interface ShippingServiceLevelshoppingCart - the shopping cart containing items to be shipped
public Money calculateShippingCost(ShoppingCart shoppingCart)
calculateShippingCost in interface ShippingServiceLevelshoppingCart - the shopping cart containing items to be shipped
public void clearPromotions()
clearPromotions in interface ShippingServiceLevelpublic java.lang.String getCarrier()
getCarrier in interface ShippingServiceLevelpublic LocalizedProperties getLocalizedProperties()
LocalizedProperties.
getLocalizedProperties in interface ShippingServiceLevelLocalizedPropertiespublic java.lang.String getName(java.util.Locale locale)
ShippingServiceLevel name for the given locale.
getName in interface ShippingServiceLevellocale - the locale to retrieve the name.
public Money getRegularPriceShippingCost()
getRegularPriceShippingCost in interface ShippingServiceLevelpublic Money getShippingCost()
getShippingCost in interface ShippingServiceLevelpublic ShippingCostCalculationMethod getShippingCostCalculationMethod()
ShippingServiceLevel.
getShippingCostCalculationMethod in interface ShippingServiceLevelpublic ShippingRegion getShippingRegion()
ShippingServiceLevel.
getShippingRegion in interface ShippingServiceLevelpublic void setCarrier(java.lang.String carrier)
setCarrier in interface ShippingServiceLevelcarrier - The carrier to set.public void setLocalizedProperties(LocalizedProperties localizedProperties)
LocalizedProperties.
localizedProperties - the LocalizedPropertiespublic void setShippingCostCalculationMethod(ShippingCostCalculationMethod shippingCostCalculationMethod)
ShippingServiceLevel.
setShippingCostCalculationMethod in interface ShippingServiceLevelshippingCostCalculationMethod - the shipping cost calculation method to be associated with this shippingServiceLevel.public void setShippingDiscount(Money discount)
setShippingDiscount in interface ShippingServiceLeveldiscount - the amount to be discountedpublic void setShippingRegion(ShippingRegion shippingRegion)
ShippingServiceLevel.
setShippingRegion in interface ShippingServiceLevelshippingRegion - the shipping region to be associated with this shippingServiceLevel.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||