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.checkout
Class Order.OrderBuilder

java.lang.Object
  extended by org.torweg.pulse.component.shop.checkout.Order.OrderBuilder
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Order

public static class Order.OrderBuilder
extends java.lang.Object
implements java.io.Serializable

The OrderBuilder.

Version:
$Revision: 1979 $
Author:
Christian Schatt
See Also:
Serialized Form

Constructor Summary
protected Order.OrderBuilder()
          Deprecated. 
  Order.OrderBuilder(ShoppingCart cart, ShopSettings settings, User user)
          Creates a new OrderBuilder from the given ShoppingCart, ShopSettings and User.
 
Method Summary
 Order build()
          Builds a new Order.
 Address getBillingAddress()
          Returns the billing address.
 Customer getCustomer()
          Returns the Customer.
 Address getDeliveryAddress()
          Returns the delivery address.
 DispatchData getDispatchData()
          Returns the DispatchData.
static Order.OrderBuilder getFromSession(Bundle bundle, java.util.Locale locale, ServiceSession session)
          Returns the OrderBuilder attribute for the given Bundle and Locale from the given ServiceSession.
 OrderContents getOrderContents()
          Returns the OrderContents.
 OrderDetails getOrderDetails()
          Returns the OrderDetails.
 OrderMetaData getOrderMetaData()
          Returns the OrderMetaData.
 PaymentData getPaymentData()
          Returns the PaymentData.
 TotalPrice getTotalPrice()
          Returns the TotalPrice.
static void putIntoSession(Order.OrderBuilder builder, ServiceSession session)
          Sets the given OrderBuilder as an attribute of the given ServiceSession.
static void removeFromSession(Bundle bundle, java.util.Locale locale, ServiceSession session)
          Removes the Order attribute for the given Bundle and Locale from the given ServiceSession.
 Order.OrderBuilder setBillingAddress(Address ba)
          Sets the billing address.
 Order.OrderBuilder setCustomer(Customer c)
          Sets the Customer.
 Order.OrderBuilder setDeliveryAddress(Address da)
          Sets the delivery address.
 Order.OrderBuilder setDispatchData(DispatchData dd)
          Sets the DispatchData.
 Order.OrderBuilder setOrderDetails(OrderDetails od)
          Sets the OrderDetails.
 Order.OrderBuilder setPaymentData(PaymentData pd)
          Sets the PaymentData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Order.OrderBuilder

@Deprecated
protected Order.OrderBuilder()
Deprecated. 

The no-argument constructor used by JAXB.


Order.OrderBuilder

public Order.OrderBuilder(ShoppingCart cart, ShopSettings settings, User user)
Creates a new OrderBuilder from the given ShoppingCart, ShopSettings and User.

Parameters:
cart - the ShoppingCart.
settings - the ShopSettings.
user - the User.
Throws:
java.lang.IllegalArgumentException - if the given ShoppingCart, ShopSettings or User is null.
Method Detail

getCustomer

public final Customer getCustomer()
Returns the Customer.

Returns:
the Customer.

setCustomer

public final Order.OrderBuilder setCustomer(Customer c)
Sets the Customer.

Parameters:
c - the Customer to set.
Returns:
this.

getDeliveryAddress

public final Address getDeliveryAddress()
Returns the delivery address.

Returns:
the delivery address.

setDeliveryAddress

public final Order.OrderBuilder setDeliveryAddress(Address da)
Sets the delivery address.

Parameters:
da - the delivery address to set.
Returns:
this.

getBillingAddress

public final Address getBillingAddress()
Returns the billing address.

Returns:
the billing address.

setBillingAddress

public final Order.OrderBuilder setBillingAddress(Address ba)
Sets the billing address.

Parameters:
ba - the billing address to set.
Returns:
this.

getDispatchData

public final DispatchData getDispatchData()
Returns the DispatchData.

Returns:
the DispatchData.

setDispatchData

public final Order.OrderBuilder setDispatchData(DispatchData dd)
Sets the DispatchData.

Parameters:
dd - the DispatchData to set.
Returns:
this.

getPaymentData

public final PaymentData getPaymentData()
Returns the PaymentData.

Returns:
the PaymentData.

setPaymentData

public final Order.OrderBuilder setPaymentData(PaymentData pd)
Sets the PaymentData.

Parameters:
pd - the PaymentData to set.
Returns:
this.

getOrderDetails

public final OrderDetails getOrderDetails()
Returns the OrderDetails.

Returns:
the OrderDetails.

setOrderDetails

public final Order.OrderBuilder setOrderDetails(OrderDetails od)
Sets the OrderDetails.

Parameters:
od - the OrderDetails to set.
Returns:
this.

getOrderContents

public final OrderContents getOrderContents()
Returns the OrderContents.

Returns:
the OrderContents.

getTotalPrice

public final TotalPrice getTotalPrice()
Returns the TotalPrice.

Returns:
the TotalPrice.

getOrderMetaData

public final OrderMetaData getOrderMetaData()
Returns the OrderMetaData.

Returns:
the OrderMetaData.

build

public final Order build()
Builds a new Order.

Returns:
the new Order.

putIntoSession

public static final void putIntoSession(Order.OrderBuilder builder, ServiceSession session)
Sets the given OrderBuilder as an attribute of the given ServiceSession.

Parameters:
builder - the OrderBuilder.
session - the ServiceSession.

getFromSession

public static final Order.OrderBuilder getFromSession(Bundle bundle,
                                                      java.util.Locale locale, ServiceSession session)
Returns the OrderBuilder attribute for the given Bundle and Locale from the given ServiceSession.

Parameters:
bundle - the Bundle.
locale - the Locale.
session - the ServiceSession.
Returns:
the OrderBuilder.

removeFromSession

public static final void removeFromSession(Bundle bundle,
                                           java.util.Locale locale, ServiceSession session)
Removes the Order attribute for the given Bundle and Locale from the given ServiceSession.

Parameters:
bundle - the Bundle.
locale - the Locale.
session - the ServiceSession.