@Test public void shouldFetchColumnsForRnr() throws Exception { long programId = 1L; rnrTemplateController.fetchColumnsForRequisition(programId); verify(rnrTemplateService).fetchColumnsForRequisition(1L); }
@RequestMapping(value = "/rnr/{programId}/columns", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CREATE_REQUISITION, AUTHORIZE_REQUISITION, APPROVE_REQUISITION, VIEW_REQUISITION')") public List<RnrColumn> fetchColumnsForRequisition(@PathVariable("programId") Long programId) { return rnrTemplateService.fetchColumnsForRequisition(programId); }
RnrTemplateController extends BaseController { @RequestMapping(value = "/rnr/{programId}/columns", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CREATE_REQUISITION, AUTHORIZE_REQUISITION, APPROVE_REQUISITION, VIEW_REQUISITION')") public List<RnrColumn> fetchColumnsForRequisition(@PathVariable("programId") Long programId) { return rnrTemplateService.fetchColumnsForRequisition(programId); } }
RnrTemplateController extends BaseController { @RequestMapping(value = "/rnr/{programId}/columns", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CREATE_REQUISITION, AUTHORIZE_REQUISITION, APPROVE_REQUISITION, VIEW_REQUISITION')") public List<RnrColumn> fetchColumnsForRequisition(@PathVariable("programId") Long programId) { return rnrTemplateService.fetchColumnsForRequisition(programId); }  }
RnrTemplateController extends BaseController { @RequestMapping(value = "/rnr/{programId}/columns", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CREATE_REQUISITION, AUTHORIZE_REQUISITION, APPROVE_REQUISITION, VIEW_REQUISITION')") public List<RnrColumn> fetchColumnsForRequisition(@PathVariable("programId") Long programId) { return rnrTemplateService.fetchColumnsForRequisition(programId); }  @RequestMapping(value = "/program/{programId}/rnr-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CONFIGURE_RNR')") RnrTemplateForm fetchAllProgramRnrColumnList(@PathVariable("programId") Long programId); @RequestMapping(value = "/rnr/{programId}/columns", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CREATE_REQUISITION, AUTHORIZE_REQUISITION, APPROVE_REQUISITION, VIEW_REQUISITION')") List<RnrColumn> fetchColumnsForRequisition(@PathVariable("programId") Long programId); @RequestMapping(value = "/program/{programId}/rnr-template", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CONFIGURE_RNR')") ResponseEntity<OpenLmisResponse> saveRnRTemplateForProgram(@PathVariable("programId") Long programId,
                                                                    @RequestBody RnrColumnList rnrColumnList,
                                                                    HttpServletRequest request); }
RnrTemplateController extends BaseController { @RequestMapping(value = "/rnr/{programId}/columns", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CREATE_REQUISITION, AUTHORIZE_REQUISITION, APPROVE_REQUISITION, VIEW_REQUISITION')") public List<RnrColumn> fetchColumnsForRequisition(@PathVariable("programId") Long programId) { return rnrTemplateService.fetchColumnsForRequisition(programId); }  @RequestMapping(value = "/program/{programId}/rnr-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CONFIGURE_RNR')") RnrTemplateForm fetchAllProgramRnrColumnList(@PathVariable("programId") Long programId); @RequestMapping(value = "/rnr/{programId}/columns", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CREATE_REQUISITION, AUTHORIZE_REQUISITION, APPROVE_REQUISITION, VIEW_REQUISITION')") List<RnrColumn> fetchColumnsForRequisition(@PathVariable("programId") Long programId); @RequestMapping(value = "/program/{programId}/rnr-template", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'CONFIGURE_RNR')") ResponseEntity<OpenLmisResponse> saveRnRTemplateForProgram(@PathVariable("programId") Long programId,
                                                                    @RequestBody RnrColumnList rnrColumnList,
                                                                    HttpServletRequest request); static final String RNR_TEMPLATE_SAVE_SUCCESS; }