Class OutcomeReasonService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.core.rs5.schedule.intervention.outcome.reason.OutcomeReasonService
@RestController("OutcomeReasonService-legacy")
@RequestMapping("core/r5/planning/agendas/outcomes/reasons")
@Resource(logging=true)
public class OutcomeReasonService
extends PrivateService
Services to manage outcome reasons.
- Since:
- 19.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOOutcomeReason> Retrieves the required outcome reason.org.springframework.http.ResponseEntity<PageResponse<DTOOutcomeReason>> getCollection(@NotNull @Valid Page page, @Valid @NotNull DTOOutcomeReasonSearchFilter filter) Retrieve the all stored outcome reasons.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOOutcomeReasonUpdate dto) Modifies the required outcome reason.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Create a new outcome reason.
-
Constructor Details
-
OutcomeReasonService
public OutcomeReasonService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOOutcomeReason>> getCollection(@RequestParam("page") @NotNull @Valid @NotNull @Valid Page page, @RequestParam("filter") @Valid @NotNull @Valid @NotNull DTOOutcomeReasonSearchFilter filter) throws DAValidateException, DAException Retrieve the all stored outcome reasons.OutcomeReasonSearchEvent- Parameters:
page- the required result pagefilter- the specifiedDTOOutcomeReasonSearchFilter- Returns:
- the response containing the current result page
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{id:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOOutcomeReason> get(@PathVariable("id") Long id, @RequestParam(required=false,name="language",defaultValue="user") String language) throws DAValidateException, DAException Retrieves the required outcome reason.OutcomeReasonLoadEvent- Parameters:
id- outcome reason idlanguage- the language filter- Returns:
- the response containing the required outcome reason
- 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(@Valid @RequestBody @Valid DTOOutcomeReasonInsert dto) throws DAValidateException, DAException Create a new outcome reason.OutcomeReasonInsertEvent- Parameters:
dto- theDTOOutcomeReason- Returns:
- the standard response containing the new outcome reason id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{id:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("id") Long id, @Valid @RequestBody @Valid DTOOutcomeReasonUpdate dto) throws DAValidateException, DAException Modifies the required outcome reason.OutcomeReasonUpdateEvent- Parameters:
id- the outcome reason iddto- the outcome reason updateDTOOutcomeReason- Returns:
- a standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-