Class WorkOrderAttachmentService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.core.rs5.workorder.attachment.WorkOrderAttachmentService
@RestController
@RequestMapping("core/r5/workorders/{id}/attachments")
@Resource(logging=true)
public class WorkOrderAttachmentService
extends PrivateService
Services to manage work orders attachments
- Since:
- 19.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<PageResponse<DTOWorkOrderAttachment>> getCollection(Long id) Retrieve all the attachments linked with the work orderWorkOrderHeaderSearchEventorg.springframework.http.ResponseEntity<DTOWorkOrderAttachment> post(Long id, @Valid DTOWorkOrderAttachmentInsert dtoWokOrderAttachmentInsert) Add an attachment to the work orderWorkOrderAttachmentInsertEvent.org.springframework.http.ResponseEntity<Void> Action to remove an attachmentWorkOrderAttachmentRemoveEvent.org.springframework.http.ResponseEntity<DTOWorkOrderAttachment> uploadOutcome(Long id, @Valid DTOWorkOrderAttachmentUploadOutcome dtoWorkOrderAttachmentComplete) Action to upload the outcome of a work order attachment associationWorkOrderAttachmentUploadOutcomeEvent.
-
Constructor Details
-
WorkOrderAttachmentService
public WorkOrderAttachmentService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWorkOrderAttachment>> getCollection(@PathVariable("id") Long id) throws DAValidateException, DAException Retrieve all the attachments linked with the work orderWorkOrderHeaderSearchEvent- Parameters:
id- the workorder id- Returns:
- the response containing the current result page
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOWorkOrderAttachment> post(@PathVariable("id") Long id, @Valid @RequestBody @Valid DTOWorkOrderAttachmentInsert dtoWokOrderAttachmentInsert) throws DAException, DAValidateException Add an attachment to the work orderWorkOrderAttachmentInsertEvent.- Parameters:
id- the id of the work order to associate with the attachmentdtoWokOrderAttachmentInsert- theDTOWorkOrderAttachmentInsertmapping the data of the work order attachment to insert- Returns:
- the DTO response containing the new workorder attachment id
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
uploadOutcome
@PostMapping(value="actions/uploadOutcome", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOWorkOrderAttachment> uploadOutcome(@PathVariable("id") Long id, @Valid @RequestBody @Valid DTOWorkOrderAttachmentUploadOutcome dtoWorkOrderAttachmentComplete) throws DAException, DAValidateException Action to upload the outcome of a work order attachment associationWorkOrderAttachmentUploadOutcomeEvent.- Parameters:
id- the id of the work order to closedtoWorkOrderAttachmentComplete- theDTOWorkOrderAttachmentUploadOutcomeof the resource to complete- Returns:
- the DTO response containing the workorder attachment
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
remove
@PostMapping(value="actions/remove/{uuid}", produces="application/json") public org.springframework.http.ResponseEntity<Void> remove(@PathVariable("id") Long id, @PathVariable("uuid") String uuid) throws DAException, DAValidateException Action to remove an attachmentWorkOrderAttachmentRemoveEvent.- Parameters:
id- the id of the work orderuuid- the uuid of the resource to delete- Returns:
- the DTO response
- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-