01: /*
02: * Created on Jan 17, 2005
03: */
04: package org.openedit.store.orders;
05:
06: import java.text.DateFormat;
07: import java.util.Locale;
08:
09: import org.openedit.money.Money;
10:
11: /**
12: * @author dbrown
13: *
14: */
15: public class SubmittedOrder extends Order {
16: protected Money fieldShippingCost;
17: protected String fieldDateOrdered; //formated version of the date
18:
19: public SubmittedOrder() {
20: }
21:
22: public Money getShippingCost() {
23: return fieldShippingCost;
24: }
25:
26: public void setShippingCost(Money inShippingCost) {
27: fieldShippingCost = inShippingCost;
28: }
29:
30: public String getDateOrdered() {
31: return fieldDateOrdered;
32: }
33:
34: public void setDateOrdered(String inDateOrdered) {
35: fieldDateOrdered = inDateOrdered;
36: }
37:
38: public String getShortDateOrdered() {
39: if (fieldDate != null) {
40: return DateFormat.getDateInstance(DateFormat.SHORT,
41: Locale.getDefault()).format(fieldDate);
42: }
43: return "";
44: }
45: /*
46: public List getPurchasedItems()
47: {
48: if (fieldPurchasedItems == null)
49: {
50: fieldPurchasedItems = new ArrayList();
51: }
52: return fieldPurchasedItems;
53: }
54:
55:
56: public String getOrderStatus()
57: {
58: if (fieldOrderStatus == null)
59: {
60: return "accepted";
61: }
62: return fieldOrderStatus;
63: }
64:
65: public void setOrderStatus(String inOrderStatus)
66: {
67: fieldOrderStatus = inOrderStatus;
68: }
69:
70: public List getStatusOptions()
71: {
72: List list = new ArrayList();
73: list.add("accepted");
74: list.add("completed");
75: list.add("invalid");
76: list.add("retracted");
77: list.add("waiting for payment");
78: return list;
79: }
80: */
81:
82: }
|