Package co.mastermindcms.modules.rest
Class EcommerceDataController
- java.lang.Object
-
- co.mastermindcms.modules.rest.EcommerceDataController
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
@RestController public class EcommerceDataController extends java.lang.Object implements org.springframework.beans.factory.InitializingBean
-
-
Field Summary
Fields Modifier and Type Field Description private CommonProperties
commonProperties
private EcomSearchEngineService
ecomSearchEngineService
private co.mastermindcms.modules.filestorage.services.FileManagerService
fileManagerService
private com.fasterxml.jackson.databind.ObjectMapper
mapper
private MarketingService
marketingService
private MessageService
messageService
private MongoStorageService
mongoStorageService
private OrderService
orderService
private ProductService
productService
private SalesCatalogService
salesCatalogService
private SellerRegistrationService
sellerRegistrationService
private SellerRepository
sellerRepository
private SellerSkuExcelWriter
sellerSkuExcelWriter
private SellerSkuRepository
sellerSkuRepository
private SequenceGeneratorService
sequenceGeneratorService
private SKUService
skuService
private TranslationService
translationService
private UserManagementService
userManagementService
-
Constructor Summary
Constructors Constructor Description EcommerceDataController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
private boolean
allowsToDownload(java.lang.String sharedUsers)
org.springframework.http.ResponseEntity<?>
handleDownloadData(java.lang.String pathName, java.lang.String fileName, java.security.Principal principal, javax.servlet.http.HttpServletResponse response)
private org.springframework.http.ResponseEntity<?>
handleDownloadDocument(java.lang.String pathName)
org.springframework.http.ResponseEntity<?>
handleDownloadReports(java.lang.String payload, ReportType command, javax.servlet.http.HttpServletResponse response)
org.springframework.http.ResponseEntity<?>
handleDownloadReportsData(java.lang.String payload, javax.servlet.http.HttpServletResponse response)
org.springframework.http.ResponseEntity<?>
handleExportSearchData(java.lang.String payload)
org.springframework.http.ResponseEntity<?>
handleRemoveData(java.lang.String payload, UploadType command, java.lang.String id, java.security.Principal principal)
org.springframework.http.ResponseEntity<?>
handleRemoveMessageAttachment(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String messageId, java.security.Principal principal)
org.springframework.http.ResponseEntity<?>
handleRemoveOrderAttachment(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String orderId, java.security.Principal principal)
org.springframework.http.ResponseEntity<?>
handleRemoveSellerDocument(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String sellerId)
org.springframework.http.ResponseEntity<?>
handleRemoveSellerSkuDocument(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String sellerSkuId)
org.springframework.http.ResponseEntity<?>
handleRemoveSkuDocument(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String skuId)
private org.springframework.http.ResponseEntity<?>
handleSeoMetaInfoUpload(org.springframework.web.multipart.MultipartFile file, java.lang.String payload)
private org.springframework.http.ResponseEntity<?>
handleTranslationsUpload(org.springframework.web.multipart.MultipartFile file)
org.springframework.http.ResponseEntity<?>
handleUploadData(org.springframework.web.multipart.MultipartFile file, UploadType command, java.lang.String payload, java.lang.String id, javax.servlet.http.HttpServletResponse response)
org.springframework.http.ResponseEntity<?>
handleUploadMessageDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
org.springframework.http.ResponseEntity<?>
handleUploadOrderDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
org.springframework.http.ResponseEntity<?>
handleUploadSellerDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
org.springframework.http.ResponseEntity<?>
handleUploadSellerSkuData(org.springframework.web.multipart.MultipartFile file)
org.springframework.http.ResponseEntity<?>
handleUploadSellerSkuDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
org.springframework.http.ResponseEntity<?>
handleUploadSkuData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload)
org.springframework.http.ResponseEntity<?>
handleUploadSkuDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
-
-
-
Field Detail
-
sellerRepository
@Autowired private SellerRepository sellerRepository
-
sellerSkuRepository
@Autowired private SellerSkuRepository sellerSkuRepository
-
productService
@Autowired private ProductService productService
-
skuService
@Autowired private SKUService skuService
-
salesCatalogService
@Autowired private SalesCatalogService salesCatalogService
-
translationService
@Autowired private TranslationService translationService
-
mongoStorageService
@Autowired private MongoStorageService mongoStorageService
-
sellerRegistrationService
@Autowired private SellerRegistrationService sellerRegistrationService
-
userManagementService
@Autowired private UserManagementService userManagementService
-
ecomSearchEngineService
@Qualifier("ecomSearchEngineServiceImpl") @Autowired private EcomSearchEngineService ecomSearchEngineService
-
sequenceGeneratorService
@Autowired private SequenceGeneratorService sequenceGeneratorService
-
fileManagerService
@Autowired private co.mastermindcms.modules.filestorage.services.FileManagerService fileManagerService
-
marketingService
@Autowired private MarketingService marketingService
-
orderService
@Autowired private OrderService orderService
-
messageService
@Autowired private MessageService messageService
-
commonProperties
@Autowired private CommonProperties commonProperties
-
sellerSkuExcelWriter
@Autowired private SellerSkuExcelWriter sellerSkuExcelWriter
-
mapper
private final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Method Detail
-
handleUploadData
@PostMapping("/api/v1/uploadData") @ResponseBody public org.springframework.http.ResponseEntity<?> handleUploadData(@RequestParam org.springframework.web.multipart.MultipartFile file, @RequestParam UploadType command, @RequestParam(value="payload",required=false) java.lang.String payload, @RequestParam(value="id",required=false) java.lang.String id, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleRemoveData
@PostMapping("/api/v1/removeDocument") @ResponseBody public org.springframework.http.ResponseEntity<?> handleRemoveData(@RequestParam("payload") java.lang.String payload, @RequestParam("command") UploadType command, @RequestParam(value="id",required=false) java.lang.String id, java.security.Principal principal) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleDownloadData
@GetMapping(path="/api/v1/downloadData") @ResponseBody public org.springframework.http.ResponseEntity<?> handleDownloadData(@RequestParam("pathName") java.lang.String pathName, @RequestParam(value="fileName",required=false) java.lang.String fileName, java.security.Principal principal, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleDownloadReports
@PostMapping("/api/v1/downloadReportsData") @ResponseBody public org.springframework.http.ResponseEntity<?> handleDownloadReports(@RequestParam("payload") java.lang.String payload, @RequestParam("command") ReportType command, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleUploadSkuData
public org.springframework.http.ResponseEntity<?> handleUploadSkuData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleDownloadReportsData
public org.springframework.http.ResponseEntity<?> handleDownloadReportsData(java.lang.String payload, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
- Throws:
java.io.IOException
-
handleExportSearchData
public org.springframework.http.ResponseEntity<?> handleExportSearchData(java.lang.String payload) throws java.io.IOException
- Throws:
java.io.IOException
-
handleUploadSellerSkuData
public org.springframework.http.ResponseEntity<?> handleUploadSellerSkuData(org.springframework.web.multipart.MultipartFile file) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleRemoveSellerDocument
public org.springframework.http.ResponseEntity<?> handleRemoveSellerDocument(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String sellerId) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleRemoveOrderAttachment
public org.springframework.http.ResponseEntity<?> handleRemoveOrderAttachment(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String orderId, java.security.Principal principal)
-
handleRemoveMessageAttachment
public org.springframework.http.ResponseEntity<?> handleRemoveMessageAttachment(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String messageId, java.security.Principal principal)
-
handleRemoveSkuDocument
public org.springframework.http.ResponseEntity<?> handleRemoveSkuDocument(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String skuId) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleUploadSellerSkuDocumentData
public org.springframework.http.ResponseEntity<?> handleUploadSellerSkuDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
-
handleUploadSkuDocumentData
public org.springframework.http.ResponseEntity<?> handleUploadSkuDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
-
handleUploadSellerDocumentData
public org.springframework.http.ResponseEntity<?> handleUploadSellerDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
-
handleUploadOrderDocumentData
public org.springframework.http.ResponseEntity<?> handleUploadOrderDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
-
handleUploadMessageDocumentData
public org.springframework.http.ResponseEntity<?> handleUploadMessageDocumentData(org.springframework.web.multipart.MultipartFile file, java.lang.String payload, java.lang.String id)
-
handleRemoveSellerSkuDocument
public org.springframework.http.ResponseEntity<?> handleRemoveSellerSkuDocument(java.util.Map<java.lang.String,java.lang.Object> payload, java.lang.String sellerSkuId)
-
handleDownloadDocument
private org.springframework.http.ResponseEntity<?> handleDownloadDocument(java.lang.String pathName)
-
handleSeoMetaInfoUpload
private org.springframework.http.ResponseEntity<?> handleSeoMetaInfoUpload(org.springframework.web.multipart.MultipartFile file, java.lang.String payload) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleTranslationsUpload
private org.springframework.http.ResponseEntity<?> handleTranslationsUpload(org.springframework.web.multipart.MultipartFile file) throws java.lang.Exception
- Throws:
java.lang.Exception
-
allowsToDownload
private boolean allowsToDownload(java.lang.String sharedUsers)
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
-
-