org.paneris.jammyjoes.shopping
Class JammyJoesShoppingTrolley

java.lang.Object
  extended by org.paneris.jammyjoes.shopping.ShoppingTrolley
      extended by org.paneris.jammyjoes.shopping.JammyJoesShoppingTrolley

public class JammyJoesShoppingTrolley
extends ShoppingTrolley

A Shopping Trolley stored information in the user's Shopping Trolley.

It does this by storing itself in the session.

For this reason, the constructors are private, and you will be expected to always get the Shopping Trolley using getInstance();

usage example: ShoppingTrolley trolley = ShoppingTrolley.getInstance(Melati melati); context.put("trolley", trolley);


Field Summary
 DeliveryCarrier carrier
           
 Wrapping wrapping
           
 DeliveryZone zone
           
 
Fields inherited from class org.paneris.jammyjoes.shopping.ShoppingTrolley
address, config, country, county, email, hasDetails, locale, melati, message, name, postcode, tel, town
 
Constructor Summary
JammyJoesShoppingTrolley()
           
 
Method Summary
 boolean allInStock()
           
 void confirmPayment(org.melati.Melati melati)
           
 double convertFromUK(double value)
           
 java.lang.String convertFromUKandFormat(double value)
           
 double convertToUK(double value)
           
 java.lang.String displayCurrency(double value)
           
 java.lang.String getComment()
           
 ShopCurrency getCurrency()
           
 ShopCurrency getCurrency(java.util.Locale locale)
           
 DeliveryCarrier getDeliveryCarrier()
           
 java.lang.String getDeliveryName()
           
 double getDeliveryValue()
           
 double getDeliveryValueByValue()
           
 double getDeliveryValueByWeight()
           
 DeliveryZone getDeliveryZone()
           
 double getDiscountRate()
           
 JammyJoesContextUtil getJJUtil()
           
 java.util.Locale getLocale()
          Get the Locale for this trolley.
 ShopOrder getOrder()
           
 java.lang.Boolean getSpam()
           
 double getTotalValue()
           
 double getTotalVat()
           
 double getTotalWeight()
           
 Wrapping getWrapping()
           
 java.lang.String getWrappingDisplay()
           
 org.melati.poem.Field getWrappings()
           
 double getWrappingValue()
           
 org.melati.poem.Field getZones()
           
 boolean hasDelivery()
           
 boolean hasDiscount()
           
 boolean hasVAT()
           
 boolean hasWrapping()
           
 void load(java.lang.Integer id)
           
 void remove(org.melati.Melati melati)
          remove any trolley from the session
 void save()
           
 void saveCatalogueOrder()
           
 void setDefaultDetails(org.melati.Melati melati)
           
 void setFromForm(org.melati.Melati melati)
           
 void setSpam(java.lang.Boolean s)
           
 void setWrapping(Wrapping newWrapping)
           
 void setZone(DeliveryZone zone)
           
 
Methods inherited from class org.paneris.jammyjoes.shopping.ShoppingTrolley
abandonURL, addItem, assertLogin, baseURL, catalogueURL, configureRequest, confirmURL, detailsURL, displayCurrency, getCountry, getCounty, getDeliveryAddress, getDeliveryDisplay, getDiscountRateDisplay, getDiscountValue, getDiscountValueDisplay, getEmail, getInstance, getItem, getItems, getMessage, getName, getPostcode, getTel, getTotalDeliveryValue, getTotalValueDisplay, getTotalValuePence, getTown, getValue, getValueDisplay, getValuePence, getVATDisplay, getVATValue, hasDetails, initialise, initialise, isEmpty, name, newItem, newTrolley, paidURL, removeItem, roundTo2dp, setCountry, setCounty, setDeliveryAddress, setEmail, setLocale, setMessage, setName, setPostcode, setTel, setTown, updateURL, viewURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

zone

public DeliveryZone zone

wrapping

public Wrapping wrapping

carrier

public DeliveryCarrier carrier
Constructor Detail

JammyJoesShoppingTrolley

public JammyJoesShoppingTrolley()
Method Detail

getLocale

public java.util.Locale getLocale()
Get the Locale for this trolley.

Specified by:
getLocale in class ShoppingTrolley

load

public void load(java.lang.Integer id)
          throws org.melati.util.InstantiationPropertyException
Specified by:
load in class ShoppingTrolley
Throws:
org.melati.util.InstantiationPropertyException

save

public void save()
Specified by:
save in class ShoppingTrolley

saveCatalogueOrder

public void saveCatalogueOrder()

hasDelivery

public boolean hasDelivery()
Specified by:
hasDelivery in class ShoppingTrolley

allInStock

public boolean allInStock()

hasWrapping

public boolean hasWrapping()

getDeliveryZone

public DeliveryZone getDeliveryZone()

getWrapping

public Wrapping getWrapping()

getDeliveryCarrier

public DeliveryCarrier getDeliveryCarrier()

getZones

public org.melati.poem.Field getZones()

getWrappings

public org.melati.poem.Field getWrappings()

setFromForm

public void setFromForm(org.melati.Melati melati)

getDeliveryValue

public double getDeliveryValue()
Specified by:
getDeliveryValue in class ShoppingTrolley

getWrappingValue

public double getWrappingValue()

getDeliveryValueByValue

public double getDeliveryValueByValue()

getDeliveryValueByWeight

public double getDeliveryValueByWeight()

getTotalWeight

public double getTotalWeight()

hasDiscount

public boolean hasDiscount()
Specified by:
hasDiscount in class ShoppingTrolley

getDiscountRate

public double getDiscountRate()
Specified by:
getDiscountRate in class ShoppingTrolley

hasVAT

public boolean hasVAT()
Specified by:
hasVAT in class ShoppingTrolley

setDefaultDetails

public void setDefaultDetails(org.melati.Melati melati)
Specified by:
setDefaultDetails in class ShoppingTrolley

confirmPayment

public void confirmPayment(org.melati.Melati melati)
Specified by:
confirmPayment in class ShoppingTrolley

remove

public void remove(org.melati.Melati melati)
remove any trolley from the session

Overrides:
remove in class ShoppingTrolley

getOrder

public ShopOrder getOrder()

getTotalValue

public double getTotalValue()
Overrides:
getTotalValue in class ShoppingTrolley

getTotalVat

public double getTotalVat()

getWrappingDisplay

public java.lang.String getWrappingDisplay()

convertFromUKandFormat

public java.lang.String convertFromUKandFormat(double value)

convertFromUK

public double convertFromUK(double value)

convertToUK

public double convertToUK(double value)

getCurrency

public ShopCurrency getCurrency(java.util.Locale locale)

getCurrency

public ShopCurrency getCurrency()

displayCurrency

public java.lang.String displayCurrency(double value)
Overrides:
displayCurrency in class ShoppingTrolley

setWrapping

public void setWrapping(Wrapping newWrapping)

setZone

public void setZone(DeliveryZone zone)

setSpam

public void setSpam(java.lang.Boolean s)

getComment

public java.lang.String getComment()

getDeliveryName

public java.lang.String getDeliveryName()

getSpam

public java.lang.Boolean getSpam()

getJJUtil

public JammyJoesContextUtil getJJUtil()


Copyright © 2001-2008 PanEris. All Rights Reserved.