Examples of Pizza


Examples of com.bazaarvoice.auth.hmac.sample.Pizza

    @GET
    public Pizza get(@HmacAuth String principal) {
        log.info("Pizza requested by: " + principal);

        Pizza pizza = new Pizza();
        pizza.setSize("medium");
        pizza.setToppings(Arrays.asList("cheese", "olives"));
        return pizza;
    }
View Full Code Here

Examples of com.bazaarvoice.auth.hmac.sample.Pizza

    private static final String SECRET_KEY = "fred-secret-key";

    public static void main(String[] args) throws Exception {
        // Get a pizza
        PizzaClient pizzaClient = new PizzaClient(ENDPOINT, API_KEY, SECRET_KEY);
        Pizza pizza = pizzaClient.getPizza();

        // Print out the results
        System.out.printf("Pizza is size '%s' with toppings: %s%n",
                pizza.getSize(),
                Joiner.on(", ").join(pizza.getToppings()));
    }
View Full Code Here

Examples of com.hotmoka.examples.patterns.factory.Pizza

public class Main {

  public static void main(String[] args) {
    NYPizzaFactory nyStrategy = new NYPizzaFactory();
    PizzaChainStore alPacino = new PizzaChainStore(nyStrategy);
    Pizza cheese1 = alPacino.orderPizza("cheese");

    ChicagoPizzaFactory chicagoStrategy = new ChicagoPizzaFactory();
    PizzaChainStore venezia = new PizzaChainStore(chicagoStrategy);
    Pizza cheese2 = venezia.orderPizza("cheese");

    System.out.println("This is what you eat in NY when you order a cheese pizza:");
    System.out.println(cheese1);

    System.out.println("\nwhile you would eat this in Chicago instead:");
View Full Code Here

Examples of com.visionarysoftwaresolutions.hfdpch4.tddstyle.pizzas.Pizza

import com.visionarysoftwaresolutions.hfdpch4.tddstyle.pizzas.VeggiePizza;

public class ChicagoPizzaStore extends PizzaStore {

  protected Pizza createPizza(String item) {
    Pizza pizza = null;
    PizzaIngredientFactory ingredientFactory =
    new ChicagoPizzaIngredientFactory();

    if (item.equals("cheese")) {

      pizza = new CheesePizza(ingredientFactory);
      pizza.setName("Chicago Style Cheese Pizza");

    } else if (item.equals("veggie")) {

      pizza = new VeggiePizza(ingredientFactory);
      pizza.setName("Chicago Style Veggie Pizza");

    } else if (item.equals("clam")) {

      pizza = new ClamPizza(ingredientFactory);
      pizza.setName("Chicago Style Clam Pizza");

    } else if (item.equals("pepperoni")) {

      pizza = new PepperoniPizza(ingredientFactory);
      pizza.setName("Chicago Style Pepperoni Pizza");

    }
    return pizza;
  }
View Full Code Here

Examples of com.visionarysoftwaresolutions.hfdpch4.tddstyle.pizzas.Pizza

import com.visionarysoftwaresolutions.hfdpch4.tddstyle.pizzas.VeggiePizza;

public class NYPizzaStore extends PizzaStore {
  protected Pizza createPizza(String item) {
    Pizza pizza = null;
    PizzaIngredientFactory ingredientFactory = new NYPizzaIngredientFactory();
    if (item.equals("cheese")) {
 
      pizza = new CheesePizza(ingredientFactory);
      pizza.setName("New York Style Cheese Pizza");
 
    } else if (item.equals("veggie")) {
      pizza = new VeggiePizza(ingredientFactory);
      pizza.setName("New York Style Veggie Pizza");
    } else if (item.equals("clam")) {
      pizza = new ClamPizza(ingredientFactory);
      pizza.setName("New York Style Clam Pizza");
    } else if (item.equals("pepperoni")) {

      pizza = new PepperoniPizza(ingredientFactory);
      pizza.setName("New York Style Pepperoni Pizza");
    }
    return pizza;
  }
View Full Code Here

Examples of com.visionarysoftwaresolutions.hfdpch4.tddstyle.pizzas.Pizza

  public static void main(String[] args) {
    PizzaStore nyStore = new NYPizzaStore();
    PizzaStore chicagoStore = new ChicagoPizzaStore();
    Pizza pizza = nyStore.orderPizza("cheese");
    System.out.println("Ethan ordered a " + pizza + "\n");
    pizza = chicagoStore.orderPizza("cheese");
    System.out.println("Joel ordered a " + pizza + "\n");
View Full Code Here

Examples of nz.co.elysium.core.Pizza

    public void setUp() throws Exception {
        // set up
        t1 = new Topping(1, "Cheese");
        t2 = new Topping(2, "Ham");
        t3 = new Topping(3, "Pineapple");
        pizza = new Pizza(3, "PizzaOne", (long)1000);
        pizza.addTopping(t1);
        pizza.addTopping(t2);
    }
View Full Code Here

Examples of nz.co.elysium.core.Pizza

    @GET
    @Timed
    @Path("{id}")
    public Pizza getPizza(@PathParam("id") int id) {
        Pizza p = dao.selectById(id);
        injectToppings(p);
        return p;
    }
View Full Code Here

Examples of nz.co.elysium.core.Pizza

    @POST
    @Timed
    @Path("{id}/toppings")
    public Pizza addTopping(@PathParam("id") int id,
                            @QueryParam("topping_id") int topping_id) {
        Pizza p = dao.selectById(id);
        dao.insertTopping(id, topping_id);
        injectToppings(p);
        return p;
    }
View Full Code Here

Examples of nz.co.elysium.core.Pizza

    @DELETE
    @Timed
    @Path("{id}/toppings/{topping_id}")
    public Pizza deleteTopping(@PathParam("id") int id,
                               @PathParam("topping_id") int topping_id) {
        Pizza p = dao.selectById(id);
        dao.deleteTopping(id, topping_id);
        injectToppings(p);
        return p;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.