|
|||||||||
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 ShippingServiceLevel
shoppingCart
- the shopping cart containing items to be shipped
public Money calculateShippingCost(ShoppingCart shoppingCart)
calculateShippingCost
in interface ShippingServiceLevel
shoppingCart
- the shopping cart containing items to be shipped
public void clearPromotions()
clearPromotions
in interface ShippingServiceLevel
public java.lang.String getCarrier()
getCarrier
in interface ShippingServiceLevel
public LocalizedProperties getLocalizedProperties()
LocalizedProperties
.
getLocalizedProperties
in interface ShippingServiceLevel
LocalizedProperties
public java.lang.String getName(java.util.Locale locale)
ShippingServiceLevel
name for the given locale.
getName
in interface ShippingServiceLevel
locale
- the locale to retrieve the name.
public Money getRegularPriceShippingCost()
getRegularPriceShippingCost
in interface ShippingServiceLevel
public Money getShippingCost()
getShippingCost
in interface ShippingServiceLevel
public ShippingCostCalculationMethod getShippingCostCalculationMethod()
ShippingServiceLevel
.
getShippingCostCalculationMethod
in interface ShippingServiceLevel
public ShippingRegion getShippingRegion()
ShippingServiceLevel
.
getShippingRegion
in interface ShippingServiceLevel
public void setCarrier(java.lang.String carrier)
setCarrier
in interface ShippingServiceLevel
carrier
- The carrier to set.public void setLocalizedProperties(LocalizedProperties localizedProperties)
LocalizedProperties
.
localizedProperties
- the LocalizedProperties
public void setShippingCostCalculationMethod(ShippingCostCalculationMethod shippingCostCalculationMethod)
ShippingServiceLevel
.
setShippingCostCalculationMethod
in interface ShippingServiceLevel
shippingCostCalculationMethod
- the shipping cost calculation method to be associated with this shippingServiceLevel.public void setShippingDiscount(Money discount)
setShippingDiscount
in interface ShippingServiceLevel
discount
- the amount to be discountedpublic void setShippingRegion(ShippingRegion shippingRegion)
ShippingServiceLevel
.
setShippingRegion
in interface ShippingServiceLevel
shippingRegion
- 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 |