com.konakart.app
Class CreateOrderOptions

java.lang.Object
  extended by com.konakart.app.CreateOrderOptions
All Implemented Interfaces:
CreateOrderOptionsIf

public class CreateOrderOptions
extends java.lang.Object
implements CreateOrderOptionsIf

An object used to contain options used when creating an order from an array of basket items.


Constructor Summary
CreateOrderOptions()
          Constructor
 
Method Summary
 int getBillingAddrId()
          Id of billing address to use when creating the order.
 java.lang.String getCatalogId()
          The id of the catalog which contains dynamic product information such as the price and quantity
 int getCustomerAddrId()
          Id of customer address to use when creating the order.
 int getDeliveryAddrId()
          Id of delivery address to use when creating the order.
 java.lang.String getLocale()
          Locale of the customer
 java.util.Calendar getPriceDate()
          The date for which a price is requested.
 boolean isCopyBasketCustomFields()
          When this boolean is set, all the custom fields of a basket item are automatically copied to the custom fields of the OrderProduct object in the order.
 boolean isUseDefaultCustomer()
          This boolean is set so that an order can be created before a customer has logged in to the application.
 boolean isUseExternalPrice()
          If true we attempt to fetch the prices from the external table
 boolean isUseExternalQuantity()
          If true we attempt to fetch the quantities from the external table
 boolean isUseWishListShippingAddr()
          If any one of the basket items, has a valid wish list id, then we use the address of the wish list as the shipping address.
 void setBillingAddrId(int billingAddrId)
          Id of billing address to use when creating the order.
 void setCatalogId(java.lang.String catalogId)
          The id of the catalog which contains dynamic product information such as the price and quantity
 void setCopyBasketCustomFields(boolean copyBasketCustomFields)
          When this boolean is set, all the custom fields of a basket item are automatically copied to the custom fields of the OrderProduct object in the order.
 void setCustomerAddrId(int customerAddrId)
          Id of customer address to use when creating the order.
 void setDeliveryAddrId(int deliveryAddrId)
          Id of delivery address to use when creating the order.
 void setLocale(java.lang.String locale)
          Locale of the customer
 void setPriceDate(java.util.Calendar priceDate)
          The date for which a price is requested.
 void setUseDefaultCustomer(boolean useDefaultCustomer)
          This boolean is set so that an order can be created before a customer has logged in to the application.
 void setUseExternalPrice(boolean useExternalPrice)
          If true we attempt to fetch the prices from the external table
 void setUseExternalQuantity(boolean useExternalQuantity)
          If true we attempt to fetch the quantities from the external table
 void setUseWishListShippingAddr(boolean useWishListShippingAddr)
          If any one of the basket items, has a valid wish list id, then we use the address of the wish list as the shipping address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateOrderOptions

public CreateOrderOptions()
Constructor

Method Detail

isCopyBasketCustomFields

public boolean isCopyBasketCustomFields()
Description copied from interface: CreateOrderOptionsIf
When this boolean is set, all the custom fields of a basket item are automatically copied to the custom fields of the OrderProduct object in the order.

Specified by:
isCopyBasketCustomFields in interface CreateOrderOptionsIf
Returns:
Returns the copyBasketCustomFields.

setCopyBasketCustomFields

public void setCopyBasketCustomFields(boolean copyBasketCustomFields)
Description copied from interface: CreateOrderOptionsIf
When this boolean is set, all the custom fields of a basket item are automatically copied to the custom fields of the OrderProduct object in the order.

Specified by:
setCopyBasketCustomFields in interface CreateOrderOptionsIf
Parameters:
copyBasketCustomFields - The copyBasketCustomFields to set.

isUseDefaultCustomer

public boolean isUseDefaultCustomer()
Description copied from interface: CreateOrderOptionsIf
This boolean is set so that an order can be created before a customer has logged in to the application. We may want to do this to calculate the order totals so that they can be displayed in the edit cart screen to give additional information to a customer such as shipping charges, discounts etc. Since we don't have the details of the customer, the address of a "default customer" is used. The default customer can be configured in the Admin App. When this boolean is set, the session parameter can be set to null.

Specified by:
isUseDefaultCustomer in interface CreateOrderOptionsIf
Returns:
Returns the useDefaultCustomer.

setUseDefaultCustomer

public void setUseDefaultCustomer(boolean useDefaultCustomer)
Description copied from interface: CreateOrderOptionsIf
This boolean is set so that an order can be created before a customer has logged in to the application. We may want to do this to calculate the order totals so that they can be displayed in the edit cart screen to give additional information to a customer such as shipping charges, discounts etc. Since we don't have the details of the customer, the address of a "default customer" is used. The default customer can be configured in the Admin App. When this boolean is set, the session parameter can be set to null.

Specified by:
setUseDefaultCustomer in interface CreateOrderOptionsIf
Parameters:
useDefaultCustomer - The useDefaultCustomer to set.

getCatalogId

public java.lang.String getCatalogId()
Description copied from interface: CreateOrderOptionsIf
The id of the catalog which contains dynamic product information such as the price and quantity

Specified by:
getCatalogId in interface CreateOrderOptionsIf
Returns:
the catalogId

setCatalogId

public void setCatalogId(java.lang.String catalogId)
Description copied from interface: CreateOrderOptionsIf
The id of the catalog which contains dynamic product information such as the price and quantity

Specified by:
setCatalogId in interface CreateOrderOptionsIf
Parameters:
catalogId - the catalogId to set

getPriceDate

public java.util.Calendar getPriceDate()
Description copied from interface: CreateOrderOptionsIf
The date for which a price is requested. It could be out in the future.

Specified by:
getPriceDate in interface CreateOrderOptionsIf
Returns:
the priceDate

setPriceDate

public void setPriceDate(java.util.Calendar priceDate)
Description copied from interface: CreateOrderOptionsIf
The date for which a price is requested. It could be out in the future.

Specified by:
setPriceDate in interface CreateOrderOptionsIf
Parameters:
priceDate - the priceDate to set

isUseWishListShippingAddr

public boolean isUseWishListShippingAddr()
Description copied from interface: CreateOrderOptionsIf
If any one of the basket items, has a valid wish list id, then we use the address of the wish list as the shipping address.

Specified by:
isUseWishListShippingAddr in interface CreateOrderOptionsIf
Returns:
the useWishListShippingAddr

setUseWishListShippingAddr

public void setUseWishListShippingAddr(boolean useWishListShippingAddr)
Description copied from interface: CreateOrderOptionsIf
If any one of the basket items, has a valid wish list id, then we use the address of the wish list as the shipping address.

Specified by:
setUseWishListShippingAddr in interface CreateOrderOptionsIf
Parameters:
useWishListShippingAddr - the useWishListShippingAddr to set

isUseExternalPrice

public boolean isUseExternalPrice()
Description copied from interface: CreateOrderOptionsIf
If true we attempt to fetch the prices from the external table

Specified by:
isUseExternalPrice in interface CreateOrderOptionsIf
Returns:
the useExternalPrice

setUseExternalPrice

public void setUseExternalPrice(boolean useExternalPrice)
Description copied from interface: CreateOrderOptionsIf
If true we attempt to fetch the prices from the external table

Specified by:
setUseExternalPrice in interface CreateOrderOptionsIf
Parameters:
useExternalPrice - the useExternalPrice to set

getLocale

public java.lang.String getLocale()
Locale of the customer

Specified by:
getLocale in interface CreateOrderOptionsIf
Returns:
the locale

setLocale

public void setLocale(java.lang.String locale)
Locale of the customer

Specified by:
setLocale in interface CreateOrderOptionsIf
Parameters:
locale - the locale to set

isUseExternalQuantity

public boolean isUseExternalQuantity()
Description copied from interface: CreateOrderOptionsIf
If true we attempt to fetch the quantities from the external table

Specified by:
isUseExternalQuantity in interface CreateOrderOptionsIf
Returns:
the useExternalQuantity

setUseExternalQuantity

public void setUseExternalQuantity(boolean useExternalQuantity)
Description copied from interface: CreateOrderOptionsIf
If true we attempt to fetch the quantities from the external table

Specified by:
setUseExternalQuantity in interface CreateOrderOptionsIf
Parameters:
useExternalQuantity - the useExternalQuantity to set

getBillingAddrId

public int getBillingAddrId()
Description copied from interface: CreateOrderOptionsIf
Id of billing address to use when creating the order. Overrides any other option that may conflict with this.

Specified by:
getBillingAddrId in interface CreateOrderOptionsIf
Returns:
the billingAddrId

setBillingAddrId

public void setBillingAddrId(int billingAddrId)
Description copied from interface: CreateOrderOptionsIf
Id of billing address to use when creating the order. Overrides any other option that may conflict with this.

Specified by:
setBillingAddrId in interface CreateOrderOptionsIf
Parameters:
billingAddrId - the billingAddrId to set

getCustomerAddrId

public int getCustomerAddrId()
Description copied from interface: CreateOrderOptionsIf
Id of customer address to use when creating the order. Overrides any other option that may conflict with this.

Specified by:
getCustomerAddrId in interface CreateOrderOptionsIf
Returns:
the customerAddrId

setCustomerAddrId

public void setCustomerAddrId(int customerAddrId)
Description copied from interface: CreateOrderOptionsIf
Id of customer address to use when creating the order. Overrides any other option that may conflict with this.

Specified by:
setCustomerAddrId in interface CreateOrderOptionsIf
Parameters:
customerAddrId - the customerAddrId to set

getDeliveryAddrId

public int getDeliveryAddrId()
Description copied from interface: CreateOrderOptionsIf
Id of delivery address to use when creating the order. Overrides any other option that may conflict with this.

Specified by:
getDeliveryAddrId in interface CreateOrderOptionsIf
Returns:
the deliveryAddrId

setDeliveryAddrId

public void setDeliveryAddrId(int deliveryAddrId)
Description copied from interface: CreateOrderOptionsIf
Id of delivery address to use when creating the order. Overrides any other option that may conflict with this.

Specified by:
setDeliveryAddrId in interface CreateOrderOptionsIf
Parameters:
deliveryAddrId - the deliveryAddrId to set


Copyright © 2011 DS Data Systems UK Ltd.