Class AttachmentsController

java.lang.Object
org.tailormap.api.controller.AttachmentsController

@Validated public class AttachmentsController extends Object
  • Constructor Details

  • Method Details

    • addAttachment

      @PutMapping(path="${tailormap-api.base-path}/{viewerKind}/{viewerName}/layer/{appLayerId}/feature/{featureId}/attachments", consumes="multipart/form-data", produces="application/json") @Transactional public org.springframework.http.ResponseEntity<Serializable> addAttachment(@ModelAttribute AppTreeLayerNode appTreeLayerNode, @ModelAttribute GeoService service, @ModelAttribute GeoServiceLayer layer, @ModelAttribute Application application, @PathVariable String featureId, @RequestPart("attachmentMetadata") AttachmentMetadata attachment, @RequestPart("attachment") byte[] fileData)
      Add an attachment to a feature
      Parameters:
      appTreeLayerNode - the application tree layer node
      service - the geo service
      layer - the geo service layer
      application - the application
      featureId - the feature id
      attachment - the attachment metadata
      fileData - the attachment file data
      Returns:
      the response entity
    • listAttachments

      @GetMapping(path="${tailormap-api.base-path}/{viewerKind}/{viewerName}/layer/{appLayerId}/feature/{featureId}/attachments", produces="application/json") @Transactional public org.springframework.http.ResponseEntity<List<AttachmentMetadata>> listAttachments(@ModelAttribute AppTreeLayerNode appTreeLayerNode, @ModelAttribute GeoService service, @ModelAttribute GeoServiceLayer layer, @ModelAttribute Application application, @PathVariable String featureId)
      List attachments for a feature.
      Parameters:
      appTreeLayerNode - the application tree layer node
      service - the geo service
      layer - the geo service layer
      application - the application
      featureId - the feature id
      Returns:
      the response entity containing a list of attachment metadata
    • deleteAttachment

      @DeleteMapping(path="${tailormap-api.base-path}/{viewerKind}/{viewerName}/layer/{appLayerId}/attachment/{attachmentId}") @Transactional public org.springframework.http.ResponseEntity<Serializable> deleteAttachment(@ModelAttribute AppTreeLayerNode appTreeLayerNode, @ModelAttribute GeoService service, @ModelAttribute GeoServiceLayer layer, @ModelAttribute Application application, @PathVariable UUID attachmentId)
    • getAttachment

      @Transactional @GetMapping(path="${tailormap-api.base-path}/{viewerKind}/{viewerName}/layer/{appLayerId}/attachment/{attachmentId}", produces="application/octet-stream") public org.springframework.http.ResponseEntity<byte[]> getAttachment(@ModelAttribute AppTreeLayerNode appTreeLayerNode, @ModelAttribute GeoService service, @ModelAttribute GeoServiceLayer layer, @ModelAttribute Application application, @PathVariable UUID attachmentId)