Class EcommerceMediaController

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    @RestController
    public class EcommerceMediaController
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      org.springframework.http.ResponseEntity<?> handleRemoveImage​(java.lang.String payload, UploadType command)  
      org.springframework.http.ResponseEntity<?> handleRemoveImage​(java.util.Map<java.lang.String,​java.lang.Object> payload)  
      org.springframework.http.ResponseEntity<java.util.List<java.lang.String>> handleShowImages​(java.lang.String pathStr, java.lang.String urlPrefix)  
      org.springframework.http.ResponseEntity<?> handleUploadImage​(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, UploadType command)  
      org.springframework.http.ResponseEntity<?> handleUploadImage​(org.springframework.web.multipart.MultipartFile file, java.util.Map<java.lang.String,​java.lang.Object> payload)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EcommerceMediaController

        public EcommerceMediaController()
    • Method Detail

      • handleShowImages

        @CrossOrigin(origins="*",
                     allowCredentials="true")
        @PostMapping(value="/api/v1/images",
                     params={"path","urlPrefix"},
                     produces="application/json")
        @ResponseBody
        public org.springframework.http.ResponseEntity<java.util.List<java.lang.String>> handleShowImages​(@RequestParam(name="path")
                                                                                                          java.lang.String pathStr,
                                                                                                          @RequestParam(name="urlPrefix")
                                                                                                          java.lang.String urlPrefix)
      • handleUploadImage

        @PostMapping("/api/v1/uploadImage")
        @ResponseBody
        public org.springframework.http.ResponseEntity<?> handleUploadImage​(@RequestParam(value="file",required=false)
                                                                            org.springframework.web.multipart.MultipartFile file,
                                                                            @RequestParam("payload")
                                                                            java.lang.String payload,
                                                                            @RequestParam("command")
                                                                            UploadType command)
                                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleRemoveImage

        @PostMapping("/api/v1/removeImage")
        @ResponseBody
        public org.springframework.http.ResponseEntity<?> handleRemoveImage​(@RequestParam("payload")
                                                                            java.lang.String payload,
                                                                            @RequestParam("command")
                                                                            UploadType command)
                                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleUploadImage

        public org.springframework.http.ResponseEntity<?> handleUploadImage​(org.springframework.web.multipart.MultipartFile file,
                                                                            java.util.Map<java.lang.String,​java.lang.Object> payload)
                                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • handleRemoveImage

        public org.springframework.http.ResponseEntity<?> handleRemoveImage​(java.util.Map<java.lang.String,​java.lang.Object> payload)
                                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception