Class WorkOrderUrgencyService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.workorders.rs1.urgency.WorkOrderUrgencyService
@RestController
@RequestMapping("work-orders/r1/urgencies")
@Resource(logging=true)
public class WorkOrderUrgencyService
extends PrivateService
Service to manage work order urgencies.
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOWorkOrderUrgency> get(Long id, String language, Collection<String> fields) Retrieves the requiredDTOWorkOrderUrgencyby calling theWorkOrderUrgencyLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOWorkOrderUrgency>> getCollection(@Valid Page page, String language, Collection<String> fields, String order, @Valid DTOWorkOrderUrgencyFilter filter) Returns the collection of all the stored work order urgencies by calling theWorkOrderUrgencySearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOWorkOrderUrgencyUpdate dto) Update a work order urgency by calling theWorkOrderUrgencyUpdateEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Create a new work order urgency by calling theWorkOrderUrgencyInsertEvent.
-
Constructor Details
-
WorkOrderUrgencyService
public WorkOrderUrgencyService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWorkOrderUrgency>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOWorkOrderUrgencyFilter filter) throws DAValidateException, DAException Returns the collection of all the stored work order urgencies by calling theWorkOrderUrgencySearchEvent.- Parameters:
page- thePagethat will contain the paginated resultlanguage- the user languagefields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOWorkOrderUrgencyFilter- Returns:
- the collection of
DTOWorkOrderUrgency - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{urgencyId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOWorkOrderUrgency> get(@PathVariable("urgencyId") Long id, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOWorkOrderUrgencyby calling theWorkOrderUrgencyLoadEvent.- Parameters:
id- the urgency idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the response containing the loaded urgency
- 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 DTOWorkOrderUrgencyInsert dto) throws DAValidateException, DAException Create a new work order urgency by calling theWorkOrderUrgencyInsertEvent.- Parameters:
dto- theDTOWorkOrderUrgencyInsert- Returns:
- the standard response containing the new work order urgency id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{urgencyId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("urgencyId") Long id, @Valid @RequestBody @Valid DTOWorkOrderUrgencyUpdate dto) throws DAValidateException, DAException Update a work order urgency by calling theWorkOrderUrgencyUpdateEvent.- Parameters:
id- the urgency iddto- theDTOWorkOrderUrgencyUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-