|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 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 void executeBeforePersistAction()
executeBeforePersistAction
in interface Persistence
public java.lang.String getCarrier()
getCarrier
in interface ShippingServiceLevel
public java.lang.String getDisplayName()
ShippingServiceLevel
name for the given locale.
getDisplayName
in interface ShippingServiceLevelBean
public ElasticPath getElasticPath()
getElasticPath
in interface EpDomain
public java.lang.String getGuid()
getGuid
in interface Entity
public java.util.Locale getLocale()
getLocale
in interface ShippingServiceLevelBean
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 long getUidPk()
getUidPk
in interface Persistence
public boolean isPersistent()
isPersistent
in interface Persistence
public void setCarrier(java.lang.String carrier)
setCarrier
in interface ShippingServiceLevel
carrier
- The carrier to set.public void setDefaultValues()
setDefaultValues
in interface Persistence
public void setElasticPath(ElasticPath elasticPath)
setElasticPath
in interface EpDomain
elasticPath
- the ElasticPath singleton.public void setGuid(java.lang.String guid)
setGuid
in interface Entity
guid
- the guid to set.public void setLocale(java.util.Locale locale)
setLocale
in interface ShippingServiceLevelBean
locale
- the locale to setpublic 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.public void setUidPk(long uidPk)
setUidPk
in interface Persistence
uidPk
- the new unique identifier.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |