Class AttachmentsController<T extends SocialUgc>

    • Field Detail

      • mimeFile

        @Value("${studio.social.web.mimeFile}")
        protected org.springframework.core.io.Resource mimeFile
    • Constructor Detail

      • AttachmentsController

        public AttachmentsController()
    • Method Detail

      • addAttachment

        @RequestMapping(value="/{id}/attachments",
                        method=POST)
        @ResponseBody
        public org.craftercms.commons.mongo.FileInfo addAttachment​(@NotBlank @PathVariable("id")
                                                                   @NotBlank String id,
                                                                   @RequestParam
                                                                   org.springframework.web.multipart.MultipartFile attachment)
                                                            throws SocialException,
                                                                   IOException
        Throws:
        SocialException
        IOException
      • removeAttachment

        @RequestMapping(value="/{id}/attachments/{attachmentId}",
                        method=DELETE)
        @ResponseBody
        public boolean removeAttachment​(@NotBlank @PathVariable("id")
                                        @NotBlank String id,
                                        @NotBlank @PathVariable("attachmentId")
                                        @NotBlank String attachmentId)
                                 throws SocialException,
                                        IOException
        Throws:
        SocialException
        IOException
      • removeAttachmentPost

        @RequestMapping(value="/{id}/attachments/{attachmentId}/delete",
                        method=POST)
        @ResponseBody
        public boolean removeAttachmentPost​(@NotBlank @PathVariable("id")
                                            @NotBlank String id,
                                            @NotBlank @PathVariable("attachmentId")
                                            @NotBlank String attachmentId)
                                     throws SocialException,
                                            IOException
        Throws:
        SocialException
        IOException
      • updateAttachmentPost

        @RequestMapping(value="/{id}/attachments/{attachmentId}/update",
                        method=POST)
        @ResponseBody
        public boolean updateAttachmentPost​(@NotBlank @PathVariable("id")
                                            @NotBlank String id,
                                            @NotBlank @PathVariable("attachmentId")
                                            @NotBlank String attachmentId,
                                            @RequestParam
                                            org.springframework.web.multipart.MultipartFile file)
                                     throws SocialException,
                                            IOException
        Throws:
        SocialException
        IOException
      • readAttachment

        @RequestMapping(value="/{id}/attachments/{attachmentId}",
                        method=GET)
        @ResponseBody
        public void readAttachment​(@NotBlank @PathVariable("id")
                                   @NotBlank String id,
                                   @NotBlank @PathVariable("attachmentId")
                                   @NotBlank String attachmentId,
                                   javax.servlet.http.HttpServletResponse response)
                            throws SocialException,
                                   IOException
        Throws:
        SocialException
        IOException