Package com.bookstore.domain.model

Examples of com.bookstore.domain.model.Link


   * Sets all the links appropriately, for each kind of representation based on state
   * @param orderRep
   */
  private void setLinks(BookRepresentation bookRep, String orderId) {
    // Set up the activities that can be performed on orders
    Link buy = new Link("buy", "http://localhost:8080/COMP433_-_Project_4/services/bookstore/order?book_id=" + bookRep.getId());
   
    bookRep.setLinks(buy);
  }
View Full Code Here


   * Sets all the links appropriately, for each kind of representation based on state
   * @param orderRep
   */
  private void setLinks(OrderRepresentation orderRep) {
    // Set up the activities that can be performed on orders
    Link confirm = new Link("confirm", "http://localhost:8080/COMP433_-_Project_4/services/bookstore/order/" + orderRep.getId());
    Link pay = new Link("pay", "http://localhost:8080/COMP433_-_Project_4/services/bookstore/order/" + orderRep.getId());
    Link ship = new Link("ship", "http://localhost:8080/COMP433_-_Project_4/services/bookstore/order/" + orderRep.getId());
    Link deliver = new Link("deliver", "http://localhost:8080/COMP433_-_Project_4/services/bookstore/order/" + orderRep.getId());
    Link cancel = new Link("cancel", "http://localhost:8080/COMP433_-_Project_4/services/bookstore/order/" + orderRep.getId());
   
    switch (orderRep.getOrderState()) {
    case "Open":
      if (orderRep.isPaymentReceived())
        orderRep.setLinks(confirm, cancel);
View Full Code Here

TOP

Related Classes of com.bookstore.domain.model.Link

Copyright © 2018 www.massapicom. 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.