pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.shop.model
Class ShoppingCart.Total

java.lang.Object
  extended by org.torweg.pulse.component.shop.model.ShoppingCart.Total
All Implemented Interfaces:
ExtendedJDOMable, JDOMable
Enclosing class:
ShoppingCart

public static final class ShoppingCart.Total
extends java.lang.Object
implements ExtendedJDOMable

the Total of the ShoppingCart.


Constructor Summary
protected ShoppingCart.Total(ShoppingCart cart, User u, ShopSettings settings)
          builds a new Total of the ShoppingCart.
 
Method Summary
 org.jdom.Element deserializeToJDOM()
          returns a JDOM representation of the Total.
 org.jdom.Element deserializeToJDOM(ServiceRequest r)
          returns a JDOM representation of the Total.
 long getGrossSum()
          returns the gross sum.
 long getNetSum()
          returns the net sum.
 java.util.Map<TaxGroup,java.lang.Long> getTaxTotals()
          returns the tax totals.
 net.sf.json.JSONObject toJSON()
          returns a JSON representation of the Total.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShoppingCart.Total

protected ShoppingCart.Total(ShoppingCart cart, User u, ShopSettings settings)
builds a new Total of the ShoppingCart.

Parameters:
cart - the cart
u - the user
settings - the shop settings
Method Detail

getTaxTotals

public java.util.Map<TaxGroup,java.lang.Long> getTaxTotals()
returns the tax totals.

Returns:
the tax totals

getNetSum

public long getNetSum()
returns the net sum.

Returns:
the gross sum.

getGrossSum

public long getGrossSum()
returns the gross sum.

Returns:
the gross sum

deserializeToJDOM

public org.jdom.Element deserializeToJDOM()
returns a JDOM representation of the Total.

Specified by:
deserializeToJDOM in interface JDOMable
Returns:
a JDOM representation of the Total
See Also:
JDOMable.deserializeToJDOM()

deserializeToJDOM

public org.jdom.Element deserializeToJDOM(ServiceRequest r)
returns a JDOM representation of the Total.

Specified by:
deserializeToJDOM in interface ExtendedJDOMable
Parameters:
r - the request for adding further information
Returns:
a JDOM representation of the Total
See Also:
JDOMable.deserializeToJDOM()

toJSON

public net.sf.json.JSONObject toJSON()
returns a JSON representation of the Total.

Returns:
a JSON representation of the Total