Class InterventionService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.execution.rs1.intervention.InterventionService
@RestController
@RequestMapping("work-orders/execution/r1/interventions")
@Resource(logging=true)
public class InterventionService
extends PrivateService
Service for manage intervention.
- Since:
- 18.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> arriveOnSite(Long interventionId, @Valid DTOInterventionArrivalOnSite dto) Arrival at the site of an intervention by calling theInterventionArrivalOnSiteEventorg.springframework.http.ResponseEntity<DTOIntervention> get(Long interventionId, Collection<String> fields) Retrieves the required intervention by calling from theInterventionLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOIntervention>> getCollection(@Valid Page page, Collection<String> fields, String order, @Valid @NotNull DTOInterventionFilter filter) Returns the collection of all the stored interventions by calling theInterventionSearchEvent.org.springframework.http.ResponseEntity<Void> startIntervention(Long interventionId, @Valid DTOInterventionStart dto) Start an intervention by calling theInterventionStartEventorg.springframework.http.ResponseEntity<Void> takeInCharge(Long interventionId, @Valid DTOInterventionTakeInCharge dto) Takes in charge an intervention by calling theInterventionTakeInChargeEvent
-
Constructor Details
-
InterventionService
public InterventionService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOIntervention>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @NotNull @Valid @NotNull DTOInterventionFilter filter) throws DAValidateException, DAException Returns the collection of all the stored interventions by calling theInterventionSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields that will be contained in the responseorder- the ordering fieldfilter- theDTOInterventionFilter- Returns:
- the collection of interventions
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{interventionId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOIntervention> get(@PathVariable("interventionId") Long interventionId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required intervention by calling from theInterventionLoadEvent.- Parameters:
interventionId- the intervention idfields- the collection of fields that will be contained in the response- Returns:
- the response containing the loaded intervention
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
takeInCharge
@PostMapping(value="{interventionId:[0-9]+}/taking-charge", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> takeInCharge(@PathVariable("interventionId") Long interventionId, @Valid @RequestBody @Valid DTOInterventionTakeInCharge dto) throws DAValidateException, DAException Takes in charge an intervention by calling theInterventionTakeInChargeEvent- Parameters:
interventionId- the ID of the interventiondto- theDTOInterventionTakeInCharge- Returns:
- a ResponseEntity with an HTTP status code of CREATED and an empty body if the intervention is successfully taken in charge
- Throws:
DAValidateException- if validation failsDAException- if an exception occurs during the process
-
arriveOnSite
@PostMapping(value="{interventionId:[0-9]+}/arrival-on-site", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> arriveOnSite(@PathVariable("interventionId") Long interventionId, @Valid @RequestBody @Valid DTOInterventionArrivalOnSite dto) throws DAValidateException, DAException Arrival at the site of an intervention by calling theInterventionArrivalOnSiteEvent- Parameters:
interventionId- the ID of the interventiondto- theDTOInterventionArrivalOnSite- Returns:
- a ResponseEntity with an HTTP status code of CREATED and an empty body if the intervention is successfully arrive on site
- Throws:
DAValidateException- if validation failsDAException- if an exception occurs during the process
-
startIntervention
@PostMapping(value="{interventionId:[0-9]+}/intervention-start", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> startIntervention(@PathVariable("interventionId") Long interventionId, @Valid @RequestBody @Valid DTOInterventionStart dto) throws DAValidateException, DAException Start an intervention by calling theInterventionStartEvent- Parameters:
interventionId- the ID of the interventiondto- theDTOInterventionStart- Returns:
- a ResponseEntity with an HTTP status code of CREATED and an empty body if the intervention is successfully start intervention
- Throws:
DAValidateException- if validation failsDAException- if an exception occurs during the process
-