@Test public void testGetDrugPuchaseOrderByUuid() throws Exception { String uuid = "68547121-1b70-465c-99ee-c9dfd95e7d41"; String result = controller.getDrugPuchaseOrderByUuid(uuid, request); SimpleObject dI = SimpleObject.parseJson(result); Assert.assertNotNull(result); assertEquals(uuid, dI.get("uuid")); }
@RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets DrugPurchaseOrder for the uuid path") @ResponseBody() public String getDrugPuchaseOrderByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initDrugPurchaseOrderController(); DrugPurchaseOrder drugOrder = service.getDrugPurchaseOrderByUuid(uuid); SimpleObject obj = this.getFieldsFromDrugPurchaseOrder(drugOrder); return gson.toJson(obj); }
DrugPurchaseOrderController extends BaseRestController { @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets DrugPurchaseOrder for the uuid path") @ResponseBody() public String getDrugPuchaseOrderByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initDrugPurchaseOrderController(); DrugPurchaseOrder drugOrder = service.getDrugPurchaseOrderByUuid(uuid); SimpleObject obj = this.getFieldsFromDrugPurchaseOrder(drugOrder); return gson.toJson(obj); } }
DrugPurchaseOrderController extends BaseRestController { @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets DrugPurchaseOrder for the uuid path") @ResponseBody() public String getDrugPuchaseOrderByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initDrugPurchaseOrderController(); DrugPurchaseOrder drugOrder = service.getDrugPurchaseOrderByUuid(uuid); SimpleObject obj = this.getFieldsFromDrugPurchaseOrder(drugOrder); return gson.toJson(obj); }  }
DrugPurchaseOrderController extends BaseRestController { @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets DrugPurchaseOrder for the uuid path") @ResponseBody() public String getDrugPuchaseOrderByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initDrugPurchaseOrderController(); DrugPurchaseOrder drugOrder = service.getDrugPurchaseOrderByUuid(uuid); SimpleObject obj = this.getFieldsFromDrugPurchaseOrder(drugOrder); return gson.toJson(obj); }  void initDrugPurchaseOrderController(); @RequestMapping(method = RequestMethod.POST) @WSDoc("Save New DrugPurchaseOrder") @ResponseBody Object createNewDrugPurchaseOrder(@RequestBody SimpleObject post, HttpServletRequest request,
	        HttpServletResponse response); @RequestMapping(value = "/{uuid}", method = RequestMethod.POST) @WSDoc("Updates an existing purchase order") @ResponseBody Object updateDrugPurchaseOrder(@PathVariable("uuid") String uuid, @RequestBody SimpleObject post,
	        HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets DrugPurchaseOrder for the uuid path") @ResponseBody() String getDrugPuchaseOrderByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request); DrugPurchaseOrder setPostFields(SimpleObject post, DrugPurchaseOrder purchaseOrder); @RequestMapping(method = RequestMethod.GET) @WSDoc("Get All Unretired Drug Purchase Orders in the system") @ResponseBody() String getAllDrugPurchaseOrders(HttpServletRequest request, HttpServletResponse response); @RequestMapping(method = RequestMethod.GET, params = "stockLocation") @WSDoc("Fetch all non-retired drug purchase orders according to stockLocation") @ResponseBody() String searchByStockLocation(@RequestParam("stockLocation") String stockLocation, HttpServletRequest request); }
DrugPurchaseOrderController extends BaseRestController { @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets DrugPurchaseOrder for the uuid path") @ResponseBody() public String getDrugPuchaseOrderByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initDrugPurchaseOrderController(); DrugPurchaseOrder drugOrder = service.getDrugPurchaseOrderByUuid(uuid); SimpleObject obj = this.getFieldsFromDrugPurchaseOrder(drugOrder); return gson.toJson(obj); }  void initDrugPurchaseOrderController(); @RequestMapping(method = RequestMethod.POST) @WSDoc("Save New DrugPurchaseOrder") @ResponseBody Object createNewDrugPurchaseOrder(@RequestBody SimpleObject post, HttpServletRequest request,
	        HttpServletResponse response); @RequestMapping(value = "/{uuid}", method = RequestMethod.POST) @WSDoc("Updates an existing purchase order") @ResponseBody Object updateDrugPurchaseOrder(@PathVariable("uuid") String uuid, @RequestBody SimpleObject post,
	        HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets DrugPurchaseOrder for the uuid path") @ResponseBody() String getDrugPuchaseOrderByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request); DrugPurchaseOrder setPostFields(SimpleObject post, DrugPurchaseOrder purchaseOrder); @RequestMapping(method = RequestMethod.GET) @WSDoc("Get All Unretired Drug Purchase Orders in the system") @ResponseBody() String getAllDrugPurchaseOrders(HttpServletRequest request, HttpServletResponse response); @RequestMapping(method = RequestMethod.GET, params = "stockLocation") @WSDoc("Fetch all non-retired drug purchase orders according to stockLocation") @ResponseBody() String searchByStockLocation(@RequestParam("stockLocation") String stockLocation, HttpServletRequest request);  }