@CrossOrigin
@RestController
@RequestMapping(value="/metric")
public class MetricRestController
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) BusApprovedElementInterface |
busApprovedElementRepository |
private MetricCRUDInterface |
metricCRUDController |
Constructor and Description |
---|
MetricRestController() |
Modifier and Type | Method and Description |
---|---|
org.springframework.http.ResponseEntity<MetricCrudDTO> |
deleteMetricDTO(java.lang.String id) |
org.springframework.http.ResponseEntity<MetricCrudDTO> |
getCountMetricDTOByState(java.lang.String state,
java.lang.String userId) |
org.springframework.http.ResponseEntity<MetricCrudDTO> |
getMetricDTO(java.lang.String id,
java.lang.String version,
java.lang.String userId,
java.lang.String approved,
java.lang.String state) |
org.springframework.http.ResponseEntity<MetricCrudDTO> |
postMeasurementGoalDTO(MetricDTO dto) |
org.springframework.http.ResponseEntity<MetricCrudDTO> |
putMetricDTO(MetricDTO dto,
java.lang.String onlyChangeState)
This method implements Put interface for Metrics.
|
@Autowired private MetricCRUDInterface metricCRUDController
@Autowired BusApprovedElementInterface busApprovedElementRepository
@RequestMapping(method=GET) public org.springframework.http.ResponseEntity<MetricCrudDTO> getMetricDTO(@RequestParam(value="id",defaultValue="NA") java.lang.String id, @RequestParam(value="version",defaultValue="NA") java.lang.String version, @RequestParam(value="userid",defaultValue="NA") java.lang.String userId, @RequestParam(value="approved",defaultValue="false") java.lang.String approved, @RequestParam(value="state",defaultValue="NA") java.lang.String state)
@RequestMapping(method=DELETE) public org.springframework.http.ResponseEntity<MetricCrudDTO> deleteMetricDTO(@RequestParam java.lang.String id)
@RequestMapping(method=PUT) public org.springframework.http.ResponseEntity<MetricCrudDTO> putMetricDTO(@RequestBody MetricDTO dto, @RequestParam(value="onlychangestate",defaultValue="false") java.lang.String onlyChangeState)
dto
- metricDTO filledonlyChangeState
- it's a boolean@RequestMapping(method=POST) public org.springframework.http.ResponseEntity<MetricCrudDTO> postMeasurementGoalDTO(@RequestBody MetricDTO dto)
@RequestMapping(value="/count", method=GET) public org.springframework.http.ResponseEntity<MetricCrudDTO> getCountMetricDTOByState(@RequestParam(value="state") java.lang.String state, @RequestParam(value="userid") java.lang.String userId)