Class WorkOrderOperationService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.workorders.rs1.operation.WorkOrderOperationService
@RestController
@RequestMapping("work-orders/r1/work-orders/{workOrderId:[0-9]+}/operations")
@Resource(logging=true)
public class WorkOrderOperationService
extends PrivateService
Service to manage work order operation
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> batchPatch(Long workOrderId, @Size(min=1,max=100) @Valid List<DTOWorkOrderOperationBatchUpdate> batchInput) Update a batch of work order operations by calling theWorkOrderOperationUpdateBatchEventorg.springframework.http.ResponseEntity<List<DTOIdentifier<Long>>> batchPost(Long workOrderId, @Size(min=1,max=100) @Valid List<DTOWorkOrderOperationInsert> batchInput) Create a batch of work order operations by calling theWorkOrderOperationInsertBatchEventorg.springframework.http.ResponseEntity<Void> Cancel the association between the work order and the work order operation by calling theWorkOrderCancelEvent.org.springframework.http.ResponseEntity<DTOWorkOrderOperation> get(Long workOrderId, Long operationId, Collection<String> fields) Retrieves the requiredDTOWorkOrderOperationby calling theWorkOrderOperationLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOWorkOrderOperation>> getCollection(Long workOrderId, @Valid Page page, Collection<String> fields, String order, @Valid DTOWorkOrderOperationFilter filter) Returns the collection of all the stored work order operations by calling theWorkOrderOperationSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long workOrderId, Long operationId, @Valid DTOWorkOrderOperationUpdate dto) Update a work order operation by calling theWorkOrderOperationUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long workOrderId, @Valid DTOWorkOrderOperationInsert dto) Create a new work order operation by calling theWorkOrderOperationInsertEvent
-
Constructor Details
-
WorkOrderOperationService
public WorkOrderOperationService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWorkOrderOperation>> getCollection(@PathVariable("workOrderId") Long workOrderId, @RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,value="_fields") Collection<String> fields, @RequestParam(required=false,value="_order") String order, @Valid @Valid DTOWorkOrderOperationFilter filter) throws DAValidateException, DAException Returns the collection of all the stored work order operations by calling theWorkOrderOperationSearchEvent.- Parameters:
workOrderId- the work order idpage- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOWorkOrderOperationFilter- Returns:
- the collection of
DTOWorkOrderOperation - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{operationId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOWorkOrderOperation> get(@PathVariable("workOrderId") Long workOrderId, @PathVariable("operationId") Long operationId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOWorkOrderOperationby calling theWorkOrderOperationLoadEvent.- Parameters:
workOrderId- the work order idoperationId- the operation idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded work order operation
- 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("workOrderId") Long workOrderId, @Valid @RequestBody @Valid DTOWorkOrderOperationInsert dto) throws DAValidateException, DAException Create a new work order operation by calling theWorkOrderOperationInsertEvent- Parameters:
workOrderId- the work order iddto- theDTOWorkOrderOperationInsert- Returns:
- the standard response containing the new work order operation id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{operationId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("workOrderId") Long workOrderId, @PathVariable("operationId") Long operationId, @RequestBody @Valid @Valid DTOWorkOrderOperationUpdate dto) throws DAValidateException, DAException Update a work order operation by calling theWorkOrderOperationUpdateEvent- Parameters:
workOrderId- the work order idoperationId- the operation iddto- theDTOWorkOrderOperationUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
cancel
@PostMapping(value="/{operationId:[0-9]+}/cancellations", produces="application/json") public org.springframework.http.ResponseEntity<Void> cancel(@PathVariable("workOrderId") Long workOrderId, @PathVariable("operationId") Long operationId) throws DAException, DAValidateException Cancel the association between the work order and the work order operation by calling theWorkOrderCancelEvent.- Parameters:
workOrderId- the work order idoperationId- the work order operation id- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
batchPost
@PostMapping(value="/batch", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<List<DTOIdentifier<Long>>> batchPost(@PathVariable("workOrderId") Long workOrderId, @Size(min=1,max=100) @Valid @RequestBody @Size(min=1,max=100) @Valid List<DTOWorkOrderOperationInsert> batchInput) throws DAValidateException, DAException Create a batch of work order operations by calling theWorkOrderOperationInsertBatchEvent- Parameters:
batchInput- a list ofDTOWorkOrderOperationInsert- Returns:
- the standard response containing the list of new work order operation ids
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
batchPatch
@PatchMapping(value="/batch", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> batchPatch(@PathVariable("workOrderId") Long workOrderId, @Size(min=1,max=100) @RequestBody @Valid @Size(min=1,max=100) @Valid List<DTOWorkOrderOperationBatchUpdate> batchInput) throws DAValidateException, DAException Update a batch of work order operations by calling theWorkOrderOperationUpdateBatchEvent- Parameters:
batchInput- a list ofDTOWorkOrderOperationBatchUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-