@Test public void shouldGetAll() throws Exception { controller.getAll(); verify(service).getAll(); }
@RequestMapping(value="list",method= GET, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')" + " or @permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_INVENTORY')") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response("energy_types",service.getAll()); }
EquipmentEnergyTypeController extends BaseController { @RequestMapping(value="list",method= GET, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')" + " or @permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_INVENTORY')") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response("energy_types",service.getAll()); } }
EquipmentEnergyTypeController extends BaseController { @RequestMapping(value="list",method= GET, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')" + " or @permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_INVENTORY')") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response("energy_types",service.getAll()); }  }
EquipmentEnergyTypeController extends BaseController { @RequestMapping(value="list",method= GET, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')" + " or @permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_INVENTORY')") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response("energy_types",service.getAll()); }  @RequestMapping(value="list",method= GET, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')" + " or @permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_INVENTORY')") ResponseEntity<OpenLmisResponse> getAll(); @RequestMapping(value = "save", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')") ResponseEntity<OpenLmisResponse> save(@RequestBody EquipmentEnergyType energyType); @RequestMapping(method = GET, value = "{id}") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')") ResponseEntity<OpenLmisResponse> getById(@PathVariable(value="id") Long id); }
EquipmentEnergyTypeController extends BaseController { @RequestMapping(value="list",method= GET, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')" + " or @permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_INVENTORY')") public ResponseEntity<OpenLmisResponse> getAll(){ return OpenLmisResponse.response("energy_types",service.getAll()); }  @RequestMapping(value="list",method= GET, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')" + " or @permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_INVENTORY')") ResponseEntity<OpenLmisResponse> getAll(); @RequestMapping(value = "save", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')") ResponseEntity<OpenLmisResponse> save(@RequestBody EquipmentEnergyType energyType); @RequestMapping(method = GET, value = "{id}") @PreAuthorize("@permissionEvaluator.hasPermission(principal,'MANAGE_EQUIPMENT_SETTINGS')") ResponseEntity<OpenLmisResponse> getById(@PathVariable(value="id") Long id);  }