Class InterventionOutcomeService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.execution.rs1.interventionoutcome.InterventionOutcomeService
@RestController
@RequestMapping("work-orders/execution/r1/interventions/{interventionId:[0-9]+}/outcomes")
@Resource(logging=true)
public class InterventionOutcomeService
extends PrivateService
Services to manage intervention outcomes.
- Since:
- 18.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOInterventionOutcome> get(Long interventionId, Long outcomeId, Collection<String> fields) Retrieves the required agenda outcome by calling from theInterventionOutcomeLoadEvent.org.springframework.http.ResponseEntity<Void> patch(Long interventionId, Long outcomeId, @Valid DTOInterventionOutcomeUpdate dto) Updates the required intervention outcome by calling theInterventionOutcomeUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long interventionId, @Valid DTOInterventionOutcomeInsert dto) Creates a new intervention outcome by calling from theInterventionOutcomeSaveEvent.
-
Constructor Details
-
InterventionOutcomeService
public InterventionOutcomeService()
-
-
Method Details
-
get
@GetMapping(value="{outcomeId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOInterventionOutcome> get(@PathVariable("interventionId") Long interventionId, @PathVariable("outcomeId") Long outcomeId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required agenda outcome by calling from theInterventionOutcomeLoadEvent.- Parameters:
interventionId- the intervention idoutcomeId- the outcome idfields- the collection of fields that will be contained in the response- Returns:
- the response containing the loaded agenda outcome
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@PathVariable("interventionId") Long interventionId, @Valid @RequestBody @Valid DTOInterventionOutcomeInsert dto) throws DAValidateException, DAException Creates a new intervention outcome by calling from theInterventionOutcomeSaveEvent.- Parameters:
interventionId- the intervention iddto- theDTOInterventionOutcomeInsert- Returns:
- the response containing the ID of the newly created intervention outcome
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{outcomeId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("interventionId") Long interventionId, @PathVariable("outcomeId") Long outcomeId, @RequestBody @Valid @Valid DTOInterventionOutcomeUpdate dto) throws DAValidateException, DAException Updates the required intervention outcome by calling theInterventionOutcomeUpdateEvent.- Parameters:
interventionId- the intervention iddto- theDTOInterventionOutcomeUpdate- Returns:
- the standard empty response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-