Class OutcomeReasonService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.execution.rs1.outcomereason.OutcomeReasonService
@RestController
@RequestMapping("work-orders/execution/r1/outcome-reasons")
@Resource(logging=true)
public class OutcomeReasonService
extends PrivateService
Service for manage outcome reason.
- Since:
- 18.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOOutcomeReason> get(Long outcomeReasonId, String language, Collection<String> fields) Retrieves the requiredDTOOutcomeReasonby calling from theOutcomeReasonLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOOutcomeReason>> getCollection(@Valid Page page, Collection<String> fields, String order, String language, @Valid @NotNull DTOOutcomeReasonFilter filter) Returns the collection of all the stored outcome reasons by calling theOutcomeReasonSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long outcomeReasonId, @Valid DTOOutcomeReasonUpdate dto) Updates the required outcome by calling theOutcomeReasonLoadEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new work shift exception by calling theOutcomeReasonInsertEvent.
-
Constructor Details
-
OutcomeReasonService
public OutcomeReasonService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOOutcomeReason>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @RequestParam(required=false,name="_language",defaultValue="user") String language, @Valid @NotNull @Valid @NotNull DTOOutcomeReasonFilter filter) throws DAValidateException, DAException Returns the collection of all the stored outcome reasons by calling theOutcomeReasonSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the fieldsorder- the order fieldlanguage- the languagefilter- theDTOOutcomeReasonFilter- Returns:
- the collection of
DTOOutcomeReason - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{outcomeReasonId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOOutcomeReason> get(@PathVariable("outcomeReasonId") Long outcomeReasonId, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOOutcomeReasonby calling from theOutcomeReasonLoadEvent.- Parameters:
outcomeReasonId- the outcome reason idlanguage- the languagefields- the fields- Returns:
- the response containing the loaded 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 Creates a new work shift exception by calling theOutcomeReasonInsertEvent.- Parameters:
dto- theDTOOutcomeReasonInsert- Returns:
- the response containing the ID of the newly created outcome reason
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{outcomeReasonId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("outcomeReasonId") Long outcomeReasonId, @Valid @RequestBody @Valid DTOOutcomeReasonUpdate dto) throws DAValidateException, DAException Updates the required outcome by calling theOutcomeReasonLoadEvent.- Parameters:
outcomeReasonId- the ID of the outcome reason to be updateddto- theDTOOutcomeReasonUpdate- Returns:
- the standard empty response
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-