Class AttachmentService

java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.mobile.core.rs3.attachment.AttachmentService

@RestController @RequestMapping("mobile/r3/attachments") @Resource(logging=true) public class AttachmentService extends PrivateService
Services to manage mobile attachments.
Since:
19.0
GCApi:
rest
  • Field Details

  • Constructor Details

    • AttachmentService

      public AttachmentService()
  • Method Details

    • getAttachment

      @GetMapping(value="{uuid:[A-Za-z0-9-]+}", produces="application/octet-stream") public org.springframework.http.ResponseEntity<org.springframework.core.io.InputStreamResource> getAttachment(@PathVariable("uuid") String uuid) throws DAValidateException, DAException
      Returns the required attachment. AttachmentLoadEvent
      Parameters:
      uuid - the uuid
      Returns:
      the attachment
      Throws:
      DAValidateException - the DA validate exception
      DAException - the DA exception
    • createInputStreamResource

      protected org.springframework.core.io.InputStreamResource createInputStreamResource(WebResource webResource) throws DAException
      Creates an InputStreamResource for the given WebResource. Note: The stream will be closed by Spring's ResponseEntity when the response is complete. We only need to handle closing in case of exceptions.
      Parameters:
      webResource - the web resource to get the stream from
      Returns:
      InputStreamResource for the web resource
      Throws:
      DAException - if an error occurs while creating the resource