import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
import org.springframework.web.bind.annotation.PathVariable;\r
import org.springframework.web.bind.annotation.RequestMapping;\r
+import org.springframework.web.bind.annotation.GetMapping;\r
import org.springframework.web.bind.annotation.RequestMethod;\r
import org.springframework.web.bind.annotation.RequestParam;\r
import org.springframework.web.bind.annotation.RestController;\r
* test commit\r
* @throws ParseException \r
*/\r
- @RequestMapping(value = {"/alarm/{currentPage}/{pageSize}"}, method = RequestMethod.GET,\r
+ @GetMapping(value = {"/alarm/{currentPage}/{pageSize}"},\r
produces = "application/json")\r
public String getAlarmData(@RequestParam(required = false) String sourceName,\r
@RequestParam(required = false) String priority, @RequestParam(required = false) String startTime,\r
}\r
}\r
\r
- @RequestMapping(value = {"/alarm/sourceId"},method = RequestMethod.GET)\r
+ @GetMapping(value = {"/alarm/sourceId"})\r
public String getSourceId() throws JsonProcessingException{\r
List<String> sourceIds = new ArrayList<>();\r
Page page = alarmsHeaderService.queryAlarmsHeader(new AlarmsHeader(), 1, Integer.MAX_VALUE);\r
return omAlarm.writeValueAsString(sourceIds);\r
}\r
\r
- @RequestMapping(value = {"/alarm/getSourceNames"},method = RequestMethod.GET,produces = "application/json")\r
+ @GetMapping(value = {"/alarm/getSourceNames"},produces = "application/json")\r
public String getSourceNames() throws JsonProcessingException{\r
Set<String> sourceNames = new HashSet<>();\r
Page<AlarmsHeader> page = alarmsHeaderService.queryAlarmsHeader(new AlarmsHeader(), 1, Integer.MAX_VALUE);\r
return omAlarm.writeValueAsString(sourceNames);\r
}\r
\r
- @RequestMapping(value = {"/alarm/diagram"},method = RequestMethod.GET,produces = "application/json")\r
+ @GetMapping(value = {"/alarm/diagram"},produces = "application/json")\r
public String diagram(@RequestParam String sourceName, @RequestParam(required = false) String startTime,\r
@RequestParam(required = false) String endTime, @RequestParam String format) {\r
long timeInterval = 0;\r
return result;\r
}\r
\r
- @RequestMapping(value = "/alarm/statusCount", method = RequestMethod.GET, produces = "application/json")\r
+ @GetMapping(value = "/alarm/statusCount", produces = "application/json")\r
public String getStatusCount() throws JsonProcessingException {\r
List<String> statusCount = new ArrayList<>();\r
\r
return string;\r
}\r
\r
- @RequestMapping(value="/listSortMasters",method=RequestMethod.GET,produces = "application/json;charset=utf8")\r
+ @GetMapping(value="/listSortMasters",produces = "application/json;charset=utf8")\r
public String getSortMasterInfo() throws JsonProcessingException{\r
Map<String,List<SortMaster>> map = new HashMap<>();\r
List<SortMaster> operationTypes = alarmsHeaderService.listSortMasters("operationType");\r
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
private ObjectMapper omPerformance = new ObjectMapper();
- @RequestMapping(value = {"/performance/{currentPage}/{pageSize}"},method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {"/performance/{currentPage}/{pageSize}"}, produces = "application/json")
public String getPerformanceData(@PathVariable String currentPage,
@PathVariable String pageSize,
@RequestParam(required = false) String sourceName,
}
}
- @RequestMapping(value = {"/performance/queryAllSourceNames"},method = RequestMethod.GET)
+ @GetMapping(value = {"/performance/queryAllSourceNames"})
public String getSourceIds(){
try {
return omPerformance.writeValueAsString(performanceHeaderService.queryAllSourceNames());
return string;
}
- @RequestMapping(value = {"/performance/getSourceNames/{currentPage}/{pageSize}"},method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = {"/performance/getSourceNames/{currentPage}/{pageSize}"}, produces = "application/json")
public String getPerformanceSourceNames(@PathVariable String currentPage,@PathVariable String pageSize,
@RequestParam(required = false) String sourceName) throws JsonProcessingException{
PerformanceHeader performanceHeader = new PerformanceHeader.PerformanceHeaderBuilder().createPerformanceHeader();
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/customers"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/customers"} , produces = "application/json")
public List<AAICustomer> getCustomers(){
return customerService.listCustomer();
}
@ResponseBody
- @RequestMapping(value={"/uui-lcm/customers/{customerId}"},method = RequestMethod.PUT,produces="application/json")
+ @PutMapping(value={"/uui-lcm/customers/{customerId}"},produces="application/json")
public JSONObject createOrUpdateCustomer(HttpServletRequest request,@PathVariable String customerId){
return customerService.createOrUpdateCustomer(request, customerId);
}
@ResponseBody
- @RequestMapping(value={"/uui-lcm/customers/{customerId}"},method = RequestMethod.GET,produces="application/json")
+ @GetMapping(value={"/uui-lcm/customers/{customerId}"},produces="application/json")
public JSONObject getCustomerById(@PathVariable String customerId){
return customerService.getCustomerById(customerId);
}
@ResponseBody
- @RequestMapping(value={"/uui-lcm/customers"},method = RequestMethod.DELETE,produces="application/json")
+ @DeleteMapping(value={"/uui-lcm/customers"},produces="application/json")
public JSONObject deleteCustomer(@RequestParam String customerId,@RequestParam String resourceVersion){
return customerService.deleteCustomer(customerId,resourceVersion);
}
@ResponseBody
- @RequestMapping(value = {"/uui-lcm/customers/{customerId}/service-subscriptions"}, method = RequestMethod.GET , produces = "application/json")
+ @GetMapping(value = {"/uui-lcm/customers/{customerId}/service-subscriptions"} , produces = "application/json")
public List<AAIServiceSubscription> getServiceSubscriptions(@PathVariable(value="customerId") String customerId){
return customerService.listServiceSubscriptions(customerId);
}
@ResponseBody
- @RequestMapping(value={"/uui-lcm/customers/{customerId}/service-subscriptions/{serviceType}"},method = RequestMethod.PUT,produces="application/json")
+ @PutMapping(value={"/uui-lcm/customers/{customerId}/service-subscriptions/{serviceType}"},produces="application/json")
public JSONObject createOrUpdateServiceType(HttpServletRequest request,@PathVariable String serviceType,@PathVariable String customerId){
return customerService.createOrUpdateServiceType(request, serviceType,customerId);
}
@ResponseBody
- @RequestMapping(value={"/uui-lcm/customers/{customerId}/service-subscriptions/{serviceType}"},method = RequestMethod.DELETE,produces="application/json")
+ @DeleteMapping(value={"/uui-lcm/customers/{customerId}/service-subscriptions/{serviceType}"},produces="application/json")
public JSONObject deleteServiceType(@PathVariable String customerId,@PathVariable String serviceType,@RequestParam String resourceVersion){
return customerService.deleteServiceType(customerId,serviceType,resourceVersion);
}
@ResponseBody
- @RequestMapping(value={"/uui-lcm/customers/{customerId}/service-subscriptions/{serviceType}"},method = RequestMethod.GET,produces="application/json")
+ @GetMapping(value={"/uui-lcm/customers/{customerId}/service-subscriptions/{serviceType}"}, produces="application/json")
public JSONObject getServiceTypeById(@PathVariable String customerId,@PathVariable String serviceType){
return customerService.getServiceTypeById(customerId,serviceType);
}