java.lang.Object
com.prog3.ipt.Model.CitizenClasses.ObservableSingleton
ObersvableSingleton is a class that implements Observer Method design pattern variant with addition
of Singleton Method design pattern
-
Field Summary
Modifier and TypeFieldDescriptionprivate static String
private static Order
private static PaymentMethodStrategy
private static Citizen
-
Constructor Summary
ModifierConstructorDescriptionprivate
Protect against instantiation via reflection -
Method Summary
Modifier and TypeMethodDescriptionstatic Citizen
The instance doesn't get created until the method is called for the first time.static Order
getOrder()
static PaymentMethodStrategy
The instance doesn't get created until the method is called for the first time.static String
static void
setCitizen
(Citizen newUser) static void
setCitizenID
(String citizenID) static void
static void
setPaymentMethodStrategy
(PaymentMethodStrategy newPaymentMethodStrategy) static void
setPaymentMethodString
(String paymentMethodString) static void
static void
updateOrder
(LocalDate purchaseDate, double purchasePrice, String citizenID, PaymentMethodStrategy paymentMethodStrategy, ArrayList<TravelDocument> purchaseList, javafx.collections.ObservableList<TravelDocumentFX> observableList) static void
updateOrderWithOrderID
(String orderID, LocalDate purchaseDate, double purchasePrice, String citizenID, PaymentMethodStrategy paymentMethodStrategy, ArrayList<TravelDocument> purchaseList, javafx.collections.ObservableList<TravelDocumentFX> observableList)
-
Field Details
-
sessionUser
-
sessionOrder
-
sessionPaymentMethodStrategy
-
paymentMethodString
-
-
Constructor Details
-
ObservableSingleton
private ObservableSingleton()Protect against instantiation via reflection
-
-
Method Details
-
setCitizenID
-
setCitizen
-
updateCitizen
-
getCitizen
The instance doesn't get created until the method is called for the first time. -
setOrder
-
updateOrder
public static void updateOrder(LocalDate purchaseDate, double purchasePrice, String citizenID, PaymentMethodStrategy paymentMethodStrategy, ArrayList<TravelDocument> purchaseList, javafx.collections.ObservableList<TravelDocumentFX> observableList) -
updateOrderWithOrderID
public static void updateOrderWithOrderID(String orderID, LocalDate purchaseDate, double purchasePrice, String citizenID, PaymentMethodStrategy paymentMethodStrategy, ArrayList<TravelDocument> purchaseList, javafx.collections.ObservableList<TravelDocumentFX> observableList) -
getOrder
-
setPaymentMethodStrategy
-
getPaymentMethodStrategy
The instance doesn't get created until the method is called for the first time. -
setPaymentMethodString
-
getPaymentMethodString
-