|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.elasticpath.sfweb.ajax.bean.impl.ShippingServiceLevelBeanImpl
public class ShippingServiceLevelBeanImpl
| Field Summary |
|---|
| Fields inherited from interface com.elasticpath.domain.shipping.ShippingServiceLevel |
|---|
LOCALIZED_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
ShippingServiceLevelBeanImpl(ShippingServiceLevel shippingServiceLevel,
java.util.Locale locale)
Wraps a ShippingServiceLevel object for easy localized dwr conversion. |
|
| 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. |
void |
executeBeforePersistAction()
Interceptor to perform tasks before persisting changes. |
java.lang.String |
getCarrier()
|
java.lang.String |
getDisplayName()
Return the ShippingServiceLevel name for the given locale. |
ElasticPath |
getElasticPath()
Get the ElasticPath singleton. |
java.lang.String |
getGuid()
Return the guid. |
java.util.Locale |
getLocale()
|
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. |
long |
getUidPk()
Gets the unique identifier for this domain model object. |
boolean |
isPersistent()
True if the object has previously been persisted. |
void |
setCarrier(java.lang.String carrier)
|
void |
setDefaultValues()
Set default values for those fields need default values. |
void |
setElasticPath(ElasticPath elasticPath)
Inject the ElasticPath singleton. |
void |
setGuid(java.lang.String guid)
Set the guid. |
void |
setLocale(java.util.Locale locale)
|
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. |
void |
setUidPk(long uidPk)
Sets the unique identifier for this domain model object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShippingServiceLevelBeanImpl(ShippingServiceLevel shippingServiceLevel,
java.util.Locale locale)
ShippingServiceLevel object for easy localized dwr conversion.
shippingServiceLevel - the ShippingServiceLevel to be wrapped.locale - the current locale.| 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 void executeBeforePersistAction()
executeBeforePersistAction in interface Persistencepublic java.lang.String getCarrier()
getCarrier in interface ShippingServiceLevelpublic java.lang.String getDisplayName()
ShippingServiceLevel name for the given locale.
getDisplayName in interface ShippingServiceLevelBeanpublic ElasticPath getElasticPath()
getElasticPath in interface EpDomainpublic java.lang.String getGuid()
getGuid in interface Entitypublic java.util.Locale getLocale()
getLocale in interface ShippingServiceLevelBeanpublic 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 long getUidPk()
getUidPk in interface Persistencepublic boolean isPersistent()
isPersistent in interface Persistencepublic void setCarrier(java.lang.String carrier)
setCarrier in interface ShippingServiceLevelcarrier - The carrier to set.public void setDefaultValues()
setDefaultValues in interface Persistencepublic void setElasticPath(ElasticPath elasticPath)
setElasticPath in interface EpDomainelasticPath - the ElasticPath singleton.public void setGuid(java.lang.String guid)
setGuid in interface Entityguid - the guid to set.public void setLocale(java.util.Locale locale)
setLocale in interface ShippingServiceLevelBeanlocale - the locale to setpublic 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.public void setUidPk(long uidPk)
setUidPk in interface PersistenceuidPk - the new unique identifier.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||