Back to project page openpizza-android.
The source code is released under:
MIT License
If you think the Android project openpizza-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.openpizza.android.ordermodul; /*from w ww . j a v a 2s . c om*/ import java.util.List; import android.app.Activity; import de.openpizza.android.service.data.DeliveryAddress; import de.openpizza.android.service.data.Product; public class OrderFacade { private static Order INSTANCE; private OrderFacade() { } public static void newOrder(int shopid, Activity context) { INSTANCE = new Order(shopid, context); } public static void sentProducts() { INSTANCE.sendProductList(); } public static void createOrder() { INSTANCE.createOrder(); } public static void fetchOrder(String id, Activity context) { INSTANCE = new Order(context); INSTANCE.fetchOrder(id); } public static void startPulling(Activity orderActivityHost) { INSTANCE.startPulling(orderActivityHost); } public static void addModeleChangedListener(ModelChangedListener mcl) { INSTANCE.addListener(mcl); } public static void removeAllListener() { INSTANCE.removeAllListener(); } public static void addProduct(Product product, Integer quantity) { INSTANCE.addProduct(product, quantity); } public static void setNickname(String nickname) { INSTANCE.setNickname(nickname); } public static List<Product> getProductList() { return INSTANCE.getProductList(); } public static void sendOrderFinal(DeliveryAddress address, ModelChangedListener mcl) { INSTANCE.sendOrderFinal(address, mcl); } }